1. Web Development with
Smalltalk
PhD. Mariano Martinez Peck
marianopeck@gmail.com
http://marianopeck.wordpress.com
2. Mariano Martinez Peck
Academics
Software Engineer at UTN-FRBA, Argentina.
PhD in Computer Science at the Université de Lille.
Open-Source
Fuel, Pharo, DBXSuite (OpenDBX and Glorp), etc.
Industry
Previously, many years at different companies developing in different
languages.
Currently, Independent Software Consultant
9. Smalltalk is powerful
Pure Object Oriented.
Dynamically typed and
reflective.
Closures.
Debug and changes “on the
fly”.
Everything is an object.
Runs in a VirtualMachine.
11. Two common possibilities
Use Smalltalk for domain logic and building UI
(using a web framework). The server will answer the
generated HTML + Javascript.
Write a separate UI (web logic) in another language (a
fully JS client) that connects somehow (rest/json for
example) to a Smalltalk server (domain logic).
18. We think in Components
There are no templates!
There is no JSP, XML, PHP or whatever.
You never see HTTP requests or responses (unless you
want to).
Simply Smalltalk.
30. Pros:
• Great learning curve: only one language.
• Manage all code the same way.
• We use the same IDE tools.
• Excellent debugging capabilities.
• Reusability.
Cons:
• More complicated graphic designer
integration.
55. Continuations
self call: (AnotherComponent new)
1. Snapshots current estate.
2. “Jumps” to another place (.e.g #call:)
3. Do something.
4. When it comes back (.e.g #answer:), the state is
available.
56. Advantages of Continuations
It’s call and return.
Transparent management of the state and the threads.
It helps with double-request and back-button
problems.
You can decide what is considered state.
61. Other characteristics
Very nice integration with JQuery, AJAX, Comet, etc.
We can use our preferred Web server when deploying.
It’s not tight to any persistency framework.
Tons of wrapped libs like Twitter Bootstrap, Highcharts,
etc…
64. Some conclusions
Very easy to learn, develop and debug.
Good integration with existing libs.
Great with web applications with complex logic and
workflows.
It could be heavy (statefull) for certain scenarios.
A bit complicated to build app from graph designer template.
May not be the best choice for plain web pages.
65. Write a separate UI (web logic) in another language (a fully JS
client) that connects somehow (rest/json for example) to a
Smalltalk server (domain logic).