SlideShare a Scribd company logo
1 of 28
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 Websiteswebsiteunlimited
 
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 DBMSkoolkampus
 
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 Nov2000guest6e7a1b1
 
Fundamentals of Web for Non-Developers
Fundamentals of Web for Non-DevelopersFundamentals of Web for Non-Developers
Fundamentals of Web for Non-DevelopersLemi Orhan Ergin
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web ArchitectureChamnap Chhorn
 
Fundamentals of Web building
Fundamentals of Web buildingFundamentals of Web building
Fundamentals of Web buildingRC Morales
 
Web server hardware and software
Web server hardware and softwareWeb server hardware and software
Web server hardware and softwareVikram g b
 
HTTP and Website Architecture and Middleware
HTTP and Website Architecture and MiddlewareHTTP and Website Architecture and Middleware
HTTP and Website Architecture and MiddlewareAbdul 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 PHPHamdi Hmidi
 
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 1Henry S
 
Configuring the Apache Web Server
Configuring the Apache Web ServerConfiguring the Apache Web Server
Configuring the Apache Web Serverwebhostingguy
 
IT Operations for Web Developers
IT Operations for Web DevelopersIT Operations for Web Developers
IT Operations for Web DevelopersMahmoud 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
 
web development process WT
web development process WTweb development process WT
web development process WT
 
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
 
IT Operations for Web Developers
IT Operations for Web DevelopersIT Operations for Web Developers
IT Operations for Web Developers
 

Recently uploaded

MAHA Global and IPR: Do Actions Speak Louder Than Words?
MAHA Global and IPR: Do Actions Speak Louder Than Words?MAHA Global and IPR: Do Actions Speak Louder Than Words?
MAHA Global and IPR: Do Actions Speak Louder Than Words?Olivia Kresic
 
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,noida100girls
 
Case study on tata clothing brand zudio in detail
Case study on tata clothing brand zudio in detailCase study on tata clothing brand zudio in detail
Case study on tata clothing brand zudio in detailAriel592675
 
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...lizamodels9
 
India Consumer 2024 Redacted Sample Report
India Consumer 2024 Redacted Sample ReportIndia Consumer 2024 Redacted Sample Report
India Consumer 2024 Redacted Sample ReportMintel Group
 
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdfNewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdfKhaled Al Awadi
 
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...lizamodels9
 
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607dollysharma2066
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCRashishs7044
 
Call Girls Miyapur 7001305949 all area service COD available Any Time
Call Girls Miyapur 7001305949 all area service COD available Any TimeCall Girls Miyapur 7001305949 all area service COD available Any Time
Call Girls Miyapur 7001305949 all area service COD available Any Timedelhimodelshub1
 
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,noida100girls
 
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… AbridgedLean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… AbridgedKaiNexus
 
The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024christinemoorman
 
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deckPitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deckHajeJanKamps
 
Digital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfDigital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfJos Voskuil
 
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort ServiceCall US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Servicecallgirls2057
 
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptxContemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptxMarkAnthonyAurellano
 
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCRashishs7044
 
Kenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith PereraKenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith Pereraictsugar
 

Recently uploaded (20)

MAHA Global and IPR: Do Actions Speak Louder Than Words?
MAHA Global and IPR: Do Actions Speak Louder Than Words?MAHA Global and IPR: Do Actions Speak Louder Than Words?
MAHA Global and IPR: Do Actions Speak Louder Than Words?
 
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
 
Case study on tata clothing brand zudio in detail
Case study on tata clothing brand zudio in detailCase study on tata clothing brand zudio in detail
Case study on tata clothing brand zudio in detail
 
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
 
India Consumer 2024 Redacted Sample Report
India Consumer 2024 Redacted Sample ReportIndia Consumer 2024 Redacted Sample Report
India Consumer 2024 Redacted Sample Report
 
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdfNewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
 
Japan IT Week 2024 Brochure by 47Billion (English)
Japan IT Week 2024 Brochure by 47Billion (English)Japan IT Week 2024 Brochure by 47Billion (English)
Japan IT Week 2024 Brochure by 47Billion (English)
 
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
 
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
 
Call Girls Miyapur 7001305949 all area service COD available Any Time
Call Girls Miyapur 7001305949 all area service COD available Any TimeCall Girls Miyapur 7001305949 all area service COD available Any Time
Call Girls Miyapur 7001305949 all area service COD available Any Time
 
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
 
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… AbridgedLean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
 
The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024
 
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deckPitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
 
Digital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfDigital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdf
 
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort ServiceCall US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
 
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptxContemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
 
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
 
Kenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith PereraKenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith Perera
 

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.