1 / 18

Seaside

Seaside. Web Application Toolkit for Squeak. Introduction. About us Lukas Renggli Adrian Lienhard Seaside Developers Avi Bryant Julian Fitzell. users of the Seaside framework. Content. What can be done with Seaside? Example Application: SWebMail Reading mailbox form POP account

baba
Download Presentation

Seaside

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Seaside Web Application Toolkitfor Squeak

  2. Introduction • About us • Lukas Renggli • Adrian Lienhard • Seaside Developers • Avi Bryant • Julian Fitzell users of the Seaside framework

  3. Content • What can be done with Seaside? • Example Application: SWebMail • Reading mailbox form POP account • Sending e-mails over SMTP server • Why should Seaside be used? • Complete separation of logic and design • Program object-oriented on the run • Application control flow • Why is Seaside so simple? • Action methods • Bidirectional binding of properties • Session management

  4. Component-Template Model

  5. Reuse by Composition • Component architecture • Widgets • Tab sheet • Date selector • Batches • Sortable tables • Dialogs • Information • Confirmation • Choose • Ask

  6. Separation of Logic and Design • Programmers should create logic • Designers should create HTML M V C IAComponent ViewController +html() +actionMethod() Model

  7. Creation of Templates • Override IAComponent>>html • a string containing valid HTML • array literals describing the page SWebMail>>html^ '<html><head><title>SWebMail</title><style type="text/css">[css]</style></head> <body> <h1>SWebMail</h1> <swebmailloginsea:id="login"></swebmaillogin></body></html>' V • External files • WYSIWYG editors • Designers can work independently

  8. Binding of Properties • Unidirectional binding SWebMailView>>html^ '... <tr> <td>Subject:</td> <td>[message.subject]</td> </tr> ...' V • Bidirectional binding SWebMailCompose>>html^ '...<form sea:id="reload"><input type="text" sea:id="subject">...' SWebMailCompose>>subject^ subject ifNil: [ subject := String new ] SWebMailCompose>>subject: aStringsubject := aString V C

  9. Template Local Variables • Looking up sequence of properties • Template Locals • Accessor methods • Instance variables SWebMailInbox>>html^ '... <tr sea:id="item/sortedmessages"> <td>[item.subject]</td> <td>[item.formAddress]</td> ...' V

  10. Action Methods • Modify the component's state • Message is executed • Same component is redisplayed • The action method might also • Expect a parameter • Replace the current component at runtime • Throw an exception: a stack-dump will be sent to the browser SWebMailMain>>html^ '... <a href="@about">About</a> ...' SWebMailMain>>aboutself callPage: (SWebMailAbout new) V C

  11. Application Control Flow • Common way • Manual stack handling • Difficult to implement • Error prone 1: goto 2: goto 3: goto Login Inbox View Reply • Seaside • Transforms traditional Smalltalk send/return control flow onto the web • Supports • Backtracking (back button) • Transactions (full blocks)

  12. Application Control Flow • Call sub pages with message: #callPage: aComponent • Return result with message: #return: aValue Reply 4: #callPage: 5: #return View 3: #callPage: 6: #return Inbox 1: #callPage: 7: #confirm: 8: #return: Dialog Login C 2: #return:

  13. IASession SWebMailSession SWebMailPreferences Session Management • Seaside manages and caches all needed session data automatically • Each session has its own set of objects • Caches: LRU, Expiring, ... • Example: IASession is subclassed to • Store the user-preferences • Login and logout handling

  14. Goodies • Web-based inspector • Profiler • Configuration tools

  15. Seaside 2.0 (Borges) • Full reimplementation • Supports a wider set of styles • Layered design Borges-Components Control flow between pages Safe backtracking Component embedding Borges-Support Callback system HTML renderer Borges-Kernel HTTP session Request Response

  16. Comparison

  17. Summary • Seaside: Squeak Enterprise Aubergines Server • Developers: Avi Bryant, Julian Fitzell • Current Version: 0.94.1 • License: Squeak-L, BSD • Works best with • Squeak 3.0, 3.1, 3.2 • Comanche 4.9, 4.10 • Windows, Mac OS X, Linux, SUN Unix, ... • Ports underway • Dolphin Smalltalk • VisualWorks

  18. References • Seaside • Homepagehttp://www.beta4.com/seaside • Seaside 2.0 (Borges) • Documentationhttp://beta4.com/squeak/aubergines/docs/seaside/borges.html • Downloadhttp://beta4.com/squeak/aubergines/source/Borges.st • SWebMail • Homepagehttp://renggli.freezope.org/programming/smalltalk/swebmail • Running Serverhttp://aurora.unibe.ch:8080/seaside/swebmail

More Related