• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Seaside
 

Seaside

on

  • 1,115 views

Seaside ESUG 2002, Douai, France.

Seaside ESUG 2002, Douai, France.

Statistics

Views

Total Views
1,115
Views on SlideShare
1,115
Embed Views
0

Actions

Likes
0
Downloads
2
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

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

    Seaside Seaside Presentation Transcript

    • ESUG 2002 Seaside Seaside Web Application Toolkit for Squeak Lukas Renggli, Adrian Lienhard Sheet #1
    • ESUG 2002 Seaside Introduction Ø About us • Lukas Renggli users of the Seaside framework • Adrian Lienhard Ø Seaside Developers • Avi Bryant • Julian Fitzell Lukas Renggli, Adrian Lienhard Sheet #2
    • ESUG 2002 Seaside 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 • Object-oriented programming on the fly • Application control flow Ø Why is Seaside so easy to use? • Action methods • Bidirectional binding of properties • Session management • … Lukas Renggli, Adrian Lienhard Sheet #3
    • ESUG 2002 Seaside Component-Template Model SWebMail SWebMailInbox SWebMailMain Server (Seaside) Seaside ... IAComponent ... +html() Client SWebMail SWebMailMain SWebMailInbox (Web Browser) +html() +html() +html() Lukas Renggli, Adrian Lienhard Sheet #4
    • ESUG 2002 Seaside Reuse by Composition Ø Component architecture Ø Widgets • Tab sheet • Date selector • Batches • Sortable tables Ø Dialogs • Information • Confirmation • Choose • Ask Lukas Renggli, Adrian Lienhard Sheet #5
    • ESUG 2002 Seaside Separation of Logic and Design Ø Programmers should create logic Ø Designers should create HTML (templates) M V C IAComponent ViewController +html() Model +actionMethod() Lukas Renggli, Adrian Lienhard Sheet #6
    • ESUG 2002 Seaside Creation of Templates Ø Override IAComponent>>html and return • a string containing valid HTML SWebMail>>html ^ '<html> <head> V <title>SWebMail</title> <style type="text/css">[css]</style> </head> <body> <h1>SWebMail</h1> <swebmaillogin sea:id="login"></swebmaillogin> </body> </html>' Ø External files • WYSIWYG editors • Designers can work independently Lukas Renggli, Adrian Lienhard Sheet #7
    • ESUG 2002 Seaside Binding of Properties Ø Unidirectional binding SWebMailView>>html ^ '... <tr> V <td>Subject:</td> <td>[message.subject]</td> </tr> ...' Ø Bidirectional binding SWebMailCompose>>html ^ '... <form sea:id="reload"> V <input type="text" sea:id="subject"> ...' C SWebMailCompose>>subject ^ subject ifNil: [ subject := String new ] SWebMailCompose>>subject: aString subject := aString Lukas Renggli, Adrian Lienhard Sheet #8
    • ESUG 2002 Seaside Template-Variable Look Up Ø Looking up sequence of properties • Template Locals • Accessor methods • Instance variables SWebMailInbox>>html ^ '... V <tr sea:id="item/sortedmessages"> <td>[item.subject]</td> <td>[item.fromAddress]</td> ...' Lukas Renggli, Adrian Lienhard Sheet #9
    • ESUG 2002 Seaside 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 ^ '... V <a href="@about">About</a> ...' C SWebMailMain>>about self callPage: (SWebMailAbout new) Lukas Renggli, Adrian Lienhard Sheet #10
    • ESUG 2002 Seaside 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) Lukas Renggli, Adrian Lienhard Sheet #11
    • ESUG 2002 Seaside Application Control Flow Ø Call pages with message: IAComponent>>callPage: aComponent Ø Return result from page with message: IAComponent>>return: aValue 4: #callPage: Reply 5: #return 3: #callPage: View 6: #return Inbox 1: #callPage: 7: #confirm: 8: #return: Login Dialog C 2: #return: Lukas Renggli, Adrian Lienhard Sheet #12
    • ESUG 2002 Seaside 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 IASession SWebMailSession SWebMailPreferences Lukas Renggli, Adrian Lienhard Sheet #13
    • ESUG 2002 Seaside Goodies Ø Web-based inspector Ø Profiler Ø Configuration tools Lukas Renggli, Adrian Lienhard Sheet #14
    • ESUG 2002 Seaside 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 Lukas Renggli, Adrian Lienhard Sheet #15
    • ESUG 2002 Seaside Comparison Seaside Zope Language Smalltalk Python OOP Complete Partly Reuse Heavily Possible Separation Yes No, but ZPT Control Flow Message calling Request, Response Debugging WebInspector Difficult Database (Seashell), GOODS, ZODB, PostgreSQL, Tantalus, ODBC, ... MySQL, ODBC, ... Large Systems Not tested Possible Integration Apache Apache Lukas Renggli, Adrian Lienhard Sheet #16
    • ESUG 2002 Seaside 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 Lukas Renggli, Adrian Lienhard Sheet #17
    • ESUG 2002 Seaside References Ø Seaside • Homepage http://www.beta4.com/seaside Ø Seaside 2.0 (Borges) • Documentation http://beta4.com/squeak/aubergines/docs/seaside/borges.html • Download http://beta4.com/squeak/aubergines/source/Borges.st Ø SWebMail • Homepage http://renggli.freezope.org/programming/smalltalk/swebmail • Running Server http://aurora.unibe.ch:8080/seaside/swebmail Lukas Renggli, Adrian Lienhard Sheet #18