SlideShare a Scribd company logo
for
Real World Applications
Noury Bouraqadi & Dave Mason
ESUG 2022, Нови Сад (Novi Sad), Србија (Serbia)
New to Smalltalk ?
3
Smalltalk is dangerous.
It is a drug.
My advice to you would be
don’t try it.
It could ruin your life
– Andy Bower, CEO of Object Arts Ltd.
=
Great
Language,
Libraries,
Tools,
Community
We want to develop in
Smalltalk
All the Time
Everywhere
What to do with non-Smalltalk Resources?
7
Real World Application “Architecture”
8
Real World Application “Architecture”
9
Javascript
Javascript
Javascript
html css
Javascript
html css
Javascript
html css
Smalltalk Everywhere?
10
11
12
Javascript
● Develop in Pharo Smalltalk all the time!
● Reuse existing JS libraries
● JS Portability
● JS Run-time Speed
13
● Transpiler: Converts Pharo Code to JavaScript
● Framework: Develop JS applications in Pharo
● Libraries: Extend JS Objects with Pharo’s Behavior
● Tools: Playground + Inspector for JS Objects
● Test Framework: Test JS Code
14
Success Stories
15
16
Success Stories
100%
Pharo
Javascript
100%
Development Production
Development Production
100%
Pharo
Javascript
100%
Development Production
1. Write Tests
3. Export to JS
2. Pass the tests
Testing JS Generated Code
19
1. Start Server
20
Tests Talk to Web Browsers
1. Start Server
2. Generate
App’s JS
Code
Connect to Server
Link to HTML
21
Tests Talk to Web Browsers
1. Start Server
System Call
3. Open Web
Browser
2. Generate
App’s JS
Code
Connect to Server
Link to HTML
22
Tests Talk to Web Browsers
1. Start Server
System Call
3. Open Web
Browser
4. Open URL
2. Generate
App’s JS
Code
Connect to Server
Link to HTML
23
Tests Talk to Web Browsers
1. Start Server
System Call
3. Open Web
Browser
4. Open URL
5. Load HTML
2. Generate
App’s JS
Code
Connect to Server
Link to HTML
24
Tests Talk to Web Browsers
1. Start Server
System Call
3. Open Web
Browser
4. Open URL
5. Load HTML
2. Generate
App’s JS
Code
Connect to Server
Link to HTML
6. Open Web Socket
25
Tests Talk to Web Browsers
1. Start Server
System Call
3. Open Web
Browser
4. Open URL
5. Load HTML
2. Generate
App’s JS
Code
Connect to Server
Link to HTML
6. Open Web Socket
Web Socket
26
Tests Talk to Web Browsers
https://pharojs.org/repl
27
https://pharojs.org/repl
HTML is a String in the image
28
HTML
String
Zinc HTTP
Server
GET
https://pharojs.org/repl
HTML is a String in the image
29
HTML
String
Zinc HTTP
Server
GET
<!DOCTYPE html>
<html>
…
<img alt="Logo" src=
…
<script src="repl/index.js">
</script>
</body>
</html>
https://pharojs.org/repl
Browser Processes the HTML
30
Zinc HTTP
Server
<!DOCTYPE html>
<html>
…
<img alt="Logo" src=...
…
<script src="repl/index.js">
</script>
</body>
</html>
Browser Loads Resources
31
Zinc HTTP
Server
<!DOCTYPE html>
<html>
…
<img alt="Logo" src=
…
<script src="repl/index.js">
</script>
</body>
</html>
Browser Requests JavaScript Code
32
Zinc HTTP
Server
GET
<script src="repl/index.js">
</script>
</body>
</html>
REPL Client JS Code is Generated
33
PharoJS
Transpiler
Zinc HTTP
Server
GET
<script src="repl/index.js">
</script>
</body>
</html>
REPL
Client
REPL Client JS Code is Generated
34
Zinc HTTP
Server
GET
<script src="repl/index.js">
</script>
</body>
</html>
Generated
JavaScript
Code
PharoJS
Transpiler
REPL
Client
Client Creates and Links DOM Elements
35
Zinc HTTP
Server
<script src="repl/index.js">
</cript>
</body>
</html>
Client Sends ST Code Snippet
36
Zinc HTTP
Server
POST
Server Compiles ST Code Snippet
37
Zinc HTTP
Server
POST
Opal
Compiler
ST
Code
String
PharoJS Transpiles AST
38
PharoJS
Transpiler
Zinc HTTP
Server
POST
Opal
Compiler
ST
Code
String
AST
Server Sends Generated JS
39
PharoJS
Transpiler
Zinc HTTP
Server
POST
Opal
Compiler
ST
Code
String
AST
Generated
JS Code
Client Executes Generated JS Code
40
Zinc HTTP
Server
41
Small App
● Client+Server
○ 10 classes
○ 64 methods
● Tests
○ 1 class
○ 20 methods
Generated JS
267KB (+3KB)
Larger App: PLC3000.com
42
Teaching
PLC Programming & Factory Automation
PLC3000.com Metrics
43
● Tests
○ 108 classes
○ 1184 methods
○ 876 test runs
● Client+Server
○ 342 classes
○ 2529 methods
44
3
Programming
Languages
7 (4+3)
Physics
Simulations
PLC
Simulator
PLC3000.com = Educational Software + Contents
27 (13 + 14)
Exercises
& Tutorials
45
3
Programming
Languages
7 (4+3)
Physics
Simulations
PLC
Simulator
PLC3000.com = Educational Software + Contents
27 (13 + 14)
Exercises
& Tutorials
PLC3000.com Server Side
46
PLC3000.com Clients Run in Web Browsers
47
PLC3000.com Client JS Code
48
Generated JS
655KB (+391KB)
Summary
● Write 100% Pharo Code
● Reuse JS Libraries
● Tests + debugging in Pharo
○ Pharo talks to JavaScript
● Different Architectures are Possible
49
Supports Real World Applications
Pharo on the Client Side =
50
Generated
JS
51
is for Server Side Too!
Generated
JS
52
Supports Different Workflows
● HTML, CSS
○ Handwritten Files
○ Generated
○ DOM Elements Creation & Setup
○ Reuse Third-Party Libraries
○
● Javascript
○ Generated
○ Reuse Third-Party Libraries
Development-Time
Run-Time vs
for
Pharo X
is now Beta ;-)
53
April 1st, 2021
● Improved Middleware
○ Framework for Client-Server Apps
● Support latest JS constructs to reuse JS Frameworks
● Support more Pharo concepts (threads, slots, …)
● Extended Support for Live/Interactive Programming
○ Hot code update : easy
○ Debugging generated JS code : complex
54
Future Development
Develop in Pharo, Run on JavaScript
PharoJS.org
Kindly supported by
Thanks to all the contributors

More Related Content

PPTX
JavaScript front end performance optimizations
PDF
Smalltalk for the Web & Beyond (ESUG 2025)
PDF
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
KEY
The Devil and HTML5
PDF
BackEnd-Roadmap.pdf
PPTX
A Beginner's Guide to Client Side Development with Javascript
PDF
[convergese] Adaptive Images in Responsive Web Design
PPTX
Gwt Deep Dive
JavaScript front end performance optimizations
Smalltalk for the Web & Beyond (ESUG 2025)
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
The Devil and HTML5
BackEnd-Roadmap.pdf
A Beginner's Guide to Client Side Development with Javascript
[convergese] Adaptive Images in Responsive Web Design
Gwt Deep Dive

Similar to PharoJS for Real World Applications (20)

PDF
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
PDF
Shifting Gears
PDF
Come abbiamo scalato Dazn con micro-architetture
PPTX
Troubleshooting SEO for JS Frameworks - Patrick Stox - DTD 2018
PDF
PrairieDevCon 2014 - Web Doesn't Mean Slow
PDF
Node azure
PPSX
Webpack & EcmaScript 6 (Webelement #32)
PDF
Alexander Mostovenko "'Devide at impera' with GraphQL and SSR"
PPTX
What is HTML 5?
PDF
[refreshaustin] Adaptive Images in Responsive Web Design
ODP
Swt 2009
PDF
HTML5ではないサイトを HTML5へ - Change HTML5 from Not HTML5.
PPT
(In)Security Implication in the JS Universe
PDF
[D2 campus seminar]웹브라우저 엔진
PDF
Get Ahead with HTML5 on Moible
PDF
Startup eng-camp 3
PPTX
Building AR and VR Experiences for Web Apps with JavaScript
PPTX
Google I/O 2012 - Protecting your user experience while integrating 3rd party...
PDF
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
ODP
Desenvolvimento Mobile Híbrido
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Shifting Gears
Come abbiamo scalato Dazn con micro-architetture
Troubleshooting SEO for JS Frameworks - Patrick Stox - DTD 2018
PrairieDevCon 2014 - Web Doesn't Mean Slow
Node azure
Webpack & EcmaScript 6 (Webelement #32)
Alexander Mostovenko "'Devide at impera' with GraphQL and SSR"
What is HTML 5?
[refreshaustin] Adaptive Images in Responsive Web Design
Swt 2009
HTML5ではないサイトを HTML5へ - Change HTML5 from Not HTML5.
(In)Security Implication in the JS Universe
[D2 campus seminar]웹브라우저 엔진
Get Ahead with HTML5 on Moible
Startup eng-camp 3
Building AR and VR Experiences for Web Apps with JavaScript
Google I/O 2012 - Protecting your user experience while integrating 3rd party...
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
Desenvolvimento Mobile Híbrido
Ad

More from ESUG (20)

PDF
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
PDF
Micromaid: A simple Mermaid-like chart generator for Pharo
PDF
Directing Generative AI for Pharo Documentation
PDF
Even Lighter Than Lightweiht: Augmenting Type Inference with Primitive Heuris...
PDF
Composing and Performing Electronic Music on-the-Fly with Pharo and Coypu
PDF
Gamifying Agent-Based Models in Cormas: Towards the Playable Architecture for...
PDF
Analysing Python Machine Learning Notebooks with Moose
PDF
FASTTypeScript metamodel generation using FAST traits and TreeSitter project
PDF
Migrating Katalon Studio Tests to Playwright with Model Driven Engineering
PDF
Package-Aware Approach for Repository-Level Code Completion in Pharo
PDF
Evaluating Benchmark Quality: a Mutation-Testing- Based Methodology
PDF
An Analysis of Inline Method Refactoring
PDF
Identification of unnecessary object allocations using static escape analysis
PDF
Control flow-sensitive optimizations In the Druid Meta-Compiler
PDF
Clean Blocks (IWST 2025, Gdansk, Poland)
PDF
Encoding for Objects Matters (IWST 2025)
PDF
Challenges of Transpiling Smalltalk to JavaScript
PDF
Immersive experiences: what Pharo users do!
PDF
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
PDF
Cavrois - an Organic Window Management (ESUG 2025)
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
Micromaid: A simple Mermaid-like chart generator for Pharo
Directing Generative AI for Pharo Documentation
Even Lighter Than Lightweiht: Augmenting Type Inference with Primitive Heuris...
Composing and Performing Electronic Music on-the-Fly with Pharo and Coypu
Gamifying Agent-Based Models in Cormas: Towards the Playable Architecture for...
Analysing Python Machine Learning Notebooks with Moose
FASTTypeScript metamodel generation using FAST traits and TreeSitter project
Migrating Katalon Studio Tests to Playwright with Model Driven Engineering
Package-Aware Approach for Repository-Level Code Completion in Pharo
Evaluating Benchmark Quality: a Mutation-Testing- Based Methodology
An Analysis of Inline Method Refactoring
Identification of unnecessary object allocations using static escape analysis
Control flow-sensitive optimizations In the Druid Meta-Compiler
Clean Blocks (IWST 2025, Gdansk, Poland)
Encoding for Objects Matters (IWST 2025)
Challenges of Transpiling Smalltalk to JavaScript
Immersive experiences: what Pharo users do!
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
Cavrois - an Organic Window Management (ESUG 2025)
Ad

Recently uploaded (20)

PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Machine learning based COVID-19 study performance prediction
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
cuic standard and advanced reporting.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
1. Introduction to Computer Programming.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Approach and Philosophy of On baking technology
PPTX
Tartificialntelligence_presentation.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
Group 1 Presentation -Planning and Decision Making .pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Dropbox Q2 2025 Financial Results & Investor Presentation
Diabetes mellitus diagnosis method based random forest with bat algorithm
Machine learning based COVID-19 study performance prediction
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
SOPHOS-XG Firewall Administrator PPT.pptx
Spectroscopy.pptx food analysis technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
“AI and Expert System Decision Support & Business Intelligence Systems”
cuic standard and advanced reporting.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
A comparative analysis of optical character recognition models for extracting...
1. Introduction to Computer Programming.pptx
Unlocking AI with Model Context Protocol (MCP)
Approach and Philosophy of On baking technology
Tartificialntelligence_presentation.pptx
Electronic commerce courselecture one. Pdf
Per capita expenditure prediction using model stacking based on satellite ima...

PharoJS for Real World Applications