SlideShare a Scribd company logo
Web Programming
Introduction to Web Programming
Remember how the web works?
Fundamentals
●Static vs Dynamic Content
●Client/Server
●HTTP
o Request
o Response
o Headers
o Port 80
o Handshake
Static vs Dynamic HTML
What it means?
Do you think this is Static?
Static Content Flow
Dynamic Content Flow
Static What you see
What the browser renders
<div class="IndicadoresContentDiv">
<table summary="">
<tbody>
<tr>
<td><span title="">Compra</span></td>
<td class="IndicadoresBoxBGR"><span
id="lblCompra">546,37</span>
</td>
</tr>
</tbody>
</table>
<table summary="">
<tbody>
<tr>
<td><span title="">Venta</span></td>
<td class="IndicadoresBoxBGR">
<span id="lblVenta">558,99</span>
</td>
</tr>
</tbody>
</table>
</div>
What the source file looks like
Dynamic What you see
What the browser renders
<?php
$compra = DollarExchange->getBuyValue();
$venta = DollarExchange->getSellValue();
?>
<div class="IndicadoresContentDiv">
<table summary="">
<tbody>
<tr>
<td><span title="">Compra</span></td>
<td class="IndicadoresBoxBGR"><span
id="lblCompra"><?php echo $compra; ?></span>
</td>
</tr>
</tbody>
</table>
<table summary="">
<tbody>
<tr>
<td><span title="">Venta</span></td>
<td class="IndicadoresBoxBGR">
<span id="lblVenta"><?php echo
$venta; ?></span>
</td>
</tr>
</tbody>
</table>
</div>
What the source file look like
Dynamic vs Static HTML
• Features limited to
browser resources.
• Need developer
intervention to change
the content
• Response is always
HTML no matter what.
• Is/Can be cached by the
browser
• You can add some
dynamic features with
Javascript and HTML5
• Tons of libraries to everything
we know that can be done in
Web.
• Content can vary based on a
database change, another site,
the date, no need for developer
intervention
• Response could be anything
that the browser can show for
the same URL. Its generated
dynamically.
• You have to control when to
expire or cache the response
Static Dynamic
●Limited to the
Browser’ resources
(powerful with
HTML5)
●The Web Server looks
for the resource as a
persistent file on disk.
●A Web Server is
enough to serve the
content
●There is no need for
programming skills
●There is no limit (almost) on
what you can do on the Server's
side
●The resource to process is not
always an specific file in the
web server (dynamic).
●Usually depends on a Web and
an Application Server to serve
content
●Requires a high level
programming code
..cont Dynamic vs Static HTML
Static Dynamic
What’s involved in the Dynamic
Content?
• Web Server
• Application Server
• Server Side Coding
– Programming Languages
– Server Side Libraries
– Services
– Configuration Settings
• Other Services
– DBMS (MySQL, PostgreSQL, MongoDB, Oracle)
– Cache (Memcached, Redis)
– Logging
– Third Party APIs
Related
Components
1) The Web Server
The term is used to reference Hardware or software that
servers Web content
Web Server’s Job
• Listen and Responds to HTTP Requests
• Find resource/file to load based on the request (URL).
• Process the file to load
• Delegate the file processing to an Application Server if
needed (when it can’t handle it).
• Build a response that the browser can read.
– HTML, image, file to download
– Redirect
• Examples: Apache, IIS, Nginx, ligthhttpd
cont..
• Files are stored on an specific directory within the Web
Server’s hard drive (DocumentRoot)
• Web Server should be running and listening to an specific
port (80 by default)
• Configuration files used to configure the server behavior
(httpd.conf)
2) Application Server
Their main job is to support the construction of dynamic
pages. It could be a service running on the same Web
Server or standalone.
..cont
●An application server acts as a set of components
accessible to the software developer through an API
defined by the platform itself.
●These components are usually performed in the same
running environment as its web server(s)
●Target much more than just Web page generation: they
implement services like clustering, fail-over, and load-
balancing.
..cont
●Provides access to business logic for use by client
application programs.
●Infinite set of libraries and components for Database
Access, Security, Clustering,
●Some examples: Zend Server (PHP), IBM Websphere (Java
EE), Tomcat (Java), .NET framework (C#), Passenger (RoR),
Node (Javascript), Oracle Weblogic (Java), Glassfish (Java),
JBoss (Java), Unicorn (RoR), Puma (RoR)
3) Server Side Code
• Application server is able to run Programming Languages
that run on the Server
• Some examples: PHP, JSP, ASP, Ruby, Python, Perl, even
Javascript (NodeJS)
• How does server side code looks:
Static vs Dynamic (URLs)
http://localhost/login.html → /var/www/html/login.html
http://localhost/login.html → /var/www/html/index.php
<html>
<head><title>Login</title></head>
<body>
Login Here:
<form></form>
</body>
</html>
<?php
if(“login”) {
require(‘template/login.php’);
} else {
require(‘template/404.php’);
}
?>
login.html
index.php
<html>
<head><title>Login</title></head>
<body>
Login Here:
<form></form>
</body>
</html>
template/login.php
HTTP
The transportation method
HTTP Request/Response
Request Anatomy
Response

More Related Content

Similar to 01 - Web Programming Intro.pptx

Websites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly WebsitesWebsites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly Websites
websiteunlimited
 
21. Application Development and Administration in DBMS
21. Application Development and Administration in DBMS21. Application Development and Administration in DBMS
21. Application Development and Administration in DBMS
koolkampus
 
446-FUNDAMENTALS OF WEB FOR NON DEVELOPERS (Useful-Knowledge)
446-FUNDAMENTALS OF WEB FOR NON DEVELOPERS (Useful-Knowledge)446-FUNDAMENTALS OF WEB FOR NON DEVELOPERS (Useful-Knowledge)
446-FUNDAMENTALS OF WEB FOR NON DEVELOPERS (Useful-Knowledge)
nrvalluri
 
Anvita Gita Supersite Case Study Nov2000
Anvita   Gita Supersite Case Study Nov2000Anvita   Gita Supersite Case Study Nov2000
Anvita Gita Supersite Case Study Nov2000
guest6e7a1b1
 
Fundamentals of Web for Non-Developers
Fundamentals of Web for Non-DevelopersFundamentals of Web for Non-Developers
Fundamentals of Web for Non-Developers
Lemi Orhan Ergin
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
Chamnap Chhorn
 
Fundamentals of Web building
Fundamentals of Web buildingFundamentals of Web building
Fundamentals of Web building
RC Morales
 
L19 Application Architecture
L19 Application ArchitectureL19 Application Architecture
L19 Application Architecture
Ólafur Andri Ragnarsson
 
Servers names
Servers namesServers names
Servers names
Sasidhar Kothuru
 
Servers names
Servers namesServers names
Servers names
Sasidhar Kothuru
 
Web servers
Web serversWeb servers
Web servers
webhostingguy
 
Web server hardware and software
Web server hardware and softwareWeb server hardware and software
Web server hardware and software
Vikram g b
 
HTTP and Website Architecture and Middleware
HTTP and Website Architecture and MiddlewareHTTP and Website Architecture and Middleware
HTTP and Website Architecture and Middleware
Abdul Jalil Tamjid
 
Les Basiques - Web Développement HTML5, CSS3, JS et PHP
Les Basiques - Web  Développement HTML5, CSS3, JS et PHPLes Basiques - Web  Développement HTML5, CSS3, JS et PHP
Les Basiques - Web Développement HTML5, CSS3, JS et PHP
Hamdi Hmidi
 
PPT
PPTPPT
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
Henry S
 
Configuring the Apache Web Server
Configuring the Apache Web ServerConfiguring the Apache Web Server
Configuring the Apache Web Server
webhostingguy
 
Wt unit 1 ppts web development process
Wt unit 1 ppts web development processWt unit 1 ppts web development process
Wt unit 1 ppts web development process
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
 
web development process WT
web development process WTweb development process WT
IT Operations for Web Developers
IT Operations for Web DevelopersIT Operations for Web Developers
IT Operations for Web Developers
Mahmoud Said
 

Similar to 01 - Web Programming Intro.pptx (20)

Websites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly WebsitesWebsites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly Websites
 
21. Application Development and Administration in DBMS
21. Application Development and Administration in DBMS21. Application Development and Administration in DBMS
21. Application Development and Administration in DBMS
 
446-FUNDAMENTALS OF WEB FOR NON DEVELOPERS (Useful-Knowledge)
446-FUNDAMENTALS OF WEB FOR NON DEVELOPERS (Useful-Knowledge)446-FUNDAMENTALS OF WEB FOR NON DEVELOPERS (Useful-Knowledge)
446-FUNDAMENTALS OF WEB FOR NON DEVELOPERS (Useful-Knowledge)
 
Anvita Gita Supersite Case Study Nov2000
Anvita   Gita Supersite Case Study Nov2000Anvita   Gita Supersite Case Study Nov2000
Anvita Gita Supersite Case Study Nov2000
 
Fundamentals of Web for Non-Developers
Fundamentals of Web for Non-DevelopersFundamentals of Web for Non-Developers
Fundamentals of Web for Non-Developers
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
 
Fundamentals of Web building
Fundamentals of Web buildingFundamentals of Web building
Fundamentals of Web building
 
L19 Application Architecture
L19 Application ArchitectureL19 Application Architecture
L19 Application Architecture
 
Servers names
Servers namesServers names
Servers names
 
Servers names
Servers namesServers names
Servers names
 
Web servers
Web serversWeb servers
Web servers
 
Web server hardware and software
Web server hardware and softwareWeb server hardware and software
Web server hardware and software
 
HTTP and Website Architecture and Middleware
HTTP and Website Architecture and MiddlewareHTTP and Website Architecture and Middleware
HTTP and Website Architecture and Middleware
 
Les Basiques - Web Développement HTML5, CSS3, JS et PHP
Les Basiques - Web  Développement HTML5, CSS3, JS et PHPLes Basiques - Web  Développement HTML5, CSS3, JS et PHP
Les Basiques - Web Développement HTML5, CSS3, JS et PHP
 
PPT
PPTPPT
PPT
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
 
Configuring the Apache Web Server
Configuring the Apache Web ServerConfiguring the Apache Web Server
Configuring the Apache Web Server
 
Wt unit 1 ppts web development process
Wt unit 1 ppts web development processWt unit 1 ppts web development process
Wt unit 1 ppts web development process
 
web development process WT
web development process WTweb development process WT
web development process WT
 
IT Operations for Web Developers
IT Operations for Web DevelopersIT Operations for Web Developers
IT Operations for Web Developers
 

Recently uploaded

Pro Tips for Effortless Contract Management
Pro Tips for Effortless Contract ManagementPro Tips for Effortless Contract Management
Pro Tips for Effortless Contract Management
Eternity Paralegal Services
 
1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES
1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES
1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES
irhcs
 
Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian Matka
Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian MatkaDpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian Matka
Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian Matka
➒➌➎➏➑➐➋➑➐➐Dpboss Matka Guessing Satta Matka Kalyan Chart Indian Matka
 
1 Circular 003_2023 ISO 27001_2022 Transition Arrangments v3.pdf
1 Circular 003_2023 ISO 27001_2022 Transition Arrangments v3.pdf1 Circular 003_2023 ISO 27001_2022 Transition Arrangments v3.pdf
1 Circular 003_2023 ISO 27001_2022 Transition Arrangments v3.pdf
ISONIKELtd
 
Dpboss Matka Guessing Satta Matta Matka Kalyan panel Chart Indian Matka Dpbos...
Dpboss Matka Guessing Satta Matta Matka Kalyan panel Chart Indian Matka Dpbos...Dpboss Matka Guessing Satta Matta Matka Kalyan panel Chart Indian Matka Dpbos...
Dpboss Matka Guessing Satta Matta Matka Kalyan panel Chart Indian Matka Dpbos...
➒➌➎➏➑➐➋➑➐➐Dpboss Matka Guessing Satta Matka Kalyan Chart Indian Matka
 
Best Competitive Marble Pricing in Dubai - ☎ 9928909666
Best Competitive Marble Pricing in Dubai - ☎ 9928909666Best Competitive Marble Pricing in Dubai - ☎ 9928909666
Best Competitive Marble Pricing in Dubai - ☎ 9928909666
Stone Art Hub
 
Enhancing Adoption of AI in Agri-food: Introduction
Enhancing Adoption of AI in Agri-food: IntroductionEnhancing Adoption of AI in Agri-food: Introduction
Enhancing Adoption of AI in Agri-food: Introduction
Cor Verdouw
 
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan ChartSatta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results
 
DearbornMusic-KatherineJasperFullSailUni
DearbornMusic-KatherineJasperFullSailUniDearbornMusic-KatherineJasperFullSailUni
DearbornMusic-KatherineJasperFullSailUni
katiejasper96
 
High-Quality IPTV Monthly Subscription for $15
High-Quality IPTV Monthly Subscription for $15High-Quality IPTV Monthly Subscription for $15
High-Quality IPTV Monthly Subscription for $15
advik4387
 
一比一原版(QMUE毕业证书)英国爱丁堡玛格丽特女王大学毕业证文凭如何办理
一比一原版(QMUE毕业证书)英国爱丁堡玛格丽特女王大学毕业证文凭如何办理一比一原版(QMUE毕业证书)英国爱丁堡玛格丽特女王大学毕业证文凭如何办理
一比一原版(QMUE毕业证书)英国爱丁堡玛格丽特女王大学毕业证文凭如何办理
taqyea
 
Efficient PHP Development Solutions for Dynamic Web Applications
Efficient PHP Development Solutions for Dynamic Web ApplicationsEfficient PHP Development Solutions for Dynamic Web Applications
Efficient PHP Development Solutions for Dynamic Web Applications
Harwinder Singh
 
❼❷⓿❺❻❷❽❷❼❽ Dpboss Matka Result Satta Matka Guessing Satta Fix jodi Kalyan Fin...
❼❷⓿❺❻❷❽❷❼❽ Dpboss Matka Result Satta Matka Guessing Satta Fix jodi Kalyan Fin...❼❷⓿❺❻❷❽❷❼❽ Dpboss Matka Result Satta Matka Guessing Satta Fix jodi Kalyan Fin...
❼❷⓿❺❻❷❽❷❼❽ Dpboss Matka Result Satta Matka Guessing Satta Fix jodi Kalyan Fin...
❼❷⓿❺❻❷❽❷❼❽ Dpboss Kalyan Satta Matka Guessing Matka Result Main Bazar chart
 
The Most Inspiring Entrepreneurs to Follow in 2024.pdf
The Most Inspiring Entrepreneurs to Follow in 2024.pdfThe Most Inspiring Entrepreneurs to Follow in 2024.pdf
The Most Inspiring Entrepreneurs to Follow in 2024.pdf
thesiliconleaders
 
Kirill Klip GEM Royalty TNR Gold Lithium Presentation
Kirill Klip GEM Royalty TNR Gold Lithium PresentationKirill Klip GEM Royalty TNR Gold Lithium Presentation
Kirill Klip GEM Royalty TNR Gold Lithium Presentation
Kirill Klip
 
Discover the Beauty and Functionality of The Expert Remodeling Service
Discover the Beauty and Functionality of The Expert Remodeling ServiceDiscover the Beauty and Functionality of The Expert Remodeling Service
Discover the Beauty and Functionality of The Expert Remodeling Service
obriengroupinc04
 
PM Surya Ghar Muft Bijli Yojana: Online Application, Eligibility, Subsidies &...
PM Surya Ghar Muft Bijli Yojana: Online Application, Eligibility, Subsidies &...PM Surya Ghar Muft Bijli Yojana: Online Application, Eligibility, Subsidies &...
PM Surya Ghar Muft Bijli Yojana: Online Application, Eligibility, Subsidies &...
Ksquare Energy Pvt. Ltd.
 
Adani Group's Active Interest In Increasing Its Presence in the Cement Manufa...
Adani Group's Active Interest In Increasing Its Presence in the Cement Manufa...Adani Group's Active Interest In Increasing Its Presence in the Cement Manufa...
Adani Group's Active Interest In Increasing Its Presence in the Cement Manufa...
Adani case
 
The latest Heat Pump Manual from Newentide
The latest Heat Pump Manual from NewentideThe latest Heat Pump Manual from Newentide
The latest Heat Pump Manual from Newentide
JoeYangGreatMachiner
 
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan ChartSatta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results
 

Recently uploaded (20)

Pro Tips for Effortless Contract Management
Pro Tips for Effortless Contract ManagementPro Tips for Effortless Contract Management
Pro Tips for Effortless Contract Management
 
1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES
1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES
1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES
 
Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian Matka
Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian MatkaDpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian Matka
Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian Matka
 
1 Circular 003_2023 ISO 27001_2022 Transition Arrangments v3.pdf
1 Circular 003_2023 ISO 27001_2022 Transition Arrangments v3.pdf1 Circular 003_2023 ISO 27001_2022 Transition Arrangments v3.pdf
1 Circular 003_2023 ISO 27001_2022 Transition Arrangments v3.pdf
 
Dpboss Matka Guessing Satta Matta Matka Kalyan panel Chart Indian Matka Dpbos...
Dpboss Matka Guessing Satta Matta Matka Kalyan panel Chart Indian Matka Dpbos...Dpboss Matka Guessing Satta Matta Matka Kalyan panel Chart Indian Matka Dpbos...
Dpboss Matka Guessing Satta Matta Matka Kalyan panel Chart Indian Matka Dpbos...
 
Best Competitive Marble Pricing in Dubai - ☎ 9928909666
Best Competitive Marble Pricing in Dubai - ☎ 9928909666Best Competitive Marble Pricing in Dubai - ☎ 9928909666
Best Competitive Marble Pricing in Dubai - ☎ 9928909666
 
Enhancing Adoption of AI in Agri-food: Introduction
Enhancing Adoption of AI in Agri-food: IntroductionEnhancing Adoption of AI in Agri-food: Introduction
Enhancing Adoption of AI in Agri-food: Introduction
 
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan ChartSatta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
 
DearbornMusic-KatherineJasperFullSailUni
DearbornMusic-KatherineJasperFullSailUniDearbornMusic-KatherineJasperFullSailUni
DearbornMusic-KatherineJasperFullSailUni
 
High-Quality IPTV Monthly Subscription for $15
High-Quality IPTV Monthly Subscription for $15High-Quality IPTV Monthly Subscription for $15
High-Quality IPTV Monthly Subscription for $15
 
一比一原版(QMUE毕业证书)英国爱丁堡玛格丽特女王大学毕业证文凭如何办理
一比一原版(QMUE毕业证书)英国爱丁堡玛格丽特女王大学毕业证文凭如何办理一比一原版(QMUE毕业证书)英国爱丁堡玛格丽特女王大学毕业证文凭如何办理
一比一原版(QMUE毕业证书)英国爱丁堡玛格丽特女王大学毕业证文凭如何办理
 
Efficient PHP Development Solutions for Dynamic Web Applications
Efficient PHP Development Solutions for Dynamic Web ApplicationsEfficient PHP Development Solutions for Dynamic Web Applications
Efficient PHP Development Solutions for Dynamic Web Applications
 
❼❷⓿❺❻❷❽❷❼❽ Dpboss Matka Result Satta Matka Guessing Satta Fix jodi Kalyan Fin...
❼❷⓿❺❻❷❽❷❼❽ Dpboss Matka Result Satta Matka Guessing Satta Fix jodi Kalyan Fin...❼❷⓿❺❻❷❽❷❼❽ Dpboss Matka Result Satta Matka Guessing Satta Fix jodi Kalyan Fin...
❼❷⓿❺❻❷❽❷❼❽ Dpboss Matka Result Satta Matka Guessing Satta Fix jodi Kalyan Fin...
 
The Most Inspiring Entrepreneurs to Follow in 2024.pdf
The Most Inspiring Entrepreneurs to Follow in 2024.pdfThe Most Inspiring Entrepreneurs to Follow in 2024.pdf
The Most Inspiring Entrepreneurs to Follow in 2024.pdf
 
Kirill Klip GEM Royalty TNR Gold Lithium Presentation
Kirill Klip GEM Royalty TNR Gold Lithium PresentationKirill Klip GEM Royalty TNR Gold Lithium Presentation
Kirill Klip GEM Royalty TNR Gold Lithium Presentation
 
Discover the Beauty and Functionality of The Expert Remodeling Service
Discover the Beauty and Functionality of The Expert Remodeling ServiceDiscover the Beauty and Functionality of The Expert Remodeling Service
Discover the Beauty and Functionality of The Expert Remodeling Service
 
PM Surya Ghar Muft Bijli Yojana: Online Application, Eligibility, Subsidies &...
PM Surya Ghar Muft Bijli Yojana: Online Application, Eligibility, Subsidies &...PM Surya Ghar Muft Bijli Yojana: Online Application, Eligibility, Subsidies &...
PM Surya Ghar Muft Bijli Yojana: Online Application, Eligibility, Subsidies &...
 
Adani Group's Active Interest In Increasing Its Presence in the Cement Manufa...
Adani Group's Active Interest In Increasing Its Presence in the Cement Manufa...Adani Group's Active Interest In Increasing Its Presence in the Cement Manufa...
Adani Group's Active Interest In Increasing Its Presence in the Cement Manufa...
 
The latest Heat Pump Manual from Newentide
The latest Heat Pump Manual from NewentideThe latest Heat Pump Manual from Newentide
The latest Heat Pump Manual from Newentide
 
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan ChartSatta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
 

01 - Web Programming Intro.pptx

  • 2. Remember how the web works?
  • 3. Fundamentals ●Static vs Dynamic Content ●Client/Server ●HTTP o Request o Response o Headers o Port 80 o Handshake
  • 4. Static vs Dynamic HTML What it means?
  • 5. Do you think this is Static?
  • 8. Static What you see What the browser renders <div class="IndicadoresContentDiv"> <table summary=""> <tbody> <tr> <td><span title="">Compra</span></td> <td class="IndicadoresBoxBGR"><span id="lblCompra">546,37</span> </td> </tr> </tbody> </table> <table summary=""> <tbody> <tr> <td><span title="">Venta</span></td> <td class="IndicadoresBoxBGR"> <span id="lblVenta">558,99</span> </td> </tr> </tbody> </table> </div> What the source file looks like
  • 9. Dynamic What you see What the browser renders <?php $compra = DollarExchange->getBuyValue(); $venta = DollarExchange->getSellValue(); ?> <div class="IndicadoresContentDiv"> <table summary=""> <tbody> <tr> <td><span title="">Compra</span></td> <td class="IndicadoresBoxBGR"><span id="lblCompra"><?php echo $compra; ?></span> </td> </tr> </tbody> </table> <table summary=""> <tbody> <tr> <td><span title="">Venta</span></td> <td class="IndicadoresBoxBGR"> <span id="lblVenta"><?php echo $venta; ?></span> </td> </tr> </tbody> </table> </div> What the source file look like
  • 10. Dynamic vs Static HTML • Features limited to browser resources. • Need developer intervention to change the content • Response is always HTML no matter what. • Is/Can be cached by the browser • You can add some dynamic features with Javascript and HTML5 • Tons of libraries to everything we know that can be done in Web. • Content can vary based on a database change, another site, the date, no need for developer intervention • Response could be anything that the browser can show for the same URL. Its generated dynamically. • You have to control when to expire or cache the response Static Dynamic
  • 11. ●Limited to the Browser’ resources (powerful with HTML5) ●The Web Server looks for the resource as a persistent file on disk. ●A Web Server is enough to serve the content ●There is no need for programming skills ●There is no limit (almost) on what you can do on the Server's side ●The resource to process is not always an specific file in the web server (dynamic). ●Usually depends on a Web and an Application Server to serve content ●Requires a high level programming code ..cont Dynamic vs Static HTML Static Dynamic
  • 12. What’s involved in the Dynamic Content? • Web Server • Application Server • Server Side Coding – Programming Languages – Server Side Libraries – Services – Configuration Settings • Other Services – DBMS (MySQL, PostgreSQL, MongoDB, Oracle) – Cache (Memcached, Redis) – Logging – Third Party APIs
  • 14. 1) The Web Server The term is used to reference Hardware or software that servers Web content
  • 15. Web Server’s Job • Listen and Responds to HTTP Requests • Find resource/file to load based on the request (URL). • Process the file to load • Delegate the file processing to an Application Server if needed (when it can’t handle it). • Build a response that the browser can read. – HTML, image, file to download – Redirect • Examples: Apache, IIS, Nginx, ligthhttpd
  • 16. cont.. • Files are stored on an specific directory within the Web Server’s hard drive (DocumentRoot) • Web Server should be running and listening to an specific port (80 by default) • Configuration files used to configure the server behavior (httpd.conf)
  • 17.
  • 18. 2) Application Server Their main job is to support the construction of dynamic pages. It could be a service running on the same Web Server or standalone.
  • 19. ..cont ●An application server acts as a set of components accessible to the software developer through an API defined by the platform itself. ●These components are usually performed in the same running environment as its web server(s) ●Target much more than just Web page generation: they implement services like clustering, fail-over, and load- balancing.
  • 20. ..cont ●Provides access to business logic for use by client application programs. ●Infinite set of libraries and components for Database Access, Security, Clustering, ●Some examples: Zend Server (PHP), IBM Websphere (Java EE), Tomcat (Java), .NET framework (C#), Passenger (RoR), Node (Javascript), Oracle Weblogic (Java), Glassfish (Java), JBoss (Java), Unicorn (RoR), Puma (RoR)
  • 21. 3) Server Side Code • Application server is able to run Programming Languages that run on the Server • Some examples: PHP, JSP, ASP, Ruby, Python, Perl, even Javascript (NodeJS) • How does server side code looks:
  • 22. Static vs Dynamic (URLs) http://localhost/login.html → /var/www/html/login.html http://localhost/login.html → /var/www/html/index.php <html> <head><title>Login</title></head> <body> Login Here: <form></form> </body> </html> <?php if(“login”) { require(‘template/login.php’); } else { require(‘template/404.php’); } ?> login.html index.php <html> <head><title>Login</title></head> <body> Login Here: <form></form> </body> </html> template/login.php
  • 24.
  • 26.