SlideShare a Scribd company logo
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!
😇

More Related Content

What's hot (20)

PPT
ASP.NET MVC Presentation
ivpol
 
PPT
Java database connectivity
Vaishali Modi
 
PPTX
Introduction to Spring Framework
Serhat Can
 
PDF
Lets make a better react form
Yao Nien Chung
 
PDF
Spring boot introduction
Rasheed Waraich
 
PDF
Introducing Clean Architecture
Roc Boronat
 
PPTX
Kotlin InDepth Tutorial for beginners 2022
Simplilearn
 
PDF
Data Persistence in Android with Room Library
Reinvently
 
PDF
Retrofit
Amin Cheloh
 
PDF
Spring Framework - AOP
Dzmitry Naskou
 
PPTX
React Native
Fatih Şimşek
 
PPTX
Spring boot
Gyanendra Yadav
 
PPT
Sq lite database
AYESHA JAVED
 
PPTX
Introduction to Spring Boot
Purbarun Chakrabarti
 
PDF
Clean Architecture
Badoo
 
PPT
SQLITE Android
Sourabh Sahu
 
PPTX
MVVM ( Model View ViewModel )
Ahmed Emad
 
PDF
Angular - Chapter 4 - Data and Event Handling
WebStackAcademy
 
PDF
Asp.Net Core MVC , Razor page , Entity Framework Core
mohamed elshafey
 
ASP.NET MVC Presentation
ivpol
 
Java database connectivity
Vaishali Modi
 
Introduction to Spring Framework
Serhat Can
 
Lets make a better react form
Yao Nien Chung
 
Spring boot introduction
Rasheed Waraich
 
Introducing Clean Architecture
Roc Boronat
 
Kotlin InDepth Tutorial for beginners 2022
Simplilearn
 
Data Persistence in Android with Room Library
Reinvently
 
Retrofit
Amin Cheloh
 
Spring Framework - AOP
Dzmitry Naskou
 
React Native
Fatih Şimşek
 
Spring boot
Gyanendra Yadav
 
Sq lite database
AYESHA JAVED
 
Introduction to Spring Boot
Purbarun Chakrabarti
 
Clean Architecture
Badoo
 
SQLITE Android
Sourabh Sahu
 
MVVM ( Model View ViewModel )
Ahmed Emad
 
Angular - Chapter 4 - Data and Event Handling
WebStackAcademy
 
Asp.Net Core MVC , Razor page , Entity Framework Core
mohamed elshafey
 

Viewers also liked (8)

PDF
Create a Bot with Delphi and Telegram - ITDevCon 2016
Marco Breveglieri
 
PDF
Sviluppo Web con React e Delphi - Seminario Delphi Day 2016, Piacenza
Marco Breveglieri
 
PPTX
Arduino plus Delphi Mobile Apps - Basics
Vic Fernandes
 
PPTX
Integrando Skype em aplicações Delphi
Andreano Lanusse
 
PDF
Melhor que whatsapp: telegram + php
Vitor Mattos
 
PDF
Ebook I - membuat bot telegram dengan php
Hasanudin H Syafaat
 
PDF
BDD + PHP = behat!
Vitor Mattos
 
PDF
Hackeando Dados públicos com python
FATEC São José dos Campos
 
Create a Bot with Delphi and Telegram - ITDevCon 2016
Marco Breveglieri
 
Sviluppo Web con React e Delphi - Seminario Delphi Day 2016, Piacenza
Marco Breveglieri
 
Arduino plus Delphi Mobile Apps - Basics
Vic Fernandes
 
Integrando Skype em aplicações Delphi
Andreano Lanusse
 
Melhor que whatsapp: telegram + php
Vitor Mattos
 
Ebook I - membuat bot telegram dengan php
Hasanudin H Syafaat
 
BDD + PHP = behat!
Vitor Mattos
 
Hackeando Dados públicos com python
FATEC São José dos Campos
 
Ad

Similar to Web Development with Delphi and React - ITDevCon 2016 (20)

PPTX
React js
Nikhil Karkra
 
PDF
Review on React JS
ijtsrd
 
PDF
React Tech Salon
Chenguang ZHANG
 
PDF
ReactJS - frontend web developing reactjs
ducpvcontact
 
PPTX
Reactjs notes.pptx for web development- tutorial and theory
jobinThomas54
 
PDF
Reactjs Basics
Hamid Ghorbani
 
PDF
Tech Talk on ReactJS
Atlogys Technical Consulting
 
PPTX
Introduction to React
Austin Garrod
 
PPTX
User Interface
Nikunj Pansuriya
 
PPTX
Full Stack_Reac web Development and Application
Jeyarajs7
 
PPTX
intro to react| React: dynamic UIs, component-based, virtual DOM, JSX, effici...
IbadUddin4
 
PDF
Getting Started with React, When You’re an Angular Developer
Fabrit Global
 
PPTX
Progressive Web Apps and React
Mike Melusky
 
PDF
React Js Simplified
Sunil Yadav
 
PDF
FRONTEND DEVELOPMENT WITH REACT.JS
IRJET Journal
 
PDF
React‌ برای دولوپرها
Web Standards School
 
PDF
React for Developers
Siamak Mokhtari
 
PDF
theory-slides-vueh3urh4ur4ur4r44oirj4riu4ri
paridhiagarwal129
 
PPTX
React101 v3
Janice Gluck
 
React js
Nikhil Karkra
 
Review on React JS
ijtsrd
 
React Tech Salon
Chenguang ZHANG
 
ReactJS - frontend web developing reactjs
ducpvcontact
 
Reactjs notes.pptx for web development- tutorial and theory
jobinThomas54
 
Reactjs Basics
Hamid Ghorbani
 
Tech Talk on ReactJS
Atlogys Technical Consulting
 
Introduction to React
Austin Garrod
 
User Interface
Nikunj Pansuriya
 
Full Stack_Reac web Development and Application
Jeyarajs7
 
intro to react| React: dynamic UIs, component-based, virtual DOM, JSX, effici...
IbadUddin4
 
Getting Started with React, When You’re an Angular Developer
Fabrit Global
 
Progressive Web Apps and React
Mike Melusky
 
React Js Simplified
Sunil Yadav
 
FRONTEND DEVELOPMENT WITH REACT.JS
IRJET Journal
 
React‌ برای دولوپرها
Web Standards School
 
React for Developers
Siamak Mokhtari
 
theory-slides-vueh3urh4ur4ur4r44oirj4riu4ri
paridhiagarwal129
 
React101 v3
Janice Gluck
 
Ad

More from Marco Breveglieri (9)

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

Recently uploaded (20)

PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PDF
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PDF
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
DOCX
Import Data Form Excel to Tally Services
Tally xperts
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PDF
Executive Business Intelligence Dashboards
vandeslie24
 
PPTX
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
PPTX
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PPTX
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PDF
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
PDF
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
PPTX
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
 
Human Resources Information System (HRIS)
Amity University, Patna
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
Tally software_Introduction_Presentation
AditiBansal54083
 
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
Import Data Form Excel to Tally Services
Tally xperts
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
Executive Business Intelligence Dashboards
vandeslie24
 
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
 

Web Development with Delphi and React - ITDevCon 2016

  • 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