Seafox
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Seafox

on

  • 571 views

Motivation and some implementation detail for Seafox - the HTML -> Seaside canvas translator

Motivation and some implementation detail for Seafox - the HTML -> Seaside canvas translator

Statistics

Views

Total Views
571
Views on SlideShare
571
Embed Views
0

Actions

Likes
0
Downloads
2
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • Show round trip WAWelcome -> seafox -> Seaside\n
  • I struggled when I was new to Seaside finding and remembering the HTML -> Seaside render method translations\n
  • \n
  • Dreamweaver - subset of the community\nSmalltalk HTML parser - although Squeak source contains a couple of parsers they look as though they hadn’t been updated for a while\n\nGreat HTML parse in Firefox - lets leverage that. It works and it’s well tested.\n
  • browser.js - is a parser\n\nOther files:\nbrowser.css\nbrowser.xul\nseasideicon.png\nchrome.manifest\ninstall.rdf\n\n
  • Problem is map html elements into seaside methods\n
  • \n
  • WAGenericTag\n
  • \n
  • \n
  • \n
  • \n
  • It shows the mappings\nConfigurationOfSeafox - http://www.squeaksource.com/MetacelloRepository\n\n
  • Go and grab it, let me know if you think it’s useful and help me fix it...\n

Seafox Presentation Transcript

  • 1. Seafox + Nick Ager
  • 2. Demo
  • 3. Why #1?• Learning Seaside
  • 4. Why #2 - workflow Seaside Dreamweaver ?Graphic designer Seaside developer
  • 5. Implementation Ideas1. Dreamweaver plug-in2. Smalltalk HTML parser3. Firefox plugin
  • 6. ImplementationAutogenerated seafox.xpi elementAttributeMapping.js parser.js
  • 7. Autogenerated <ul>...</ul> HTML Elements WAHtmlCanvas >> #unorderedList <tag class=”title”>...</tag>Elements Attributes WATagBrush >> #class: ‘title’
  • 8. Implementation Plan #1 WAHtmlCanvas >> #unorderedList ^ self brush: WAUnorderedListTag new WAUnorderedListTag >> #tag ^ ’ul’
  • 9. Implementation Plan #1WAHtmlCanvas >> #code ^ self tag: ‘code’WAHtmlCanvas >> #blockquote ^ self tag: ‘blockquote’ . . . .
  • 10. Implementation #2brushMethodWrapper := ObjectAsMethodWrapper installOn: WAHtmlCanvas selector: #brush:.brushMethodWrapper preblock: [:aSel :someArgs :aRec | brush := someArgs first].
  • 11. Implementation fudges• Ignore: WAPopupAnchorTag, WAColorInputTag,WAImageMapTag, WABasicFormTag......• WAHeadingTag• #title: #script: #style:
  • 12. Outstanding• 0.1 release• mapping isn’t perfect: html div "unmapped attribute->" attributeAt: lang put: en-GB;• More thanproblems: Compiler 256 literalsreferenced. You must split or otherwise simplify this method
  • 13. Future• Integration with firebug• Bug fixes; entity mappings...• Syntax colour highlighting• Experiment serialising the DOM as JSON into Smalltalk then writing the parser in Smalltalk
  • 14. Where to find Seafox• http://www.squeaksource.com/Seafox• http://seafox.seasidehosting.st/• http://addons.mozilla.org/
  • 15. Thanks