SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Ähnlich wie Seaside

[DSBW Spring 2009] Unit 04: From Requirements to the UX Model
[DSBW Spring 2009] Unit 04: From Requirements to the UX Model[DSBW Spring 2009] Unit 04: From Requirements to the UX Model
[DSBW Spring 2009] Unit 04: From Requirements to the UX Model
Carles Farré
 

Ähnlich wie Seaside (20)

XMPP/Jingle(VoIP)/Perl Ocean 2012/03
XMPP/Jingle(VoIP)/Perl Ocean 2012/03XMPP/Jingle(VoIP)/Perl Ocean 2012/03
XMPP/Jingle(VoIP)/Perl Ocean 2012/03
 
[DSBW Spring 2009] Unit 04: From Requirements to the UX Model
[DSBW Spring 2009] Unit 04: From Requirements to the UX Model[DSBW Spring 2009] Unit 04: From Requirements to the UX Model
[DSBW Spring 2009] Unit 04: From Requirements to the UX Model
 
OSDC 2019 | Evolution of a Microservice-Infrastructure by Jan Martens
OSDC 2019 | Evolution of a Microservice-Infrastructure by Jan MartensOSDC 2019 | Evolution of a Microservice-Infrastructure by Jan Martens
OSDC 2019 | Evolution of a Microservice-Infrastructure by Jan Martens
 
Building production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stackBuilding production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stack
 
DCEU 18: App-in-a-Box with Docker Application Packages
DCEU 18: App-in-a-Box with Docker Application PackagesDCEU 18: App-in-a-Box with Docker Application Packages
DCEU 18: App-in-a-Box with Docker Application Packages
 
Advanced Site Studio Class, June 18, 2012
Advanced Site Studio Class, June 18, 2012Advanced Site Studio Class, June 18, 2012
Advanced Site Studio Class, June 18, 2012
 
Inventing the future Business Programming Language
Inventing the future  Business Programming LanguageInventing the future  Business Programming Language
Inventing the future Business Programming Language
 
RedisConf18 - Writing modular & encapsulated Redis code
RedisConf18 - Writing modular & encapsulated Redis codeRedisConf18 - Writing modular & encapsulated Redis code
RedisConf18 - Writing modular & encapsulated Redis code
 
Dust.js
Dust.jsDust.js
Dust.js
 
Onivim 2: Re-architecting for Performance
Onivim 2: Re-architecting for PerformanceOnivim 2: Re-architecting for Performance
Onivim 2: Re-architecting for Performance
 
Memonic Architecture
Memonic ArchitectureMemonic Architecture
Memonic Architecture
 
Building Top-Notch Androids SDKs
Building Top-Notch Androids SDKsBuilding Top-Notch Androids SDKs
Building Top-Notch Androids SDKs
 
Getting Into FLOW3 (TYPO312CA)
Getting Into FLOW3 (TYPO312CA)Getting Into FLOW3 (TYPO312CA)
Getting Into FLOW3 (TYPO312CA)
 
Rails hosting
Rails hostingRails hosting
Rails hosting
 
SendGridDelivered_API_Workshop
SendGridDelivered_API_WorkshopSendGridDelivered_API_Workshop
SendGridDelivered_API_Workshop
 
Week 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. WuWeek 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. Wu
 
Cloud-Native .Net des applications containerisées .Net sur Linux, Windows e...
 Cloud-Native .Net des applications containerisées .Net sur Linux, Windows e... Cloud-Native .Net des applications containerisées .Net sur Linux, Windows e...
Cloud-Native .Net des applications containerisées .Net sur Linux, Windows e...
 
Lecture 5: Client Side Programming 1
Lecture 5: Client Side Programming 1Lecture 5: Client Side Programming 1
Lecture 5: Client Side Programming 1
 
Go for Operations
Go for OperationsGo for Operations
Go for Operations
 
Massively Scaled High Performance Web Services with PHP
Massively Scaled High Performance Web Services with PHPMassively Scaled High Performance Web Services with PHP
Massively Scaled High Performance Web Services with PHP
 

Mehr von ESUG

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programming
ESUG
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
ESUG
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
ESUG
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
ESUG
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
ESUG
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
ESUG
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
ESUG
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
ESUG
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
ESUG
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
ESUG
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
ESUG
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
ESUG
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
ESUG
 

Mehr von ESUG (20)

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programming
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in Pharo
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in Pharo
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing Score
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design Mooc
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

Seaside

  • 1. ESUG 2002 Seaside Seaside Web Application Toolkit for Squeak Lukas Renggli, Adrian Lienhard Sheet #1
  • 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. ESUG 2002 Seaside Goodies Ø Web-based inspector Ø Profiler Ø Configuration tools Lukas Renggli, Adrian Lienhard Sheet #14
  • 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. 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. 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. 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