Preview of WebST Web Components with Smalltalk

nourybouraqadi 48 views 15 slides Jul 11, 2024
Slide 1
Slide 1 of 15
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15

About This Presentation

WebST aims to simplify the development of web clients using web components. A web component is created by defining a web DOM (Document Object Model) class that is instantiated by web browsers upon parsing specific custom HTML tags. WebST facilitates the creation and testing of such classes using Pha...


Slide Content

1
WebST

Web Components with Smalltalk
Zürich Smalltalk Meetup, April 26th 2024
Preview of

2
Noury
Bouraqadi

Run on JavaScript
Develop in Pharo
MIT
License

100%
Pharo
Javascript
100%
Development Production
1. Write Tests
3. Export to JS
2. Pass the tests
4

5
Building Mobile Apps with
CSS
HTML

6
Web Apps with

PLC3000.com
7

8
How to build a Web UI?
HTML = Structure
CSS = Look
JS = Behavior

9
Simple UI with HTML + CSS + JS
<span class="bestLanguage" onclick="announceFan(this)">
Smalltalk </span>
<style> .bestLanguage {
color:blue; } </style>

<script> function announceFan(htmlElement) {
window.alert("I love " + htmlElement.textContent);
} </script>
Demo

<h1><span class="bestLanguage" onclick="announceFan(this)">
Smalltalk </span> Fans attending ESUG 2024:
<span id="fansCount">102</span></h1>
<style> .bestLanguage {
color:blue;
text-decoration: underline;}

#fansCount { color: red; } </style>

<script> function announceFan(htmlElement) {
window.alert("I love " + htmlElement.textContent);
let counter = document.getElementById("fansCount");
counter.textContent = Number(counter.textContent) + 1;
} </script>
10
Reuse with HTML + CSS + JS
Demo

●Reuse only via Copy/Paste
○Pure Evil!
○No inheritance
●Complex web pages
○no abstractions/boundaries = it's all mixed
●Collisions and unwanted side-effects with CSS and JS
●No Smalltalk ;-)
11
What’s Wrong

●Custom HTML tags
●Encapsulation
●Supported by all web browsers
12
Web Components W3C Standard

●Develop & Test Web Components within the Image
●Deploy Standalone code HTML + CSS + JS
●Static Generation of HTML & JS
13
WebST = Web Components with Smalltalk

14
WebST = Web Components with Smalltalk
Demo

15
WebST

Web Components with Smalltalk
https://github.com/bouraqadi/WebST