• Like


Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Seaside Evolution

Uploaded on

Seaside Evolution …

Seaside Evolution
and things you never knew you could do. Julian Fitzell. ESUG 2008, Amsterdam

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads


Total Views
On Slideshare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. Seaside Evolution and things you never knew you could do Julian Fitzell – julian@fitzell.ca
  • 2. Experimentation Stabilization Optimization Adoption
  • 3. Experimentation
  • 4. WebObjects
  • 5. Interpreted Objects Iowa for Web Applications
  • 6. Iowa Example class Main < Iowa::Component attr_accessor :person def all_people Person.fetch_all() end def delete_person Person.delete(@person) end end
  • 7. Iowa Example (cont’d) <ul oid="people"> <li>@person.firstName @person.lastName <a oid="delete_person">delete</a></li> </ul> <? people { item = person list = all_people } ?>
  • 8. Synchronous Development: inverting the request/response loop Web Server Start app and Request data A Process A Request data B and Process B and Request Start app Request data A ProcessRequest B and and ProcessRequestdata C C Request A Request B Request C Submit A Submit B Start Web Browser
  • 9. Seaside 0.9: Example html ^ ' <ul sea:id="people"> <li>[person.firstName] [person.lastName] <a sea:id="delete:">delete</a></li> </ul> '
  • 10. Example (cont’d) addBindingsTo: template (template elementNamed: 'people') bind: #list toPath: 'allPeople'; set: #iterator to: #person. (template elementNamed: 'delete:') bind: #argument toPath: 'person'.
  • 11. Example (no bindings) html ^ ' <ul sea:id="person/allPeople"> <li>[person.firstName] [person.lastName] <a sea:id="delete:">delete</a></li> </ul> '
  • 12. Example (conditionals, embedding) html ^ ' <if sea:id="allPeople.isEmptyOrNil.not"> Number of people: [allPeople.size] </if>' html ^ ' <form sea:id="save"> <input sea:id="firstName" /> <IADateSelector sea:id="birthday" /> </form>'
  • 13. Seaside 0.9: Architecture CORE Session, etc. Components (pages) Templates, tags Comanche PWS ModLisp Adaptor Adaptor Adaptor
  • 14. Seaside 2.x – Borges Templates Layers Magic
  • 15. In all fiction, when a man is faced with alternatives he chooses one at the expense of the others. In the almost unfathomable Ts'ui Pen, he chooses - simultaneously - all of them. He thus creates various futures, various times which start others that will in turn branch out and bifurcate in other times... - Jorge Luis Borges, The Garden of Forking Paths
  • 16. Seaside 2.0: Architecture Components call/return, embedding, tools Views callbacks, HTML rendering Kernel Continuations, request/response, session management, state (back-)tracking Server Adaptor Web Server (Comanche, etc)
  • 17. Seaside 2.3: Architecture Rendering HTML generation Component delegation/calling, embedding Session continuations, state (back-)tracking, callbacks Base request/response handling Server Adaptor Web Server (Comanche, etc)
  • 18. Stabilization •State tracking •Modularity •Canvas API
  • 19. Optimization Memory•Speed•Complexity
  • 20. WebVelocity GLASS Adoption Portability Documentation Advocacy
  • 21. Seaside 2.9: Architecture Development Tests Examples Tools CORE Render Loop Components RenderLoopMain Main Session Management Painter Application Seaside Requests EntryPoint Canvas Request Handling Server Adaptors Native Base Requests Config Utils Exceptions HTTP Servers Servers Servers Platform
  • 22. The Metaphor • main() { WARenderLoopMain • root = new_root_component(); • while (1) { WARenderLoop • render(root); WARenderContinuation • process_callbacks(root); WARedirectContinuation • redirect(); • } • }
  • 23. Plugging In: Some Ideas • Configuration • Error Handler • Request Handler • Session Expiry Handler • Toolbar or Halo plugin • …?
  • 24. Example: Configuration • Subclass WASystemConfiguration • Implement #describeOn: • (optional) Implement #parents • Add the configuration to your application • Note: attribute names need to be unique so prefix yours appropriately to avoid collisions
  • 25. Example: Configuration describeOn: config (config string: #myappSoapHost) label: 'SOAP Host'; comment: 'My App SOAP server hostname'. (config list: #myappTheme) label: 'Theme'; options: [self allThemes]. config at: #sessionClass put: MySession.
  • 26. Example: Error Handler • Subclass WAErrorHandler • Implement #handleError: • (optional) Implement #handleWarning: and #internalError: • Select the error handler in your application’s configuration
  • 27. Example: Error Handler handleError: anError session := WACurrentRequestContext session. self sendEmailForSession: session error: anError. self forkAndSaveForDebugging.
  • 28. Example: Request Handler • Subclass WAEntryPoint • Implement #handleRequest: • (optional) Implement your own Configuration and add it as a parent in #defaultConfiguration • Add an instance of your class to a dispatcher
  • 29. Example: Session Expiry Handler • Subclass WAExpiredSessionKeyHandler • Implement #handleRequest: to return a response • Configure your application to use your new handler
  • 30. Questions? Julian Fitzell – julian@fitzell.ca
  • 31. Seaside 2.9 (a peek) • Split into modules • Configuration system refactoring • First class mime types and locales • Cryptographically secure session and continuation keys • RequestContext • Painter/Presenter refactoring (?)