ESUG 2002                                   Seaside




                                 Seaside



               Web App...
ESUG 2002                                                        Seaside



                                 Introduction
...
ESUG 2002                                            Seaside



                                 Content
  Ø What can be d...
ESUG 2002                                                              Seaside



  Component-Template Model

            ...
ESUG 2002                            Seaside



             Reuse by Composition
  Ø Component architecture
  Ø Widgets
 ...
ESUG 2002                                                  Seaside



                  Separation of Logic
              ...
ESUG 2002                                                      Seaside



             Creation of Templates
  Ø Override ...
ESUG 2002                                           Seaside


                   Binding of Properties
 Ø Unidirectional b...
ESUG 2002                                     Seaside



    Template-Variable Look Up
  Ø Looking up sequence of properti...
ESUG 2002                                                Seaside



                         Action Methods
  Ø Modify the...
ESUG 2002                                                               Seaside



         Application Control Flow
  Ø C...
ESUG 2002                                                                               Seaside



         Application Co...
ESUG 2002                                            Seaside



               Session Management
  Ø Seaside manages and ...
ESUG 2002                                    Seaside



                                 Goodies
  Ø Web-based inspector
 ...
ESUG 2002                                                       Seaside



               Seaside 2.0 (Borges)
  Ø Full re...
ESUG 2002                                                           Seaside



                                 Comparison...
ESUG 2002                                                         Seaside



                                 Summary
  Ø ...
ESUG 2002                                                            Seaside



                                 Reference...
Upcoming SlideShare
Loading in …5
×

Seaside

1,108 views

Published on

Seaside ESUG 2002, Douai, France.

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
1,108
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Seaside

  1. 1. ESUG 2002 Seaside Seaside Web Application Toolkit for Squeak Lukas Renggli, Adrian Lienhard Sheet #1
  2. 2. 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
  3. 3. 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
  4. 4. 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
  5. 5. 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
  6. 6. 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
  7. 7. 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
  8. 8. 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
  9. 9. 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
  10. 10. 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
  11. 11. 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
  12. 12. 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
  13. 13. 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
  14. 14. ESUG 2002 Seaside Goodies Ø Web-based inspector Ø Profiler Ø Configuration tools Lukas Renggli, Adrian Lienhard Sheet #14
  15. 15. 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
  16. 16. 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
  17. 17. 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
  18. 18. 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

×