Seaside Evolution
and things you never knew you could do
Julian Fitzell – julian@fitzell.ca
Experimentation
Stabilization
Optimization
Adoption
Experimentation
WebObjects
Iowa
Interpreted
Objects
for
Web
Applications
Iowa Example
class Main < Iowa::Component
attr_accessor :person
def all_people
Person.fetch_all()
end
def delete_person
Pe...
Iowa Example (cont’d)
<ul oid="people">
<li>@person.firstName @person.lastName
<a oid="delete_person">delete</a></li>
</ul...
Synchronous Development:
inverting the request/response loop
Web Browser
Web Server
Start
Start app and
Request data A
Req...
Seaside 0.9: Example
html
^ '
<ul sea:id="people">
<li>[person.firstName] [person.lastName]
<a sea:id="delete:">delete</a>...
Example (cont’d)
addBindingsTo: template
(template elementNamed: 'people')
bind: #list toPath: 'allPeople';
set: #iterator...
Example (no bindings)
html
^ '
<ul sea:id="person/allPeople">
<li>[person.firstName] [person.lastName]
<a sea:id="delete:"...
Example (conditionals, embedding)
html
^ '
<if sea:id="allPeople.isEmptyOrNil.not">
Number of people: [allPeople.size]
</i...
Seaside 0.9: Architecture
CORE
Comanche
Adaptor
PWS
Adaptor
ModLisp
Adaptor
Templates, tags
Components (pages)
Session, et...
Templates
Magic
Layers
Seaside 2.x – Borges
- Jorge Luis Borges, The Garden of Forking Paths
In all fiction, when a man is faced with alternatives he
chooses one at t...
Seaside 2.0: Architecture
Web Server (Comanche, etc)
Server Adaptor
Kernel
Continuations, request/response,
session manage...
Seaside 2.3: Architecture
Web Server (Comanche, etc)
Server Adaptor
Component
delegation/calling, embedding
Rendering
HTML...
Stabilization
•State tracking
•Modularity
•Canvas API
Optimization
Memory•Speed•Complexity
AdoptionPortability
Documentation
Advocacy
GLASS
WebVelocity
Base
Seaside 2.9: Architecture
Platform
Config
Request Handling
Session Management
ComponentsRender Loop
Painter
Canvas
Se...
The Metaphor
• main() {
• root = new_root_component();
• while (1) {
• render(root);
• process_callbacks(root);
• redirect...
Plugging In: Some Ideas
• Configuration
• Error Handler
• Request Handler
• Session Expiry Handler
• Toolbar or Halo plugi...
Example: Configuration
• Subclass WASystemConfiguration
• Implement #describeOn:
• (optional) Implement #parents
• Add the...
Example: Configuration
describeOn: config
(config string: #myappSoapHost)
label: 'SOAP Host';
comment: 'My App SOAP server...
Example: Error Handler
• Subclass WAErrorHandler
• Implement #handleError:
• (optional) Implement #handleWarning: and
#int...
Example: Error Handler
handleError: anError
session := WACurrentRequestContext session.
self
sendEmailForSession: session
...
Example: Request Handler
• Subclass WAEntryPoint
• Implement #handleRequest:
• (optional) Implement your own
Configuration...
Example: Session Expiry
Handler
• Subclass WAExpiredSessionKeyHandler
• Implement #handleRequest: to return a
response
• C...
Questions?
Julian Fitzell – julian@fitzell.ca
Seaside 2.9 (a peek)
• Split into modules
• Configuration system refactoring
• First class mime types and locales
• Crypto...
Seaside Evolution
Upcoming SlideShare
Loading in …5
×

Seaside Evolution

499 views

Published on

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

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
499
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Seaside Evolution

  1. 1. Seaside Evolution and things you never knew you could do Julian Fitzell – julian@fitzell.ca
  2. 2. Experimentation Stabilization Optimization Adoption
  3. 3. Experimentation
  4. 4. WebObjects
  5. 5. Iowa Interpreted Objects for Web Applications
  6. 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. 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. 8. Synchronous Development: inverting the request/response loop Web Browser Web Server Start Start app and Request data A RequestA SubmitA Process A and Request B RequestB SubmitB Process B and Request C RequestC Request data A and Process Request data B and Process Request data C Start app
  9. 9. Seaside 0.9: Example html ^ ' <ul sea:id="people"> <li>[person.firstName] [person.lastName] <a sea:id="delete:">delete</a></li> </ul> '
  10. 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. 11. Example (no bindings) html ^ ' <ul sea:id="person/allPeople"> <li>[person.firstName] [person.lastName] <a sea:id="delete:">delete</a></li> </ul> '
  12. 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. 13. Seaside 0.9: Architecture CORE Comanche Adaptor PWS Adaptor ModLisp Adaptor Templates, tags Components (pages) Session, etc.
  14. 14. Templates Magic Layers Seaside 2.x – Borges
  15. 15. - Jorge Luis Borges, The Garden of Forking Paths 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...
  16. 16. Seaside 2.0: Architecture Web Server (Comanche, etc) Server Adaptor Kernel Continuations, request/response, session management, state (back-)tracking Views callbacks, HTML rendering Components call/return, embedding, tools
  17. 17. Seaside 2.3: Architecture Web Server (Comanche, etc) Server Adaptor Component delegation/calling, embedding Rendering HTML generation Session continuations, state (back-)tracking, callbacks Base request/response handling
  18. 18. Stabilization •State tracking •Modularity •Canvas API
  19. 19. Optimization Memory•Speed•Complexity
  20. 20. AdoptionPortability Documentation Advocacy GLASS WebVelocity
  21. 21. Base Seaside 2.9: Architecture Platform Config Request Handling Session Management ComponentsRender Loop Painter Canvas Server Adaptors ServersServersServers Tests Examples Development Tools Utils Exceptions HTTP RenderLoopMain Main Application EntryPoint Native Requests Seaside Requests CORE
  22. 22. The Metaphor • main() { • root = new_root_component(); • while (1) { • render(root); • process_callbacks(root); • redirect(); • } • } WARenderLoopMain WARenderLoop WARenderContinuation WARedirectContinuation
  23. 23. Plugging In: Some Ideas • Configuration • Error Handler • Request Handler • Session Expiry Handler • Toolbar or Halo plugin • … ?
  24. 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. 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. 26. Example: Error Handler • Subclass WAErrorHandler • Implement #handleError: • (optional) Implement #handleWarning: and #internalError: • Select the error handler in your application’s configuration
  27. 27. Example: Error Handler handleError: anError session := WACurrentRequestContext session. self sendEmailForSession: session error: anError. self forkAndSaveForDebugging.
  28. 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. 29. Example: Session Expiry Handler • Subclass WAExpiredSessionKeyHandler • Implement #handleRequest: to return a response • Configure your application to use your new handler
  30. 30. Questions? Julian Fitzell – julian@fitzell.ca
  31. 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 (?)

×