Making Web Programming Simpler a Seaside Tutorial
Short Description
The goal of this tutorial is to give you a feeling on creating a web applica-. tion using Seaside. ConfReg is a tool intended to help people to register to …
Website: moon.felk.cvut.cz | Filesize: 249kb
Content
Making Web Programming Simpler:
a Seaside Tutorial
Alexandre Bergel
LERO & DSG, Trinity College Dublin, Ireland
Alexandre.Bergel@cs.tcd.ie
November 15, 2006
1 RegConf: An Application for Registering to a
Conference
The goal of this tutorial is to give you a feeling on creating a web application
using Seaside. ConfReg is a tool intended to help people to register to a
conference.
Four step are necessary to complete such a registration:
1. A participant has to enter some personal data such as firstname, name,
the institute where she is attached, and her email address. Then,
2. Some information about the hotel are required. For instance a room can
be single or double in an hotel ranked between 1 and 4 stars. A price has
then to be computed.
3. Finally informations regarding the payment are required. Once the credit
card number, the issue date, and the type are entered,
4. A confirmation screen shows a summary of what was entered.
The flow of the application is described in the following figure.
Get personal
info Get hotel info Get Payment
info
Show
Confirmation
is card number valid ?
yes
no
Isolation
1The dashed rectangle designate the part of the application which is isolated.
This means that once the flow of the running application leaves this box, there
is no way to come back in it, specially using the back button.
2 Application Building Blocks
2.1 The Entry Point: ConferenceRegistration
The control flow of the application has to be described in a task’s go method.
This method also represent the entry point of the application. Thus a name like
ConferenceRegistration sounds appropriated.
Your job: Create a task ConferenceRegistration with a go method that describes
the control flow of the application. The code of this method is:
go
|person hotelInfo|
self isolate: [
person := self openPersonalInformationEditor.
hotelInfo := self openHotelInformationEditorFor: person.
self openPaymentEditorFor: person].
self displayConfirmationFor: hotelInfo
Your job: Start the web server on by executing WAKom startOn: 9090 .
Your job: Create an initialize method on the class side to register your application
in Seaside under the name regconf .
2.2 Getting User Information: PersonalInformationEditor
All the control flow is defined in the class you previously defined. Getting user
information is implemented as a normal seaside component (i.e., subclass of
WAComponent ). Instance variables of this class should…
Get the file Download here
Related Books:Related Searches: trinity college dublin ireland, trinity college dublin, confirmation screen, lero, control flow
Comments
Leave a Reply