SlideShare une entreprise Scribd logo
1  sur  65
5. Seaside
Birds-eye view
© Oscar Nierstrasz
ST — Introduction
1.2
Model your domain with objects — model
domain components as objects. Compose objects, not
text. Strive for fluent interfaces. Build applications by
scripting components.
Model your domain with objects — model
domain components as objects. Compose objects, not
text. Strive for fluent interfaces. Build applications by
scripting components.
Lukas Renggli and Marcus Denker
ST — Seaside
5.3
Roadmap
> Introduction
— Web applications / Overview
— Installation
> Control Flow
> Components
> Composition
Original lecture notes by Lukas Renggli
Lukas Renggli and Marcus Denker
ST — Seaside
5.4
Roadmap
> Introduction
— Web applications / Overview
— Installation
> Control Flow
> Components
> Composition
Lukas Renggli and Marcus Denker
ST — Seaside
5.5
Introduction: Web Applications
Example: Adding two numbers
Lukas Renggli and Marcus Denker
ST — Seaside
5.6
What is going on?
<form action=“second.html”>
<input type=“text” name=“value1”>
<input type=“submit” name=“OK”>
</form>
<form action=“result.html”>
<input type=“hidden”
name=“value1” value=“<% value1 %>”>
</form>
<p>
<% value1 + value2 %>
</p>
first.html
second.html
result.html
Lukas Renggli and Marcus Denker
ST — Seaside
5.7
Control Flow:
HTTP request-response
User:
Web browser
first.html
second.html
GET first.html
<a href=”second.html?number1=...”
GET second.html?number1=...
<a href=”result.html?number1=...&number2=...”
Lukas Renggli and Marcus Denker
ST — Seaside
5.8
Something is wrong…
> Control-flow quite arcane
— Remember GOTO?
— We do not care about HTTP!
> How to debug that?
> And what about
— Back button?
— Copy of URL (second browser)?
Lukas Renggli and Marcus Denker
ST — Seaside
5.9
What we want
> Why not this?
go
|number1 number2 |
number1 := self request: ‘First Number’.
number2 := self request: ‘Second Number’.
self inform: ‘The result is ‘,
(number1 + number2) asString
Lukas Renggli and Marcus Denker
ST — Seaside
5.10
Seaside: Features
> Sessions as continuous piece of code
> XHTML/CSS building
> Callback based event model
> Composition and reuse
> Debugging and Development tools
Lukas Renggli and Marcus Denker
ST — Seaside
5.11
XHTML Building
html div id: ‘title’; with: ‘Title’
html div id: ‘list’; with: [
html span class: ‘item’; with: ‘Item 1’.
html span class: ‘item’; with: ‘Item 2’.
]
<div id=“title”>Title</div>
<div if=“list”>
<span class=“item”>Item 1</span>
<span class=“item”>Item 2</span>
</div>
Lukas Renggli and Marcus Denker
ST — Seaside
5.12
CSS
> CSS Zengarden: http://csszengarden.com
Lukas Renggli and Marcus Denker
ST — Seaside
5.13
Callback Event Model
Example3>>renderContentOn: html
html form: [
html submitButton
callback: [ self inform: ‘Hello’ ];
text: ‘Say Hello’ ]
....
<form action="/seaside/example2" method="post">
<input type="hidden" name="_s" value="JBbTXBnPaTLOjcjI" class="hidden"/>
<input type="hidden" name="_k" value="FFQrpnBg" class="hidden" />
<input type="submit" name="1" value="Say Hello" class="submit" />
</form>
....
Lukas Renggli and Marcus Denker
ST — Seaside
5.14
Composition + Reuse
Example:
Multicounter
More later!
Lukas Renggli and Marcus Denker
ST — Seaside
5.15
Examples
Lukas Renggli and Marcus Denker
ST — Seaside
5.16
Example: dabbledb.com
Example: auctomatic.com
© Oscar Nierstrasz
ST — Seaside
17
Lukas Renggli and Marcus Denker
ST — Seaside
5.18
Example: cmsbox.com
Lukas Renggli and Marcus Denker
ST — Seaside
5.19
Roadmap
> Introduction
— Web applications / Overview
— Installation
> Control Flow
> Components
> Composition
Installing Seaside
Lukas Renggli and Marcus Denker
ST — Seaside
5.20
Download the one-click image from http://seaside.st/
Lukas Renggli and Marcus Denker
ST — Seaside
5.21
Seaside
http://localhost:8080/seaside
> Introduction
— Web applications / Overview
— Installation
> Control Flow
> Components
> Composition
Lukas Renggli and Marcus Denker
ST — Seaside
5.22
Roadmap
Lukas Renggli and Marcus Denker
ST — Seaside
5.23
2. Control Flow
> Defining control flow
> Convenience methods
> Call / Answer
> Transactions
Lukas Renggli and Marcus Denker
ST — Seaside
5.24
Defining Flow
> Create a subclass of WATask
— Implement the method #go
— Split the method #go into smaller parts to ensure readability
> Tasks are a special kind of component
— No visual representation
— Define a logical flow (#go)
— Call other components for output
Lukas Renggli and Marcus Denker
ST — Seaside
5.25
Convenience Methods
> #inform: aString
> #confirm: aString
> #request: aString
> #request:label:default:
> #chooseFrom:caption:
Lukas Renggli and Marcus Denker
ST — Seaside
5.26
Call and Answer
> #call: aComponent
— Transfer control to aComponent
> #answer: anObject
— anObject will be returned from #call:
— Receiving component will be removed
Lukas Renggli and Marcus Denker
ST — Seaside
5.27
Call and Answer
Client
aA
aB
aA
Server
A>>go
x := self call: B new.
x asString.
B>>go
…
self answer: 77.
A>>go
x := self call: B new.
x astring.
-> 77
Lukas Renggli and Marcus Denker
ST — Seaside
5.28
Transactions
> Sometimes it is required to prevent the user from going
back within a flow
> Calling #isolate: treats the flow defined in the block as a
transaction
> Users are able to move back and forth within the
transaction, but once completed, they cannot go back
anymore
Lukas Renggli and Marcus Denker
ST — Seaside
5.29
Example for #isolate:
self isolate: [
self doShopping.
self collectPaymentInfo].
Self showConfirmation.
> Introduction
— Web applications / Overview
— Installation
> Control Flow
> Components
> Composition
Lukas Renggli and Marcus Denker
ST — Seaside
5.30
Roadmap
Lukas Renggli and Marcus Denker
ST — Seaside
5.31
3. Components
> Rendering
— XHTML
— CSS
> Callbacks
— Anchor
— Form
> Customization
Lukas Renggli and Marcus Denker
ST — Seaside
5.32
Components
> Components are the Views (and Controllers) of Seaside
applications.
> Components keep their state (model and state of user-
interface) in instance-variables.
> Components define the visual appearance and handle
user interactions
Lukas Renggli and Marcus Denker
ST — Seaside
5.33
Building Components
> Components are created by subclassing WAComponent
> Add instance-variables to hold your model and user-
interface state
> Put view related methods in a category called rendering
> Put controller related methods into method categories
named accessing, actions, private
Lukas Renggli and Marcus Denker
ST — Seaside
5.34
Rendering
> XHTML is built programmatically.
> This process is called rendering.
> Create a method called #renderContentOn:
SomeComponent>>renderContentOn: html
html text: ‘Hello World’
Lukas Renggli and Marcus Denker
ST — Seaside
5.35
Text Rendering
> Render a string:
> Render an un-escaped string:
> Render any object (using double dispatch):
html text: ‘My Text’
html html: ‘<foo>Zork</foo>’
html render: 1
Lukas Renggli and Marcus Denker
ST — Seaside
5.36
Canvas and Brushes
> html parameter is instance of WARenderCanvas
— Basic html output
— Render logic
> Canvas provides brushes
— For rendering html tags
Lukas Renggli and Marcus Denker
ST — Seaside
5.37
Basic Brushes
> Render a new line <br />:
> Render a horizontal Rule <hr />:
> Render a non-breaking space &nbsp;:
html break.
html horizontalRule.
html space.
Lukas Renggli and Marcus Denker
ST — Seaside
5.38
Using Brushes
1. Ask the canvas for a div brush
2. Configure the brush, e.g. set attributes
3. Render the contents of the tag-brush:
html div.
html div class: ‘beautiful’.
html div
class: ‘beautiful’;
with: ‘Hello World’.
Lukas Renggli and Marcus Denker
ST — Seaside
5.39
Painting with Brushes
html div
html div
class: ‘beautiful’
html div
class: ‘beautiful’;
with: ‘Hello World’.
<div></div>
<div class=“beautiful”>
</div>
<div class=“beautiful”>
Hello World
</div>
Seaside XHTML
Lukas Renggli and Marcus Denker
ST — Seaside
5.40
Nesting Brushes
> Render a text in bold:
> Render a text in italic
> Render a text in bold and italic:
html strong with: ‘My Text’.
html emphasis with: ‘My Text’.
html strong with: [
html emphasis with: ‘My Text’].
Lukas Renggli and Marcus Denker
ST — Seaside
5.41
Nesting Brushes
> To nest brushes use the message #with:.
> Always send #with: as the last message in the
configuration cascade.
> The argument of #with: is rendered using double-
dispatch, therefore any object can be passed as an
argument.
> To nest tags, pass a block that renders the elements to
nest.
Lukas Renggli and Marcus Denker
ST — Seaside
5.42
Nesting Brushes
> Render nested divs:
> Render a list:
html div id: ‘frame’; with: [
html div id: ‘contents’; with: …
html div id: ‘sidebar’; with: … ].
html orderedList with: [
html listItem with: …
html listItem with: … ].
Lukas Renggli and Marcus Denker
ST — Seaside
5.43
Rendering Pitfalls I
> Don’t change the state of the application while
rendering, unless you have a really good reason to do
so.
> Rendering is a read-only phase.
> Don’t put all your rendering code into a single method.
Split it into small parts and choose a method name
following the pattern #render*On:
Lukas Renggli and Marcus Denker
ST — Seaside
5.44
Rendering Pitfalls II
> Rendering is a read-ony phase.
— Don’t send #renderContentOn: from your own code, use
#render: instead.
— Don’t send #call: and #answer: while rendering
> Always use #with: as the last message in the
configuration cascade of your brush
Lukas Renggli and Marcus Denker
ST — Seaside
5.45
Anchor Callback
> Ask the rendering canvas for an anchor and configure it
with a callback-block:
> The callback-block is cached and will be executed later.
html anchor
callback: [self someAction];
with: ‘Some Action’].
Lukas Renggli and Marcus Denker
ST — Seaside
5.46
Anchor Example
WACounter>>renderContentOn: html
html heading
level: 1;
with: self count.
html anchor
callback: [self increase];
with: ‘++’.
html space.
html anchor
callback: [self decrease];
with: ‘--’.
Lukas Renggli and Marcus Denker
ST — Seaside
5.47
Forms
> Render a form around your form elements:
> Put the Form elements inside the form:
html form: [
html textInput
value: text;
callback: [:value | text := value].
html submitButton ].
html form: [ … ]
Lukas Renggli and Marcus Denker
ST — Seaside
5.48
More Brushes with Callbacks..
> Text Input / Text Area
> Submit Button
> Check-Box
> Radio Group
> Select List
> File-Upload
Have a look at the functional tests!
Lukas Renggli and Marcus Denker
ST — Seaside
5.49
Register new Component / Task
> Create method #canBeRoot returning true on class
side
> Register using Seaside configuration interface.
> Or call #registerAsApplication: in the class-side
#initialize
> Introduction
— Web applications / Overview
— Installation
> Control Flow
> Components
> Composition
Lukas Renggli and Marcus Denker
ST — Seaside
5.50
Roadmap
Lukas Renggli and Marcus Denker
ST — Seaside
5.51
4. Compositon
> Backtracking
> Subcomponents
> Widgets
Lukas Renggli and Marcus Denker
ST — Seaside
5.52
Backtracking State
> Seaside does not backtrack state by default.
> Often it is not obvious whether an object should be
backtracked or not. Mostly this has to be decided by the
developer on a per-object basis.
> Any object can be declared to be backtracked.
Lukas Renggli and Marcus Denker
ST — Seaside
5.53
Shopping Cart Problem
> Online Bookstore (without backtracking)
— When using the back-button, usually the items should not be
removed from the cart; just resume browsing from the old
location.
> Flight Reservation System (with backtracking)
— When using the back-button, usually you want to check other
flights, this means the selected flight should be removed.
Lukas Renggli and Marcus Denker
ST — Seaside
5.54
Register Object
> Implement method #states that returns an Array that
contains your object.
> This will backtrack the instance-variables of the objects,
not the objects themselves
SomeComponent>>#states
^ Array with: model.
Lukas Renggli and Marcus Denker
ST — Seaside
5.55
Subcomponents
> It is common for a component to display instances of
other components.
> Components can be nested into each other using the
composite pattern.
> A subcomponent is displayed using the method
#render: on the canvas.
Lukas Renggli and Marcus Denker
ST — Seaside
5.56
Initialize Children
> Subcomponents are usually stored within instance
variables of the parent component.
> Subcomponents are commonly created lazily or as part
of the components #initialize method.
SomeComponent>>initialize
super initialize.
counter := WACounter new.
Lukas Renggli and Marcus Denker
ST — Seaside
5.57
Enable Children
> Parent Components must implement a #children
method returning a collection of subcomponents that
they might display.
> If you fail to specify #children correctly, Seaside will
raise an exception.
SomeComponent>>children
^ Array with: counter
Lukas Renggli and Marcus Denker
ST — Seaside
5.58
Render Children
> Children are rendered by sending the message
#render: to the rendering canvas.
> Never directly send #renderContentOn: to the
subcomponent.
SomeComponent>>renderContentOn: html
html heading level: 1; with: ‘My Counter’.
html render: counter.
Lukas Renggli and Marcus Denker
ST — Seaside
5.59
Widgets
> Components can be reused in different contexts within
different applications.
> Seaside is shipped with a small collection of widgets
ready to use.
> Load and use widgets that have been developed by the
Seaside community.
> Write your own widgets that exactly fit your needs
Widgets: Examples
Lukas Renggli and Marcus Denker
ST — Seaside
5.60
Have a look at the classes in
Seaside-Components-Widgets
Batched List
Tab Panel
Calendar
Lukas Renggli and Marcus Denker
ST — Seaside
5.61
Custom Widgets
> Create a new component.
> Add methods to specify domain-model, subcomponents,
properties…
> Assign CSS names/classes to make it skinnable with
css style-sheet.
— Implement method #style to return CSS for component
> Write tests and small example applications.
Lukas Renggli and Marcus Denker
ST — Seaside
5.62
There is more..
> Development Tools
— Demo in the Exercise Session (Halo, Configuration…)
— Debugging: Next Lecture
> Javascript: Prototype, script.aculo.us, jQuery, jQueryUI
> Persistency (Databases)
Lukas Renggli and Marcus Denker
ST — Seaside
5.63
Summary
Lukas Renggli and Marcus Denker
ST — Seaside
5.64
Literature
> Dynamic Web Development with Seaside
— http://book.seaside.st/book
> HPI Seaside Tutorial:
— http://www.swa.hpi.uni-potsdam.de/seaside/tutorial
> Articles:
— “Seaside — a Multiple Control Flow Web Application Framework.”
— “Seaside: A Flexible Environment for Building Dynamic Web
Applications”
— http://scg.unibe.ch/scgbib?query=seaside-article
> …. more at http://seaside.st
© Oscar Nierstrasz
ST — Introduction
1.65
Attribution-ShareAlike 3.0 Unported
You are free:
to Share — to copy, distribute and transmit the work
to Remix — to adapt the work
Under the following conditions:
Attribution. You must attribute the work in the manner specified by the author or
licensor (but not in any way that suggests that they endorse you or your use of the
work).
Share Alike. If you alter, transform, or build upon this work, you may distribute the
resulting work only under the same, similar or a compatible license.
For any reuse or distribution, you must make clear to others the license terms of this work.
The best way to do this is with a link to this web page.
Any of the above conditions can be waived if you get permission from the copyright holder.
Nothing in this license impairs or restricts the author's moral rights.
License
http://creativecommons.org/licenses/by-sa/3.0/

Contenu connexe

En vedette (20)

Stoop 301-internal objectstructureinvw
Stoop 301-internal objectstructureinvwStoop 301-internal objectstructureinvw
Stoop 301-internal objectstructureinvw
 
Stoop ed-lod
Stoop ed-lodStoop ed-lod
Stoop ed-lod
 
Stoop 440-adaptor
Stoop 440-adaptorStoop 440-adaptor
Stoop 440-adaptor
 
Stoop sed-smells
Stoop sed-smellsStoop sed-smells
Stoop sed-smells
 
Stoop sed-sharing ornot
Stoop sed-sharing ornotStoop sed-sharing ornot
Stoop sed-sharing ornot
 
09 metaclasses
09 metaclasses09 metaclasses
09 metaclasses
 
03 standardclasses
03 standardclasses03 standardclasses
03 standardclasses
 
Stoop 423-some designpatterns
Stoop 423-some designpatternsStoop 423-some designpatterns
Stoop 423-some designpatterns
 
Stoop ed-dual interface
Stoop ed-dual interfaceStoop ed-dual interface
Stoop ed-dual interface
 
Stoop 434-composite
Stoop 434-compositeStoop 434-composite
Stoop 434-composite
 
Stoop ed-some principles
Stoop ed-some principlesStoop ed-some principles
Stoop ed-some principles
 
Double Dispatch
Double DispatchDouble Dispatch
Double Dispatch
 
12 - Conditions and Loops
12 - Conditions and Loops12 - Conditions and Loops
12 - Conditions and Loops
 
15 - Streams
15 - Streams15 - Streams
15 - Streams
 
Stoop 390-instruction stream
Stoop 390-instruction streamStoop 390-instruction stream
Stoop 390-instruction stream
 
Stoop ed-class forreuse
Stoop ed-class forreuseStoop ed-class forreuse
Stoop ed-class forreuse
 
Stoop metaclasses
Stoop metaclassesStoop metaclasses
Stoop metaclasses
 
Stoop sed-class initialization
Stoop sed-class initializationStoop sed-class initialization
Stoop sed-class initialization
 
Stoop ed-frameworks
Stoop ed-frameworksStoop ed-frameworks
Stoop ed-frameworks
 
10 - OOP - Inheritance (b)
10 - OOP - Inheritance (b)10 - OOP - Inheritance (b)
10 - OOP - Inheritance (b)
 

Similaire à 05 seaside

5 Steps to Mastering the Art of Seaside
5 Steps to Mastering the Art of Seaside5 Steps to Mastering the Art of Seaside
5 Steps to Mastering the Art of SeasideLukas Renggli
 
Seaside
SeasideSeaside
SeasideESUG
 
Our application got popular and now it breaks
Our application got popular and now it breaksOur application got popular and now it breaks
Our application got popular and now it breaksColdFusionConference
 
Our application got popular and now it breaks
Our application got popular and now it breaksOur application got popular and now it breaks
Our application got popular and now it breaksdevObjective
 
Unanticipated Partial Behavioral Reflection
Unanticipated Partial Behavioral ReflectionUnanticipated Partial Behavioral Reflection
Unanticipated Partial Behavioral ReflectionESUG
 
RedisConf18 - Writing modular & encapsulated Redis code
RedisConf18 - Writing modular & encapsulated Redis codeRedisConf18 - Writing modular & encapsulated Redis code
RedisConf18 - Writing modular & encapsulated Redis codeRedis Labs
 
Cw comp1640 211453_mo233_20131120_214054_1314
Cw comp1640 211453_mo233_20131120_214054_1314Cw comp1640 211453_mo233_20131120_214054_1314
Cw comp1640 211453_mo233_20131120_214054_1314Owen Muzi
 
SQL Bits: Containers and Clones
SQL Bits: Containers and ClonesSQL Bits: Containers and Clones
SQL Bits: Containers and ClonesAlex Yates
 
SQL Sever on Docker: Database Containers 3 Ways
SQL Sever on Docker: Database Containers 3 WaysSQL Sever on Docker: Database Containers 3 Ways
SQL Sever on Docker: Database Containers 3 WaysElton Stoneman
 
Developers’ mDay 2021: Andrea Bjelogrlić, Sysbee – Tips, tricks and debugging...
Developers’ mDay 2021: Andrea Bjelogrlić, Sysbee – Tips, tricks and debugging...Developers’ mDay 2021: Andrea Bjelogrlić, Sysbee – Tips, tricks and debugging...
Developers’ mDay 2021: Andrea Bjelogrlić, Sysbee – Tips, tricks and debugging...mCloud
 
Troubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support EngineerTroubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support EngineerJeff Anderson
 
Troubleshooting Tips from a Docker Support Engineer - Jeff Anderson, Docker
Troubleshooting Tips from a Docker Support Engineer - Jeff Anderson, DockerTroubleshooting Tips from a Docker Support Engineer - Jeff Anderson, Docker
Troubleshooting Tips from a Docker Support Engineer - Jeff Anderson, DockerDocker, Inc.
 
Development workflow guide for building docker apps
Development workflow guide for building docker appsDevelopment workflow guide for building docker apps
Development workflow guide for building docker appsAbdul Khan
 
Development workflow guide for building docker apps
Development workflow guide for building docker appsDevelopment workflow guide for building docker apps
Development workflow guide for building docker appsAbdul Khan
 

Similaire à 05 seaside (20)

Lecture: Seaside
Lecture: SeasideLecture: Seaside
Lecture: Seaside
 
5 Steps to Mastering the Art of Seaside
5 Steps to Mastering the Art of Seaside5 Steps to Mastering the Art of Seaside
5 Steps to Mastering the Art of Seaside
 
Seaside
SeasideSeaside
Seaside
 
Our application got popular and now it breaks
Our application got popular and now it breaksOur application got popular and now it breaks
Our application got popular and now it breaks
 
Our application got popular and now it breaks
Our application got popular and now it breaksOur application got popular and now it breaks
Our application got popular and now it breaks
 
Unanticipated Partial Behavioral Reflection
Unanticipated Partial Behavioral ReflectionUnanticipated Partial Behavioral Reflection
Unanticipated Partial Behavioral Reflection
 
Terrific Frontends
Terrific FrontendsTerrific Frontends
Terrific Frontends
 
RedisConf18 - Writing modular & encapsulated Redis code
RedisConf18 - Writing modular & encapsulated Redis codeRedisConf18 - Writing modular & encapsulated Redis code
RedisConf18 - Writing modular & encapsulated Redis code
 
code-camp-meteor
code-camp-meteorcode-camp-meteor
code-camp-meteor
 
DSL101
DSL101DSL101
DSL101
 
Cw comp1640 211453_mo233_20131120_214054_1314
Cw comp1640 211453_mo233_20131120_214054_1314Cw comp1640 211453_mo233_20131120_214054_1314
Cw comp1640 211453_mo233_20131120_214054_1314
 
SQL Bits: Containers and Clones
SQL Bits: Containers and ClonesSQL Bits: Containers and Clones
SQL Bits: Containers and Clones
 
SQL Sever on Docker: Database Containers 3 Ways
SQL Sever on Docker: Database Containers 3 WaysSQL Sever on Docker: Database Containers 3 Ways
SQL Sever on Docker: Database Containers 3 Ways
 
Developers’ mDay 2021: Andrea Bjelogrlić, Sysbee – Tips, tricks and debugging...
Developers’ mDay 2021: Andrea Bjelogrlić, Sysbee – Tips, tricks and debugging...Developers’ mDay 2021: Andrea Bjelogrlić, Sysbee – Tips, tricks and debugging...
Developers’ mDay 2021: Andrea Bjelogrlić, Sysbee – Tips, tricks and debugging...
 
React js
React jsReact js
React js
 
Troubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support EngineerTroubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support Engineer
 
Troubleshooting Tips from a Docker Support Engineer - Jeff Anderson, Docker
Troubleshooting Tips from a Docker Support Engineer - Jeff Anderson, DockerTroubleshooting Tips from a Docker Support Engineer - Jeff Anderson, Docker
Troubleshooting Tips from a Docker Support Engineer - Jeff Anderson, Docker
 
Development workflow guide for building docker apps
Development workflow guide for building docker appsDevelopment workflow guide for building docker apps
Development workflow guide for building docker apps
 
Development workflow guide for building docker apps
Development workflow guide for building docker appsDevelopment workflow guide for building docker apps
Development workflow guide for building docker apps
 
Dot netnuke
Dot netnukeDot netnuke
Dot netnuke
 

Plus de The World of Smalltalk (12)

05 seaside canvas
05 seaside canvas05 seaside canvas
05 seaside canvas
 
12 virtualmachine
12 virtualmachine12 virtualmachine
12 virtualmachine
 
11 bytecode
11 bytecode11 bytecode
11 bytecode
 
06 debugging
06 debugging06 debugging
06 debugging
 
02 basics
02 basics02 basics
02 basics
 
01 intro
01 intro01 intro
01 intro
 
Stoop sed-class initialization
Stoop sed-class initializationStoop sed-class initialization
Stoop sed-class initialization
 
Stoop ed-unit ofreuse
Stoop ed-unit ofreuseStoop ed-unit ofreuse
Stoop ed-unit ofreuse
 
Stoop ed-subtyping subclassing
Stoop ed-subtyping subclassingStoop ed-subtyping subclassing
Stoop ed-subtyping subclassing
 
Stoop ed-inheritance composition
Stoop ed-inheritance compositionStoop ed-inheritance composition
Stoop ed-inheritance composition
 
Stoop 450-s unit
Stoop 450-s unitStoop 450-s unit
Stoop 450-s unit
 
Stoop 439-decorator
Stoop 439-decoratorStoop 439-decorator
Stoop 439-decorator
 

Dernier

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 

Dernier (20)

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 

05 seaside

  • 2. Birds-eye view © Oscar Nierstrasz ST — Introduction 1.2 Model your domain with objects — model domain components as objects. Compose objects, not text. Strive for fluent interfaces. Build applications by scripting components. Model your domain with objects — model domain components as objects. Compose objects, not text. Strive for fluent interfaces. Build applications by scripting components.
  • 3. Lukas Renggli and Marcus Denker ST — Seaside 5.3 Roadmap > Introduction — Web applications / Overview — Installation > Control Flow > Components > Composition Original lecture notes by Lukas Renggli
  • 4. Lukas Renggli and Marcus Denker ST — Seaside 5.4 Roadmap > Introduction — Web applications / Overview — Installation > Control Flow > Components > Composition
  • 5. Lukas Renggli and Marcus Denker ST — Seaside 5.5 Introduction: Web Applications Example: Adding two numbers
  • 6. Lukas Renggli and Marcus Denker ST — Seaside 5.6 What is going on? <form action=“second.html”> <input type=“text” name=“value1”> <input type=“submit” name=“OK”> </form> <form action=“result.html”> <input type=“hidden” name=“value1” value=“<% value1 %>”> </form> <p> <% value1 + value2 %> </p> first.html second.html result.html
  • 7. Lukas Renggli and Marcus Denker ST — Seaside 5.7 Control Flow: HTTP request-response User: Web browser first.html second.html GET first.html <a href=”second.html?number1=...” GET second.html?number1=... <a href=”result.html?number1=...&number2=...”
  • 8. Lukas Renggli and Marcus Denker ST — Seaside 5.8 Something is wrong… > Control-flow quite arcane — Remember GOTO? — We do not care about HTTP! > How to debug that? > And what about — Back button? — Copy of URL (second browser)?
  • 9. Lukas Renggli and Marcus Denker ST — Seaside 5.9 What we want > Why not this? go |number1 number2 | number1 := self request: ‘First Number’. number2 := self request: ‘Second Number’. self inform: ‘The result is ‘, (number1 + number2) asString
  • 10. Lukas Renggli and Marcus Denker ST — Seaside 5.10 Seaside: Features > Sessions as continuous piece of code > XHTML/CSS building > Callback based event model > Composition and reuse > Debugging and Development tools
  • 11. Lukas Renggli and Marcus Denker ST — Seaside 5.11 XHTML Building html div id: ‘title’; with: ‘Title’ html div id: ‘list’; with: [ html span class: ‘item’; with: ‘Item 1’. html span class: ‘item’; with: ‘Item 2’. ] <div id=“title”>Title</div> <div if=“list”> <span class=“item”>Item 1</span> <span class=“item”>Item 2</span> </div>
  • 12. Lukas Renggli and Marcus Denker ST — Seaside 5.12 CSS > CSS Zengarden: http://csszengarden.com
  • 13. Lukas Renggli and Marcus Denker ST — Seaside 5.13 Callback Event Model Example3>>renderContentOn: html html form: [ html submitButton callback: [ self inform: ‘Hello’ ]; text: ‘Say Hello’ ] .... <form action="/seaside/example2" method="post"> <input type="hidden" name="_s" value="JBbTXBnPaTLOjcjI" class="hidden"/> <input type="hidden" name="_k" value="FFQrpnBg" class="hidden" /> <input type="submit" name="1" value="Say Hello" class="submit" /> </form> ....
  • 14. Lukas Renggli and Marcus Denker ST — Seaside 5.14 Composition + Reuse Example: Multicounter More later!
  • 15. Lukas Renggli and Marcus Denker ST — Seaside 5.15 Examples
  • 16. Lukas Renggli and Marcus Denker ST — Seaside 5.16 Example: dabbledb.com
  • 17. Example: auctomatic.com © Oscar Nierstrasz ST — Seaside 17
  • 18. Lukas Renggli and Marcus Denker ST — Seaside 5.18 Example: cmsbox.com
  • 19. Lukas Renggli and Marcus Denker ST — Seaside 5.19 Roadmap > Introduction — Web applications / Overview — Installation > Control Flow > Components > Composition
  • 20. Installing Seaside Lukas Renggli and Marcus Denker ST — Seaside 5.20 Download the one-click image from http://seaside.st/
  • 21. Lukas Renggli and Marcus Denker ST — Seaside 5.21 Seaside http://localhost:8080/seaside
  • 22. > Introduction — Web applications / Overview — Installation > Control Flow > Components > Composition Lukas Renggli and Marcus Denker ST — Seaside 5.22 Roadmap
  • 23. Lukas Renggli and Marcus Denker ST — Seaside 5.23 2. Control Flow > Defining control flow > Convenience methods > Call / Answer > Transactions
  • 24. Lukas Renggli and Marcus Denker ST — Seaside 5.24 Defining Flow > Create a subclass of WATask — Implement the method #go — Split the method #go into smaller parts to ensure readability > Tasks are a special kind of component — No visual representation — Define a logical flow (#go) — Call other components for output
  • 25. Lukas Renggli and Marcus Denker ST — Seaside 5.25 Convenience Methods > #inform: aString > #confirm: aString > #request: aString > #request:label:default: > #chooseFrom:caption:
  • 26. Lukas Renggli and Marcus Denker ST — Seaside 5.26 Call and Answer > #call: aComponent — Transfer control to aComponent > #answer: anObject — anObject will be returned from #call: — Receiving component will be removed
  • 27. Lukas Renggli and Marcus Denker ST — Seaside 5.27 Call and Answer Client aA aB aA Server A>>go x := self call: B new. x asString. B>>go … self answer: 77. A>>go x := self call: B new. x astring. -> 77
  • 28. Lukas Renggli and Marcus Denker ST — Seaside 5.28 Transactions > Sometimes it is required to prevent the user from going back within a flow > Calling #isolate: treats the flow defined in the block as a transaction > Users are able to move back and forth within the transaction, but once completed, they cannot go back anymore
  • 29. Lukas Renggli and Marcus Denker ST — Seaside 5.29 Example for #isolate: self isolate: [ self doShopping. self collectPaymentInfo]. Self showConfirmation.
  • 30. > Introduction — Web applications / Overview — Installation > Control Flow > Components > Composition Lukas Renggli and Marcus Denker ST — Seaside 5.30 Roadmap
  • 31. Lukas Renggli and Marcus Denker ST — Seaside 5.31 3. Components > Rendering — XHTML — CSS > Callbacks — Anchor — Form > Customization
  • 32. Lukas Renggli and Marcus Denker ST — Seaside 5.32 Components > Components are the Views (and Controllers) of Seaside applications. > Components keep their state (model and state of user- interface) in instance-variables. > Components define the visual appearance and handle user interactions
  • 33. Lukas Renggli and Marcus Denker ST — Seaside 5.33 Building Components > Components are created by subclassing WAComponent > Add instance-variables to hold your model and user- interface state > Put view related methods in a category called rendering > Put controller related methods into method categories named accessing, actions, private
  • 34. Lukas Renggli and Marcus Denker ST — Seaside 5.34 Rendering > XHTML is built programmatically. > This process is called rendering. > Create a method called #renderContentOn: SomeComponent>>renderContentOn: html html text: ‘Hello World’
  • 35. Lukas Renggli and Marcus Denker ST — Seaside 5.35 Text Rendering > Render a string: > Render an un-escaped string: > Render any object (using double dispatch): html text: ‘My Text’ html html: ‘<foo>Zork</foo>’ html render: 1
  • 36. Lukas Renggli and Marcus Denker ST — Seaside 5.36 Canvas and Brushes > html parameter is instance of WARenderCanvas — Basic html output — Render logic > Canvas provides brushes — For rendering html tags
  • 37. Lukas Renggli and Marcus Denker ST — Seaside 5.37 Basic Brushes > Render a new line <br />: > Render a horizontal Rule <hr />: > Render a non-breaking space &nbsp;: html break. html horizontalRule. html space.
  • 38. Lukas Renggli and Marcus Denker ST — Seaside 5.38 Using Brushes 1. Ask the canvas for a div brush 2. Configure the brush, e.g. set attributes 3. Render the contents of the tag-brush: html div. html div class: ‘beautiful’. html div class: ‘beautiful’; with: ‘Hello World’.
  • 39. Lukas Renggli and Marcus Denker ST — Seaside 5.39 Painting with Brushes html div html div class: ‘beautiful’ html div class: ‘beautiful’; with: ‘Hello World’. <div></div> <div class=“beautiful”> </div> <div class=“beautiful”> Hello World </div> Seaside XHTML
  • 40. Lukas Renggli and Marcus Denker ST — Seaside 5.40 Nesting Brushes > Render a text in bold: > Render a text in italic > Render a text in bold and italic: html strong with: ‘My Text’. html emphasis with: ‘My Text’. html strong with: [ html emphasis with: ‘My Text’].
  • 41. Lukas Renggli and Marcus Denker ST — Seaside 5.41 Nesting Brushes > To nest brushes use the message #with:. > Always send #with: as the last message in the configuration cascade. > The argument of #with: is rendered using double- dispatch, therefore any object can be passed as an argument. > To nest tags, pass a block that renders the elements to nest.
  • 42. Lukas Renggli and Marcus Denker ST — Seaside 5.42 Nesting Brushes > Render nested divs: > Render a list: html div id: ‘frame’; with: [ html div id: ‘contents’; with: … html div id: ‘sidebar’; with: … ]. html orderedList with: [ html listItem with: … html listItem with: … ].
  • 43. Lukas Renggli and Marcus Denker ST — Seaside 5.43 Rendering Pitfalls I > Don’t change the state of the application while rendering, unless you have a really good reason to do so. > Rendering is a read-only phase. > Don’t put all your rendering code into a single method. Split it into small parts and choose a method name following the pattern #render*On:
  • 44. Lukas Renggli and Marcus Denker ST — Seaside 5.44 Rendering Pitfalls II > Rendering is a read-ony phase. — Don’t send #renderContentOn: from your own code, use #render: instead. — Don’t send #call: and #answer: while rendering > Always use #with: as the last message in the configuration cascade of your brush
  • 45. Lukas Renggli and Marcus Denker ST — Seaside 5.45 Anchor Callback > Ask the rendering canvas for an anchor and configure it with a callback-block: > The callback-block is cached and will be executed later. html anchor callback: [self someAction]; with: ‘Some Action’].
  • 46. Lukas Renggli and Marcus Denker ST — Seaside 5.46 Anchor Example WACounter>>renderContentOn: html html heading level: 1; with: self count. html anchor callback: [self increase]; with: ‘++’. html space. html anchor callback: [self decrease]; with: ‘--’.
  • 47. Lukas Renggli and Marcus Denker ST — Seaside 5.47 Forms > Render a form around your form elements: > Put the Form elements inside the form: html form: [ html textInput value: text; callback: [:value | text := value]. html submitButton ]. html form: [ … ]
  • 48. Lukas Renggli and Marcus Denker ST — Seaside 5.48 More Brushes with Callbacks.. > Text Input / Text Area > Submit Button > Check-Box > Radio Group > Select List > File-Upload Have a look at the functional tests!
  • 49. Lukas Renggli and Marcus Denker ST — Seaside 5.49 Register new Component / Task > Create method #canBeRoot returning true on class side > Register using Seaside configuration interface. > Or call #registerAsApplication: in the class-side #initialize
  • 50. > Introduction — Web applications / Overview — Installation > Control Flow > Components > Composition Lukas Renggli and Marcus Denker ST — Seaside 5.50 Roadmap
  • 51. Lukas Renggli and Marcus Denker ST — Seaside 5.51 4. Compositon > Backtracking > Subcomponents > Widgets
  • 52. Lukas Renggli and Marcus Denker ST — Seaside 5.52 Backtracking State > Seaside does not backtrack state by default. > Often it is not obvious whether an object should be backtracked or not. Mostly this has to be decided by the developer on a per-object basis. > Any object can be declared to be backtracked.
  • 53. Lukas Renggli and Marcus Denker ST — Seaside 5.53 Shopping Cart Problem > Online Bookstore (without backtracking) — When using the back-button, usually the items should not be removed from the cart; just resume browsing from the old location. > Flight Reservation System (with backtracking) — When using the back-button, usually you want to check other flights, this means the selected flight should be removed.
  • 54. Lukas Renggli and Marcus Denker ST — Seaside 5.54 Register Object > Implement method #states that returns an Array that contains your object. > This will backtrack the instance-variables of the objects, not the objects themselves SomeComponent>>#states ^ Array with: model.
  • 55. Lukas Renggli and Marcus Denker ST — Seaside 5.55 Subcomponents > It is common for a component to display instances of other components. > Components can be nested into each other using the composite pattern. > A subcomponent is displayed using the method #render: on the canvas.
  • 56. Lukas Renggli and Marcus Denker ST — Seaside 5.56 Initialize Children > Subcomponents are usually stored within instance variables of the parent component. > Subcomponents are commonly created lazily or as part of the components #initialize method. SomeComponent>>initialize super initialize. counter := WACounter new.
  • 57. Lukas Renggli and Marcus Denker ST — Seaside 5.57 Enable Children > Parent Components must implement a #children method returning a collection of subcomponents that they might display. > If you fail to specify #children correctly, Seaside will raise an exception. SomeComponent>>children ^ Array with: counter
  • 58. Lukas Renggli and Marcus Denker ST — Seaside 5.58 Render Children > Children are rendered by sending the message #render: to the rendering canvas. > Never directly send #renderContentOn: to the subcomponent. SomeComponent>>renderContentOn: html html heading level: 1; with: ‘My Counter’. html render: counter.
  • 59. Lukas Renggli and Marcus Denker ST — Seaside 5.59 Widgets > Components can be reused in different contexts within different applications. > Seaside is shipped with a small collection of widgets ready to use. > Load and use widgets that have been developed by the Seaside community. > Write your own widgets that exactly fit your needs
  • 60. Widgets: Examples Lukas Renggli and Marcus Denker ST — Seaside 5.60 Have a look at the classes in Seaside-Components-Widgets Batched List Tab Panel Calendar
  • 61. Lukas Renggli and Marcus Denker ST — Seaside 5.61 Custom Widgets > Create a new component. > Add methods to specify domain-model, subcomponents, properties… > Assign CSS names/classes to make it skinnable with css style-sheet. — Implement method #style to return CSS for component > Write tests and small example applications.
  • 62. Lukas Renggli and Marcus Denker ST — Seaside 5.62 There is more.. > Development Tools — Demo in the Exercise Session (Halo, Configuration…) — Debugging: Next Lecture > Javascript: Prototype, script.aculo.us, jQuery, jQueryUI > Persistency (Databases)
  • 63. Lukas Renggli and Marcus Denker ST — Seaside 5.63 Summary
  • 64. Lukas Renggli and Marcus Denker ST — Seaside 5.64 Literature > Dynamic Web Development with Seaside — http://book.seaside.st/book > HPI Seaside Tutorial: — http://www.swa.hpi.uni-potsdam.de/seaside/tutorial > Articles: — “Seaside — a Multiple Control Flow Web Application Framework.” — “Seaside: A Flexible Environment for Building Dynamic Web Applications” — http://scg.unibe.ch/scgbib?query=seaside-article > …. more at http://seaside.st
  • 65. © Oscar Nierstrasz ST — Introduction 1.65 Attribution-ShareAlike 3.0 Unported You are free: to Share — to copy, distribute and transmit the work to Remix — to adapt the work Under the following conditions: Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license. For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page. Any of the above conditions can be waived if you get permission from the copyright holder. Nothing in this license impairs or restricts the author's moral rights. License http://creativecommons.org/licenses/by-sa/3.0/