Seaside
This presentation is the property of its rightful owner.
Sponsored Links
1 / 18

Seaside PowerPoint PPT Presentation


  • 168 Views
  • Uploaded on
  • Presentation posted in: General

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

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Seaside

Seaside

Web Application Toolkitfor Squeak


Introduction

Introduction

  • About us

    • Lukas Renggli

    • Adrian Lienhard

  • Seaside Developers

    • Avi Bryant

    • Julian Fitzell

users of the Seaside framework


Content

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


Component template model

Component-Template Model


Reuse by composition

Reuse by Composition

  • Component architecture

  • Widgets

    • Tab sheet

    • Date selector

    • Batches

    • Sortable tables

  • Dialogs

    • Information

    • Confirmation

    • Choose

    • Ask


Separation of logic and design

Separation of Logic and Design

  • Programmers should create logic

  • Designers should create HTML

M

V

C

IAComponent

ViewController

+html()

+actionMethod()

Model


Creation of templates

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


Binding of properties

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


Template local variables

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


Action methods

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


Application control flow

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)


Application control flow1

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:


Session management

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


Goodies

Goodies

  • Web-based inspector

  • Profiler

  • Configuration tools


Seaside 2 0 borges

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


Comparison

Comparison


Summary

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


References

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


  • Login