advanced seaside
DESCRIPTION
ESUG 2012, GhentTRANSCRIPT
AdvancedESUG 2012 Ghent
Aug 30, 2012
Thursday, August 30, 12
Seaside 2.x
Seaside
Thursday, August 30, 12
Seaside 3.x
Core
SessionComponent
Javascript
JQuery
Thursday, August 30, 12
What is Seaside-Core
• “Seaside Meta”
• Web Framework Framework
• HTTP Abstraction
• Servlet API
• Rack
• WSGI
Thursday, August 30, 12
Why Seaside-Core
• portable (dialect and server)
• battle tested
• objects, not strings
• familiar objects
• negligible overhead
Thursday, August 30, 12
Seaside 3.x
Core
Component
Thursday, August 30, 12
Seaside 3.x
Core
Component REST
Thursday, August 30, 12
Seaside 3.x
Core
Component REST …
Thursday, August 30, 12
WARequestHandler
RH
Request
Response
Thursday, August 30, 12
WARequestHandler
RH RH RH
/esug /2012/conferences
Thursday, August 30, 12
WARequestFilter
RH
Thursday, August 30, 12
WASession 2.8
• current request
• jump to
• last continuation
• continuations
• monitor
• …
Thursday, August 30, 12
WASession 3.x
• continuations
• properties
• (document handlers)
Thursday, August 30, 12
WARequestContext
• request
• response
• handler stack
Thursday, August 30, 12
Request Handler Stack
1 2 3
1
2
1
2
1
3
Thursday, August 30, 12
WAPathConsumer
RH RH RH
/conferences/esug/2012/…
/esug/2012/… /2012/… /…
Thursday, August 30, 12
WADispatcher
‘conferences’ -> aRequestHandler ‘sponsors’ -> aRequestHandler ‘…’ -> aRequestHanlder
Thursday, August 30, 12
WASeverAdapter
SAWARequest
WARespone
RHXXRequest
XXRespone
provides template methods for convertingprovides start and stop hooksprovides easy integration with server manager UIyou don’t have to use itsets up request context
WARequestContext
Thursday, August 30, 12
Franka micro framework inspired by Sinatra
Thursday, August 30, 12
Seaside-REST
Thursday, August 30, 12
Disclaimer
• REST in this context simply means “pretty URLs”
• pretty URLs for web services, not web applications
• this will feel a little weird
Thursday, August 30, 12
index <get> ^ ‘Hello World’
Thursday, August 30, 12
index <get> <path: ‘index.html’> ^ ‘Hello World’
Thursday, August 30, 12
indexHtml <get> <path: ‘index’> <produces: ‘text/html’> ^ ‘<h1>Hello World</h1>’
Accept: text/html
Thursday, August 30, 12
indexXml <get> <path: ‘index’> <produces: ‘text/xml’> ^ ‘<hello><world/></hello>’
Accept: text/xml
Thursday, August 30, 12
uploadXml <post> <consumes: ‘text/xml’> …
Content-Type: text/xml
Thursday, August 30, 12
uploadCsv <post> <consumes: ‘text/csv’> …
Content-Type: text/csv
Thursday, August 30, 12
getAllStartingAt: start limit: limit named: name <get> <path: ‘/{name}/_all_docs?start={start}&limit={limit}’> ...
Thursday, August 30, 12
#shouldCacheRoutes
Thursday, August 30, 12
WARestfulComponentFilter
count: count <get> <path: '/{count}'> self startSessionWithRoot: (WACounter new count: count greaseInteger; yourself)
Thursday, August 30, 12
Data Binding
• XML or JSON canvas
• Magritte-XML
• Magritte-JSON
Thursday, August 30, 12
Dialects
• GemStone
• Pharo
• VAST
Thursday, August 30, 12
Seaside 3.1
Thursday, August 30, 12
Session Tracking Fully Customizable
• query fields
• cookie only
• cookie if supported, query field otherwise
• cookie for browser, IP for crawler
• SSL session id (*)
• path parameter (*)
Thursday, August 30, 12
Path Parameter
• /;_s=KAAWl0x3c6KLnN6Q
• doesn’t need to be hidden form parameter
• required by some load balancers
Thursday, August 30, 12
WAMain gone
• specify initial continuation
• subclass WASessionContinuation if you used to subclass WAMain
Thursday, August 30, 12
WAPluggableActionContinuation
• replace WAActionPhaseContinuation subclasses with WACallbackProcessingActionContinuation subclasses
Thursday, August 30, 12
JSON
• separate from JavaScript
• various subtle bugs fixed
• canvas API
Thursday, August 30, 12
Streaming Redone
• on demand flushing
• continuation that flushes after rendering </head>
• better portability to other servers
Thursday, August 30, 12
HTML 5
•#multipleValuesCallback:
Thursday, August 30, 12
Document Handlers
• stored in session
• no longer stored alongside sessions
• _d
Thursday, August 30, 12
Other News
• Nick now part of core team
• experimental Pharo 2.0 support
• walkback should open at correct place in VW
• platforms can implement optimized HTML escaping
Thursday, August 30, 12
Help Wanted
• Morphic Control panel for Pharo 2.0
Thursday, August 30, 12
Seaside Sprint
• Friday at Vooruit
• Saturday at Camp location
• (Sunday)
Thursday, August 30, 12
Seaside Sprint Sponsors
• Reza Razavi
• 2Rivers
Thursday, August 30, 12
Links
• https://github.com/marschall/esug-2012-presentation
• http://ss3.gemstone.com/ss/frank
• http://code.google.com/p/seaside/wiki/Seaside310Changelog
• http://book.seaside.st/book/advanced/restful
• http://code.google.com/p/seaside/wiki/SeasideRest
Thursday, August 30, 12