SlideShare une entreprise Scribd logo
1  sur  42
Télécharger pour lire hors ligne
Web Development
with Delphi and React
Sviluppo Web con Delphi e React
Who am I?
About me
Marco Breveglieri
Software and Web Developer
www.compilaquindiva.com
Via De Gasperi 14
42019 Scandiano (RE)
ITALY
You might find interesting…
Delphi Succinctly
Learn the fundamentals of Delphi
to build a variety of solutions for
many devices and platforms in
about 100 pages.
Find more here:
👉 http://bit.ly/delphi-succinctly
You might find interesting…
Delphi Podcast
The first Italian podcast
about Delphi.
Listen here:
👉 http://www.delphipodcast.com
and also take part in it!
You might find interesting…
Component Tales
Find out what Delphi components
do when you close the IDE...
Smile (if you can) here:
👉 https://twitter.com/ComponentTales
Modern Web Applications
Not these kind of app
Web Server Fat Applications
Based on
• IntraWeb
• ASP.NET Web Forms
are no more a good idea now. 😉
Web Server "Fat" Applications
Benefits
• Hide the details of HTTP
• Easy for developers with
experience in desktop apps
• Leverage RAD tools support
• Are ideal for prototyping
Disadvantages
• Hide the details of HTTP
• Page/View state could become
very large
• High bandwidth, memory and
server CPU consumption
• Lower scalability
• Designer/Developer task
separation is difficult
• Hard to Unit Test
Modern Web Applications
• Use standard Web technologies and languages
Are they difficult to grasp?
JavaScript language
At the beginning…
Today is…
Evolving Fast
JavaScript language is living a "second youth". 👶
• It has extended support by browsers
• New versions and standards are coming (ES6)
• There are supersets that make programmer life easier (TypeScript)
HTML5 new APIs
•Canvas / SVG
•WebGL
•File API
•Indexed DB
•Media API
•Offline support
•Web Sockets
•Web Workers
•Web Storage
•Geo-location API
•Fullscreen support
DOM (Document Object Model)
DOM (Document Object Model)
• It is an object model
• It is a hierarchical tree of nodes
• It represents the elements of a Web page
• It offers objects and members to add, delete, create
elements in your page
Let's see some code
JQuery
JQuery is a JavaScript library that
• Simplifies access to the DOM
• Re-uses CSS syntax to select elements
• Provides additional features
• Manages the difference from browser to browser
but it is not enough to develop a large scale application. 😓
Let's see some code
Single Page Applications (SPA)
A Single Page Application (SPA)
• Consists of only a single (HTML) page
• Mimics the responsiveness of desktop apps
• Makes the user experience more fluid
• Does not reload the page in the browser but uses AJAX
• User Interface is update dynamically in response to an action
• Data and resource transfer is more efficient
To give you an idea…
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Single Page Application</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div id="container">
<!-- Qui viene generata l’applicazione -->
</div>
<script src="framework.js"></script>
</body>
</html>
Let's React
What is React?
React is a JavaScript library
to manage UI in Web Applications.
• Built by Facebook
• Used in Facebook and Instagram
• Thinking in MVC, React
represents the "V"
• It is really fast (thanks to the
Virtual DOM)
• It is based on components (a
concept very clear to Delphi
developers)
Facebook Case Study
React Components
•Encapsulated
•Reusable
•Composable
•Easy to design and write
React vs…
JQuery
• Imperative Programming
• Need to assign IDs to elements
• Event-Driven approach
• Leads to "zuppa code"
AngularJS (ver. 1)
• Oscillating learning curve (but
Angular is a full framework)
• Separation of Responsibility
(instead of Separation of
Concerns)
• Proliferation of directives and
scopes
Let's see some code
JSX Syntax
JSX lets you mix JavaScript code and HTML.
• Makes it easy to write HTML templates
• Saves you from calling React functions
• Need to be "transpiled" (offline or live in the browser)
• Manages the elements of Virtual DOM *
(*) We will talk about that in a minute… 🕓
Component Properties/State
Properties
• Define immutable values inside
the component
• They are useful for initialization
• You can read them with
this.props in the code
State
• Define values that is subject to
change
• When state change, React
updates the UI
• You can read the state using
this.state in the code
Inside React
Limits of classical DOM
• It is a "black box" provided by the browser
• You cannot change its code
• You cannot optimize it and get better performances
• You cannot specialize it for specific scenarios
• It imposes an "imperative style" of coding
• The code based on DOM is less mantainable
• Sometimes it is a real bottleneck
React Virtual DOM
• It is a virtual representation of the page in memory
• It mirrors the real browser DOM
• When the page must be updated
• React compares the VDOM with the real DOM to determine the differences
between the two
• React apply changes to the underlying DOM based on these differences
• Pages get updated in the fastest and most efficient way! ⚡⚡⚡
React Elements
●ReactNode
represents a single "node" in VDOM
○ReactElement: represents a HTML element
○ReactText: represents a portion of text content
●ReactFragment
○ReactNode[ ]: is an array of ReactNodes.
React Elements
To create new elements, call the createElement() function.
ReactElement createElement(
string/ReactClass type,
[object props],
[children ...]
)
Let's see some code
Component Lifecycle
Each component can implement a set of functions to manage the
main moments of its lifetime.
Most important functions are:
render()
getInitialState()
componentWillMount()
componentDidMount()
componentWillUnmount()
Put Everything Together
You must combine all the elements we have seen till now.
• Create the main page of your SPA
• Import libraries and stylesheets you need (including React!)
• Create scripts for your components
• Call the ReactDOM.render()function to render the UI
Let's see more demos! 👍
Let's see some code
Wire-up a (Delphi) backend
Delphi is a great tool for building backends! (soon also in Linux)
• There are nice libraries you can use
• DataSnap / EMS
• Delphi MVC Framework
• MARS Curiosity
• Indy Components
• Thanks to FireDAC, you can connect to any database you want
• Can be invoked through AJAX from any client application (*)
(*) Use the library/framework you prefer client-side for HTTP/REST communication
Questions?
Don't be afraid
of asking…
Thanks!
😇

Contenu connexe

Tendances (20)

jQuery - Chapter 3 - Effects
jQuery - Chapter 3 - Effects  jQuery - Chapter 3 - Effects
jQuery - Chapter 3 - Effects
 
Introduction to spring boot
Introduction to spring bootIntroduction to spring boot
Introduction to spring boot
 
Introduction à React
Introduction à ReactIntroduction à React
Introduction à React
 
Introduction to react
Introduction to reactIntroduction to react
Introduction to react
 
Servlet.ppt
Servlet.pptServlet.ppt
Servlet.ppt
 
reactJS
reactJSreactJS
reactJS
 
introduction to Vue.js 3
introduction to Vue.js 3 introduction to Vue.js 3
introduction to Vue.js 3
 
React + Redux Introduction
React + Redux IntroductionReact + Redux Introduction
React + Redux Introduction
 
Initiation à Express js
Initiation à Express jsInitiation à Express js
Initiation à Express js
 
Support de cours angular
Support de cours angularSupport de cours angular
Support de cours angular
 
Node.js Express Framework
Node.js Express FrameworkNode.js Express Framework
Node.js Express Framework
 
Angular kickstart slideshare
Angular kickstart   slideshareAngular kickstart   slideshare
Angular kickstart slideshare
 
Laravel Tutorial PPT
Laravel Tutorial PPTLaravel Tutorial PPT
Laravel Tutorial PPT
 
React workshop
React workshopReact workshop
React workshop
 
Javascript Design Patterns
Javascript Design PatternsJavascript Design Patterns
Javascript Design Patterns
 
Vue, vue router, vuex
Vue, vue router, vuexVue, vue router, vuex
Vue, vue router, vuex
 
Digital Signal Processing w/ Javascript
Digital Signal Processing w/ JavascriptDigital Signal Processing w/ Javascript
Digital Signal Processing w/ Javascript
 
Introduction Node.js
Introduction Node.jsIntroduction Node.js
Introduction Node.js
 
React Native - JSday
React Native - JSdayReact Native - JSday
React Native - JSday
 
Javascript Design Patterns
Javascript Design PatternsJavascript Design Patterns
Javascript Design Patterns
 

En vedette

Create a Bot with Delphi and Telegram - ITDevCon 2016
Create a Bot with Delphi and Telegram - ITDevCon 2016Create a Bot with Delphi and Telegram - ITDevCon 2016
Create a Bot with Delphi and Telegram - ITDevCon 2016Marco Breveglieri
 
Sviluppo Web con React e Delphi - Seminario Delphi Day 2016, Piacenza
Sviluppo Web con React e Delphi - Seminario Delphi Day 2016, PiacenzaSviluppo Web con React e Delphi - Seminario Delphi Day 2016, Piacenza
Sviluppo Web con React e Delphi - Seminario Delphi Day 2016, PiacenzaMarco Breveglieri
 
Arduino plus Delphi Mobile Apps - Basics
Arduino plus Delphi Mobile Apps - BasicsArduino plus Delphi Mobile Apps - Basics
Arduino plus Delphi Mobile Apps - BasicsVic Fernandes
 
Integrando Skype em aplicações Delphi
Integrando Skype em aplicações DelphiIntegrando Skype em aplicações Delphi
Integrando Skype em aplicações DelphiAndreano Lanusse
 
Melhor que whatsapp: telegram + php
Melhor que whatsapp: telegram + phpMelhor que whatsapp: telegram + php
Melhor que whatsapp: telegram + phpVitor Mattos
 
Ebook I - membuat bot telegram dengan php
Ebook I  - membuat bot telegram dengan phpEbook I  - membuat bot telegram dengan php
Ebook I - membuat bot telegram dengan phpHasanudin H Syafaat
 
BDD + PHP = behat!
BDD + PHP = behat!BDD + PHP = behat!
BDD + PHP = behat!Vitor Mattos
 

En vedette (8)

Create a Bot with Delphi and Telegram - ITDevCon 2016
Create a Bot with Delphi and Telegram - ITDevCon 2016Create a Bot with Delphi and Telegram - ITDevCon 2016
Create a Bot with Delphi and Telegram - ITDevCon 2016
 
Sviluppo Web con React e Delphi - Seminario Delphi Day 2016, Piacenza
Sviluppo Web con React e Delphi - Seminario Delphi Day 2016, PiacenzaSviluppo Web con React e Delphi - Seminario Delphi Day 2016, Piacenza
Sviluppo Web con React e Delphi - Seminario Delphi Day 2016, Piacenza
 
Arduino plus Delphi Mobile Apps - Basics
Arduino plus Delphi Mobile Apps - BasicsArduino plus Delphi Mobile Apps - Basics
Arduino plus Delphi Mobile Apps - Basics
 
Integrando Skype em aplicações Delphi
Integrando Skype em aplicações DelphiIntegrando Skype em aplicações Delphi
Integrando Skype em aplicações Delphi
 
Melhor que whatsapp: telegram + php
Melhor que whatsapp: telegram + phpMelhor que whatsapp: telegram + php
Melhor que whatsapp: telegram + php
 
Ebook I - membuat bot telegram dengan php
Ebook I  - membuat bot telegram dengan phpEbook I  - membuat bot telegram dengan php
Ebook I - membuat bot telegram dengan php
 
BDD + PHP = behat!
BDD + PHP = behat!BDD + PHP = behat!
BDD + PHP = behat!
 
Hackeando Dados públicos com python
Hackeando Dados públicos com pythonHackeando Dados públicos com python
Hackeando Dados públicos com python
 

Similaire à Web Development with Delphi and React

Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]GDSC UofT Mississauga
 
Comparing Angular and React JS for SPAs
Comparing Angular and React JS for SPAsComparing Angular and React JS for SPAs
Comparing Angular and React JS for SPAsJennifer Estrada
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperFabrit Global
 
Introduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptxIntroduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptxSHAIKIRFAN715544
 
ReactJS - Re-rendering pages in the age of the mutable DOM
ReactJS - Re-rendering pages in the age of the mutable DOMReactJS - Re-rendering pages in the age of the mutable DOM
ReactJS - Re-rendering pages in the age of the mutable DOMMarc Cyr
 
React.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UIReact.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UIMarcin Grzywaczewski
 
Introduction to React JS.pptx
Introduction to React JS.pptxIntroduction to React JS.pptx
Introduction to React JS.pptxSHAIKIRFAN715544
 
RichFaces CDK: Rapid JSF Component Development
RichFaces CDK: Rapid JSF Component DevelopmentRichFaces CDK: Rapid JSF Component Development
RichFaces CDK: Rapid JSF Component DevelopmentLukáš Fryč
 
Wessel Loth - Fire your Frontend Framework with Lit - TEQnation 2022.pdf
Wessel Loth - Fire your Frontend Framework with Lit - TEQnation 2022.pdfWessel Loth - Fire your Frontend Framework with Lit - TEQnation 2022.pdf
Wessel Loth - Fire your Frontend Framework with Lit - TEQnation 2022.pdfWessel Loth
 
Customizing ERModernLook Applications
Customizing ERModernLook ApplicationsCustomizing ERModernLook Applications
Customizing ERModernLook ApplicationsWO Community
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsAndrew Ferrier
 
AngularJS 1.x - your first application (problems and solutions)
AngularJS 1.x - your first application (problems and solutions)AngularJS 1.x - your first application (problems and solutions)
AngularJS 1.x - your first application (problems and solutions)Igor Talevski
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialThomas Daly
 
l1-reactnativeintroduction-160816150540.pdf
l1-reactnativeintroduction-160816150540.pdfl1-reactnativeintroduction-160816150540.pdf
l1-reactnativeintroduction-160816150540.pdfHương Trà Pé Xjnk
 
Web Components
Web ComponentsWeb Components
Web ComponentsFITC
 
Web component driven development
Web component driven developmentWeb component driven development
Web component driven developmentGil Fink
 
React Native Introduction: Making Real iOS and Android Mobile App By JavaScript
React Native Introduction: Making Real iOS and Android Mobile App By JavaScriptReact Native Introduction: Making Real iOS and Android Mobile App By JavaScript
React Native Introduction: Making Real iOS and Android Mobile App By JavaScriptKobkrit Viriyayudhakorn
 

Similaire à Web Development with Delphi and React (20)

React.js at Cortex
React.js at CortexReact.js at Cortex
React.js at Cortex
 
Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]
 
Comparing Angular and React JS for SPAs
Comparing Angular and React JS for SPAsComparing Angular and React JS for SPAs
Comparing Angular and React JS for SPAs
 
React Tech Salon
React Tech SalonReact Tech Salon
React Tech Salon
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular Developer
 
Introduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptxIntroduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptx
 
ReactJS - Re-rendering pages in the age of the mutable DOM
ReactJS - Re-rendering pages in the age of the mutable DOMReactJS - Re-rendering pages in the age of the mutable DOM
ReactJS - Re-rendering pages in the age of the mutable DOM
 
React.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UIReact.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UI
 
Introduction to React JS.pptx
Introduction to React JS.pptxIntroduction to React JS.pptx
Introduction to React JS.pptx
 
RichFaces CDK: Rapid JSF Component Development
RichFaces CDK: Rapid JSF Component DevelopmentRichFaces CDK: Rapid JSF Component Development
RichFaces CDK: Rapid JSF Component Development
 
Wessel Loth - Fire your Frontend Framework with Lit - TEQnation 2022.pdf
Wessel Loth - Fire your Frontend Framework with Lit - TEQnation 2022.pdfWessel Loth - Fire your Frontend Framework with Lit - TEQnation 2022.pdf
Wessel Loth - Fire your Frontend Framework with Lit - TEQnation 2022.pdf
 
Customizing ERModernLook Applications
Customizing ERModernLook ApplicationsCustomizing ERModernLook Applications
Customizing ERModernLook Applications
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web Applications
 
AngularJS 1.x - your first application (problems and solutions)
AngularJS 1.x - your first application (problems and solutions)AngularJS 1.x - your first application (problems and solutions)
AngularJS 1.x - your first application (problems and solutions)
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material
 
l1-reactnativeintroduction-160816150540.pdf
l1-reactnativeintroduction-160816150540.pdfl1-reactnativeintroduction-160816150540.pdf
l1-reactnativeintroduction-160816150540.pdf
 
Web Components
Web ComponentsWeb Components
Web Components
 
Web summit.pptx
Web summit.pptxWeb summit.pptx
Web summit.pptx
 
Web component driven development
Web component driven developmentWeb component driven development
Web component driven development
 
React Native Introduction: Making Real iOS and Android Mobile App By JavaScript
React Native Introduction: Making Real iOS and Android Mobile App By JavaScriptReact Native Introduction: Making Real iOS and Android Mobile App By JavaScript
React Native Introduction: Making Real iOS and Android Mobile App By JavaScript
 

Plus de Marco Breveglieri

Delphi & Dintorni Webinar - Diventa un mago del Testing
Delphi & Dintorni Webinar - Diventa un mago del TestingDelphi & Dintorni Webinar - Diventa un mago del Testing
Delphi & Dintorni Webinar - Diventa un mago del TestingMarco Breveglieri
 
Delphi & Dintorni Webinar - Padroneggiare i principi SOLID con Delphi
Delphi & Dintorni Webinar - Padroneggiare i principi SOLID con DelphiDelphi & Dintorni Webinar - Padroneggiare i principi SOLID con Delphi
Delphi & Dintorni Webinar - Padroneggiare i principi SOLID con DelphiMarco Breveglieri
 
Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Confer...
Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Confer...Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Confer...
Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Confer...Marco Breveglieri
 
Creare un Information Radiator con Delphi
Creare un Information Radiator con DelphiCreare un Information Radiator con Delphi
Creare un Information Radiator con DelphiMarco Breveglieri
 
"Non Aprite Quella Unit!" ovvero "Scrivere Clean Code in Delphi
"Non Aprite Quella Unit!" ovvero "Scrivere Clean Code in Delphi"Non Aprite Quella Unit!" ovvero "Scrivere Clean Code in Delphi
"Non Aprite Quella Unit!" ovvero "Scrivere Clean Code in DelphiMarco Breveglieri
 
REST API fantastiche e dove trovarle
REST API fantastiche e dove trovarleREST API fantastiche e dove trovarle
REST API fantastiche e dove trovarleMarco Breveglieri
 
Applicazioni Web ultra-performanti con Vue.js e Delphi
Applicazioni Web ultra-performanti con Vue.js e DelphiApplicazioni Web ultra-performanti con Vue.js e Delphi
Applicazioni Web ultra-performanti con Vue.js e DelphiMarco Breveglieri
 
Reportage "RAD Studio XE2 World Tour"
Reportage "RAD Studio XE2 World Tour"Reportage "RAD Studio XE2 World Tour"
Reportage "RAD Studio XE2 World Tour"Marco Breveglieri
 

Plus de Marco Breveglieri (9)

Delphi & Dintorni Webinar - Diventa un mago del Testing
Delphi & Dintorni Webinar - Diventa un mago del TestingDelphi & Dintorni Webinar - Diventa un mago del Testing
Delphi & Dintorni Webinar - Diventa un mago del Testing
 
Delphi & Dintorni Webinar - Padroneggiare i principi SOLID con Delphi
Delphi & Dintorni Webinar - Padroneggiare i principi SOLID con DelphiDelphi & Dintorni Webinar - Padroneggiare i principi SOLID con Delphi
Delphi & Dintorni Webinar - Padroneggiare i principi SOLID con Delphi
 
Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Confer...
Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Confer...Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Confer...
Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Confer...
 
Creare un Information Radiator con Delphi
Creare un Information Radiator con DelphiCreare un Information Radiator con Delphi
Creare un Information Radiator con Delphi
 
"Non Aprite Quella Unit!" ovvero "Scrivere Clean Code in Delphi
"Non Aprite Quella Unit!" ovvero "Scrivere Clean Code in Delphi"Non Aprite Quella Unit!" ovvero "Scrivere Clean Code in Delphi
"Non Aprite Quella Unit!" ovvero "Scrivere Clean Code in Delphi
 
REST API fantastiche e dove trovarle
REST API fantastiche e dove trovarleREST API fantastiche e dove trovarle
REST API fantastiche e dove trovarle
 
Applicazioni Web ultra-performanti con Vue.js e Delphi
Applicazioni Web ultra-performanti con Vue.js e DelphiApplicazioni Web ultra-performanti con Vue.js e Delphi
Applicazioni Web ultra-performanti con Vue.js e Delphi
 
Reportage Delphi Day 2012
Reportage Delphi Day 2012Reportage Delphi Day 2012
Reportage Delphi Day 2012
 
Reportage "RAD Studio XE2 World Tour"
Reportage "RAD Studio XE2 World Tour"Reportage "RAD Studio XE2 World Tour"
Reportage "RAD Studio XE2 World Tour"
 

Dernier

Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdfAndrey Devyatkin
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
Data modeling 101 - Basics - Software Domain
Data modeling 101 - Basics - Software DomainData modeling 101 - Basics - Software Domain
Data modeling 101 - Basics - Software DomainAbdul Ahad
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 

Dernier (20)

Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
Data modeling 101 - Basics - Software Domain
Data modeling 101 - Basics - Software DomainData modeling 101 - Basics - Software Domain
Data modeling 101 - Basics - Software Domain
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 

Web Development with Delphi and React

  • 1. Web Development with Delphi and React Sviluppo Web con Delphi e React
  • 3. About me Marco Breveglieri Software and Web Developer www.compilaquindiva.com Via De Gasperi 14 42019 Scandiano (RE) ITALY
  • 4. You might find interesting… Delphi Succinctly Learn the fundamentals of Delphi to build a variety of solutions for many devices and platforms in about 100 pages. Find more here: 👉 http://bit.ly/delphi-succinctly
  • 5. You might find interesting… Delphi Podcast The first Italian podcast about Delphi. Listen here: 👉 http://www.delphipodcast.com and also take part in it!
  • 6. You might find interesting… Component Tales Find out what Delphi components do when you close the IDE... Smile (if you can) here: 👉 https://twitter.com/ComponentTales
  • 8. Not these kind of app Web Server Fat Applications Based on • IntraWeb • ASP.NET Web Forms are no more a good idea now. 😉
  • 9. Web Server "Fat" Applications Benefits • Hide the details of HTTP • Easy for developers with experience in desktop apps • Leverage RAD tools support • Are ideal for prototyping Disadvantages • Hide the details of HTTP • Page/View state could become very large • High bandwidth, memory and server CPU consumption • Lower scalability • Designer/Developer task separation is difficult • Hard to Unit Test
  • 10. Modern Web Applications • Use standard Web technologies and languages
  • 11. Are they difficult to grasp?
  • 15. Evolving Fast JavaScript language is living a "second youth". 👶 • It has extended support by browsers • New versions and standards are coming (ES6) • There are supersets that make programmer life easier (TypeScript)
  • 16. HTML5 new APIs •Canvas / SVG •WebGL •File API •Indexed DB •Media API •Offline support •Web Sockets •Web Workers •Web Storage •Geo-location API •Fullscreen support
  • 17. DOM (Document Object Model) DOM (Document Object Model) • It is an object model • It is a hierarchical tree of nodes • It represents the elements of a Web page • It offers objects and members to add, delete, create elements in your page
  • 19. JQuery JQuery is a JavaScript library that • Simplifies access to the DOM • Re-uses CSS syntax to select elements • Provides additional features • Manages the difference from browser to browser but it is not enough to develop a large scale application. 😓
  • 21. Single Page Applications (SPA) A Single Page Application (SPA) • Consists of only a single (HTML) page • Mimics the responsiveness of desktop apps • Makes the user experience more fluid • Does not reload the page in the browser but uses AJAX • User Interface is update dynamically in response to an action • Data and resource transfer is more efficient
  • 22. To give you an idea… <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Single Page Application</title> <link rel="stylesheet" href="style.css" /> </head> <body> <div id="container"> <!-- Qui viene generata l’applicazione --> </div> <script src="framework.js"></script> </body> </html>
  • 24. What is React? React is a JavaScript library to manage UI in Web Applications. • Built by Facebook • Used in Facebook and Instagram • Thinking in MVC, React represents the "V" • It is really fast (thanks to the Virtual DOM) • It is based on components (a concept very clear to Delphi developers)
  • 27. React vs… JQuery • Imperative Programming • Need to assign IDs to elements • Event-Driven approach • Leads to "zuppa code" AngularJS (ver. 1) • Oscillating learning curve (but Angular is a full framework) • Separation of Responsibility (instead of Separation of Concerns) • Proliferation of directives and scopes
  • 29. JSX Syntax JSX lets you mix JavaScript code and HTML. • Makes it easy to write HTML templates • Saves you from calling React functions • Need to be "transpiled" (offline or live in the browser) • Manages the elements of Virtual DOM * (*) We will talk about that in a minute… 🕓
  • 30. Component Properties/State Properties • Define immutable values inside the component • They are useful for initialization • You can read them with this.props in the code State • Define values that is subject to change • When state change, React updates the UI • You can read the state using this.state in the code
  • 32. Limits of classical DOM • It is a "black box" provided by the browser • You cannot change its code • You cannot optimize it and get better performances • You cannot specialize it for specific scenarios • It imposes an "imperative style" of coding • The code based on DOM is less mantainable • Sometimes it is a real bottleneck
  • 33. React Virtual DOM • It is a virtual representation of the page in memory • It mirrors the real browser DOM • When the page must be updated • React compares the VDOM with the real DOM to determine the differences between the two • React apply changes to the underlying DOM based on these differences • Pages get updated in the fastest and most efficient way! ⚡⚡⚡
  • 34. React Elements ●ReactNode represents a single "node" in VDOM ○ReactElement: represents a HTML element ○ReactText: represents a portion of text content ●ReactFragment ○ReactNode[ ]: is an array of ReactNodes.
  • 35. React Elements To create new elements, call the createElement() function. ReactElement createElement( string/ReactClass type, [object props], [children ...] )
  • 37. Component Lifecycle Each component can implement a set of functions to manage the main moments of its lifetime. Most important functions are: render() getInitialState() componentWillMount() componentDidMount() componentWillUnmount()
  • 38. Put Everything Together You must combine all the elements we have seen till now. • Create the main page of your SPA • Import libraries and stylesheets you need (including React!) • Create scripts for your components • Call the ReactDOM.render()function to render the UI Let's see more demos! 👍
  • 40. Wire-up a (Delphi) backend Delphi is a great tool for building backends! (soon also in Linux) • There are nice libraries you can use • DataSnap / EMS • Delphi MVC Framework • MARS Curiosity • Indy Components • Thanks to FireDAC, you can connect to any database you want • Can be invoked through AJAX from any client application (*) (*) Use the library/framework you prefer client-side for HTTP/REST communication