seaside - the revenge of smalltalk

77
The Revenge of Smalltalk London Geek Nights July 6, 2009

Upload: lukas-renggli

Post on 07-Nov-2014

4.317 views

Category:

Technology


2 download

DESCRIPTION

Seaside is a web application framework that is written in Smalltalk. Smalltalk has been hugely influential on the development of computer languages but realistically how many people have ever used it? Seaside is a practical application of Smalltalk to the web sphere.

TRANSCRIPT

Page 1: Seaside - The Revenge of Smalltalk

The Revenge of Smalltalk

London Geek Nights

July 6, 2009

Page 2: Seaside - The Revenge of Smalltalk
Page 3: Seaside - The Revenge of Smalltalk
Page 4: Seaside - The Revenge of Smalltalk
Page 5: Seaside - The Revenge of Smalltalk
Page 6: Seaside - The Revenge of Smalltalk

Lukas Renggli

Academics

PhD Student, University of Bern

Open-Source

Core-developer of Seaside

Author of Magritte and Pier

Industry

Independent Software Consultant

Page 7: Seaside - The Revenge of Smalltalk

Agenda

Flow

Components

Security

Applications

Continuations

Objects

Closures

Debugger

Page 8: Seaside - The Revenge of Smalltalk

1Natural Flow

So

urc

e: sto

ck.x

chng

, A

sif A

kb

ar

Page 9: Seaside - The Revenge of Smalltalk
Page 10: Seaside - The Revenge of Smalltalk
Page 11: Seaside - The Revenge of Smalltalk
Page 12: Seaside - The Revenge of Smalltalk

<form action="second.html"> <input type="text" name="value1"> <input type="submit" value="OK"></form>

Page 13: Seaside - The Revenge of Smalltalk

<form action="second.html"> <input type="text" name="value1"> <input type="submit" value="OK"></form>

<form action="result.html"> <input type="text" name="value2"> <input type="submit" value="OK"></form>

Page 14: Seaside - The Revenge of Smalltalk

<p> <% value1 + value2 %></p>

<form action="second.html"> <input type="text" name="value1"> <input type="submit" value="OK"></form>

<form action="result.html"> <input type="text" name="value2"> <input type="submit" value="OK"></form>

Page 15: Seaside - The Revenge of Smalltalk

<p> <% value1 + value2 %></p>

<form action="second.html"> <input type="text" name="value1"> <input type="submit" value="OK"></form>

<form action="result.html"> <input type="text" name="value2"> <input type="submit" value="OK"></form>

Page 16: Seaside - The Revenge of Smalltalk

<p> <% value1 + value2 %></p>

<form action="second.html"> <input type="text" name="value1"> <input type="submit" value="OK"></form>

<form action="result.html"> <input type="text" name="value2"> <input type="submit" value="OK"></form>

Page 17: Seaside - The Revenge of Smalltalk

<p> <% value1 + value2 %></p>

<form action="second.html"> <input type="text" name="value1"> <input type="submit" value="OK"></form>

<form action="result.html"> <input type="text" name="value2"> <input type="submit" value="OK"></form>

Page 18: Seaside - The Revenge of Smalltalk

<form action="result.html"> <input type="hidden" name="value1" value="<% value1 %>"> <input type="text" name="value2"> <input type="submit" value="OK"></form>

<p> <% value1 + value2 %></p>

<form action="second.html"> <input type="text" name="value1"> <input type="submit" value="OK"></form>

Page 19: Seaside - The Revenge of Smalltalk

<form action="result.html"> <input type="hidden" name="value1" value="<% value1 %>"> <input type="text" name="value2"> <input type="submit" value="OK"></form>

<p> <% value1 + value2 %></p>

<form action="second.html"> <input type="text" name="value1"> <input type="submit" value="OK"></form>

Page 20: Seaside - The Revenge of Smalltalk

is different

Page 21: Seaside - The Revenge of Smalltalk

3 user interactions

Page 22: Seaside - The Revenge of Smalltalk

3 lines of code

Page 23: Seaside - The Revenge of Smalltalk

value1 := self request: ‘First Number’.

Page 24: Seaside - The Revenge of Smalltalk

value1 := self request: ‘First Number’.

value2 := self request: ‘Second Number’.

Page 25: Seaside - The Revenge of Smalltalk

value1 := self request: ‘First Number’.

value2 := self request: ‘Second Number’.

self inform: value1 + value2.

Page 26: Seaside - The Revenge of Smalltalk

value1 := self request: ‘First Number’.

value2 := self request: ‘Second Number’.

self inform: value1 + value2.It’s a DSL

Page 27: Seaside - The Revenge of Smalltalk

value1 := self request: ‘First Number’.

value2 := self request: ‘Second Number’.

self inform: value1 + value2.

It’s justSmalltalk

Page 28: Seaside - The Revenge of Smalltalk

No request parsing

Page 29: Seaside - The Revenge of Smalltalk

No string fiddling

Page 30: Seaside - The Revenge of Smalltalk

No state machines

Page 31: Seaside - The Revenge of Smalltalk

Demo

Page 32: Seaside - The Revenge of Smalltalk

2Reusable

Components

So

urc

e: sto

ck.x

chng

, Lynne L

ancaste

r

Page 33: Seaside - The Revenge of Smalltalk
Page 34: Seaside - The Revenge of Smalltalk
Page 35: Seaside - The Revenge of Smalltalk

Reuseable

Page 36: Seaside - The Revenge of Smalltalk

Persistent

Page 37: Seaside - The Revenge of Smalltalk

Model, View, Controller

Model

View Controller

Page 38: Seaside - The Revenge of Smalltalk

Valid

Sou

rce:

sto

ck.x

chn

g, A

l N

akib

Page 39: Seaside - The Revenge of Smalltalk

CSSDesigner

Page 40: Seaside - The Revenge of Smalltalk

XHTMLDeveloper & Seaside

Page 41: Seaside - The Revenge of Smalltalk

DRY

Page 42: Seaside - The Revenge of Smalltalk

DRYIt’s a DSL

Page 43: Seaside - The Revenge of Smalltalk

DRYIt’s just

Smalltalk

Page 44: Seaside - The Revenge of Smalltalk

Demo

Page 45: Seaside - The Revenge of Smalltalk

3Secure by

Default

So

urc

e: sto

ck.x

chng

, C

olin

Bro

ug

h

Page 46: Seaside - The Revenge of Smalltalk

Cross Site Scripting

Sou

rce:

sto

ck.x

chn

g, A

fon

so L

ima

Page 47: Seaside - The Revenge of Smalltalk

Output is encoded

by default

Page 48: Seaside - The Revenge of Smalltalk

Replay Attacks

Sou

rce:

sto

ck.x

chn

g, A

fon

so L

ima

Page 49: Seaside - The Revenge of Smalltalk

Session

_s=Ru8ZKgqjy0uDX3kf

96-bit

Page 50: Seaside - The Revenge of Smalltalk

Page

_k=K5EQyqKE

48-bit

Page 51: Seaside - The Revenge of Smalltalk

Parameter Tampering

Sou

rce:

sto

ck.x

chn

g, A

fon

so L

ima

Page 52: Seaside - The Revenge of Smalltalk

Names are generated

automatically

Page 53: Seaside - The Revenge of Smalltalk

Names are bound

to functions

Page 54: Seaside - The Revenge of Smalltalk

No manual

request parsing

Page 55: Seaside - The Revenge of Smalltalk

html submitButton

! callback: [ self inform: ‘Hey’ ];

! with: ‘Click Here’

Page 56: Seaside - The Revenge of Smalltalk

html submitButton

! callback: [ self inform: ‘Hey’ ];

! with: ‘Click Here’It’s a DSL

Page 57: Seaside - The Revenge of Smalltalk

html submitButton

! callback: [ self inform: ‘Hey’ ];

! with: ‘Click Here’

It’s justSmalltalk

Page 58: Seaside - The Revenge of Smalltalk

4Web 2.0

So

urc

e: F

lickr, B

enja

min

Jackso

n

Page 59: Seaside - The Revenge of Smalltalk

So

urc

e: F

lickr, p

srm

an's

Page 60: Seaside - The Revenge of Smalltalk

Comet

So

urc

e: F

lickr, p

srm

an's

Page 61: Seaside - The Revenge of Smalltalk

It’s a DSL

Page 62: Seaside - The Revenge of Smalltalk

It’s justSmalltalk

Page 63: Seaside - The Revenge of Smalltalk

Demo

Page 64: Seaside - The Revenge of Smalltalk

5Applications

So

urc

e: sto

ck.x

chng

, S

teve W

oo

ds

Page 65: Seaside - The Revenge of Smalltalk

In productive use

since 2002

Page 66: Seaside - The Revenge of Smalltalk
Page 67: Seaside - The Revenge of Smalltalk
Page 68: Seaside - The Revenge of Smalltalk
Page 69: Seaside - The Revenge of Smalltalk
Page 70: Seaside - The Revenge of Smalltalk

Seaside

Page 71: Seaside - The Revenge of Smalltalk

MIT License

Page 72: Seaside - The Revenge of Smalltalk
Page 73: Seaside - The Revenge of Smalltalk

© Copyright 2007 Instantiations, Inc. VA Smalltalk, VA Assist, WidgetKit, and WindowBuilder are trademarks of Instantiations. All other trademarks mentioned are the property of their respective owners.

www.instantiations.com 1-800-808-3737Build Quality Software

Development ToolsA rich set of development tools includes a debugger, browsers, inspectors, application builders, and a performance monitor.Packager (Dev Tool) creates a runtime image including only necessary classes resulting in a smaller footprint.AsyncCallout, an extension of the platform function API, allows developers to make a platform function call in a separate virtual machine thread.Reports feature enables the creation of hardcopy and/or screen reports on any object that can be used in the VA Smalltalk environment, including parts provided in the Database and Communications features.

Custom Controls Popular WidgetKit technologyColumnar List boxes, table widgets and hierarchical listsCustomizable image buttons, toggles and value setsVertical, horizontal and circular gaugesData aware spin buttonsWindows 95/98/NT/2000 Notebook widgetSplitbar widget

!

!

!

!

!

!

!

Communications A set of parts supports communication with other computers using MQ series transactions.A set of parts supports communication with other computers using TCP/IP protocols.Socket Communications Interface is an API providing full support for TCP/IP protocols, as well as secure communications using SSL. The API uses OpenSSL, an implementation of SSL/TLS.

Database High-performance, robust support for DB2Support for Oracle through v10Support for any database which supports the ODBC interface.

Server SmalltalkServer Smalltalk (SST) provides a client/server framework flexible enough to accommodate various distributed architectures.Server Workbench is a cross-development envi-ronment used in developing distributed process-ing, web hosting, and other server applications. Target deployment environments include all VA Smalltalk platforms and z/OS using IBM’s VisualAge Smalltalk Server for OS/390 and z/OS.

Web ServicesA self-contained, modular framework, capable of creating, deploying and hosting web services.

External Interface SupportXML Support enables XML–Smalltalk object mapping, includes a server interface via XML request handlers and reading of remote resources via TCP sockets using HTTP requestsOLE Support enables an application to use OLE clients and custom control services.Domino Connection allows an application to retrieve and work with Domino documents as well as access Notes mail system.

!

!

!

100% VisualAge compatibleVA Smalltalk is a modern software development environment that is 100% VisualAge compatible. VA Smalltalk enables developers to quickly construct applications that are portable, highly scalable, simple to maintain, and fit easily into existing infrastructures.

Other Software RequirementsDatabase

DB2 Universal Database (Windows, AIX, Linux, Solaris)ORACLE 8i (8.1.6), 9i or 10

DominoLotus Notes (Windows only) [Not supported on Linux, AIX, Solaris]

VA Smalltalk’s HTML DocumentationTCP/IP protocolMicrosoft Internet Explorer 5.0 or later (Windows)Netscape 4.51 or later (Win, Linux, Solaris, AIX)Firefox 2.0 or later (Win, Linux)Opera 9.02 or later (Windows)

!

!

!

!

!

!

!

!

!

EMSRV 7.1a Library ManagerNetware 4.2 or 5.1OS/2 Warp 4.0 + FP11OS/2 Warp Server for e-BusinessWindows ME - EMADMIN onlyWindows 2000, 2000 Server, Advanced ServerWindows XP ProfessionalWindows Server 2003Windows Vista Business, Enterprise, or UltimateSun Solaris Version 8 or 9HP-UX Version 11.0 or 11iAIX Version 5.1, 5.2 or 5.3Red Hat Linux 9 and Advance Server 2.1SuSE Enterprise 10

!

!

!

!

!

!

!

!

!

!

!

!

!

Supported ConfigurationsOperating System Hardware PlatformWindows ME, 2000, XP, Server 2003, Vista . . . . . . . . . . . . . . . 300MHz PC, 256MB RAM, 400MB diskRedHat Linux 9, Enterprise AS 2.1, SuSE Linux . . . . . . . . . . . Pentium 300MHz PC, 128MB RAM, 400MB diskSun Solaris 8, 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SPARC workstation or server, 64MB RAM, 200MB diskAIX 5.1, 5.2, 5.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RISC System/6000, POWERStation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . or POWERServer, 128MB RAM, 400MB disk

For detailed system requirements visit www.instantiations.com/VAST

Download a risk-free trial copy:www.instantiations.com/VAST/download

Award-winning VA Assist™ technologyUniversal Drag/DropPowerful change propagation toolsCustomizable ToolbarsColor Code Syntax (Windows only)Dynamic & Batch-Oriented Spell CheckingAuto-Spell CorrectionVersion RenamingClass History/FindVersion TemplatesString SearchApplication Filtering

!

!

!

!

!

!

!

!

!

!

!

!

Enhanced DebuggerEnhanced InspectorsCode SynchronizationLocate ApplicationsLocate DependentsRevision NotesRelease All LatestAbbreviation ExpansionPopup Sender/ImplementorsBrowse Changes Including Required MapsEmbedded mode for seamless integration with the Composition Editor

!

!

!

!

!

!

!

!

!

!

!

Ergonomic Enhancements