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)
01 - Web Programming Intro.pptx
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
01 - Web Programming Intro.pptx
HTTP Request/Response
01 - Web Programming Intro.pptx
Request Anatomy
Response

More Related Content

PPTX
Client and server side scripting
PDF
JS BASICS JAVA SCRIPT SCRIPTING
PPTX
Web Database
PPT
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
PPTX
4th Lecture: JSP and such
PDF
Intro to mobile web application development
PPT
Fundamentals of web_design_v2
PPTX
BITM3730Week12.pptx
Client and server side scripting
JS BASICS JAVA SCRIPT SCRIPTING
Web Database
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
4th Lecture: JSP and such
Intro to mobile web application development
Fundamentals of web_design_v2
BITM3730Week12.pptx

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

PPT
Websites Unlimited - Pay Monthly Websites
PPT
21. Application Development and Administration in DBMS
PDF
446-FUNDAMENTALS OF WEB FOR NON DEVELOPERS (Useful-Knowledge)
PDF
Anvita Gita Supersite Case Study Nov2000
PDF
Fundamentals of Web for Non-Developers
PPTX
Introduction to Web Architecture
PPTX
Fundamentals of Web building
PPTX
L19 Application Architecture
PPT
Servers names
PPT
Servers names
PPT
Web servers
PPTX
Web server hardware and software
PPT
HTTP and Website Architecture and Middleware
PDF
Les Basiques - Web Développement HTML5, CSS3, JS et PHP
PDF
Code for Startup MVP (Ruby on Rails) Session 1
PDF
Configuring the Apache Web Server
PDF
Wt unit 1 ppts web development process
ODP
IT Operations for Web Developers
Websites Unlimited - Pay Monthly Websites
21. Application Development and Administration in DBMS
446-FUNDAMENTALS OF WEB FOR NON DEVELOPERS (Useful-Knowledge)
Anvita Gita Supersite Case Study Nov2000
Fundamentals of Web for Non-Developers
Introduction to Web Architecture
Fundamentals of Web building
L19 Application Architecture
Servers names
Servers names
Web servers
Web server hardware and software
HTTP and Website Architecture and Middleware
Les Basiques - Web Développement HTML5, CSS3, JS et PHP
Code for Startup MVP (Ruby on Rails) Session 1
Configuring the Apache Web Server
Wt unit 1 ppts web development process
IT Operations for Web Developers
Ad

Recently uploaded (20)

PDF
Outsourced Audit & Assurance in USA Why Globus Finanza is Your Trusted Choice
PDF
kom-180-proposal-for-a-directive-amending-directive-2014-45-eu-and-directive-...
PDF
Ôn tập tiếng anh trong kinh doanh nâng cao
PDF
Types of control:Qualitative vs Quantitative
PDF
DOC-20250806-WA0002._20250806_112011_0000.pdf
PPTX
Probability Distribution, binomial distribution, poisson distribution
PDF
SIMNET Inc – 2023’s Most Trusted IT Services & Solution Provider
PPTX
HR Introduction Slide (1).pptx on hr intro
PPTX
Belch_12e_PPT_Ch18_Accessible_university.pptx
PDF
Unit 1 Cost Accounting - Cost sheet
DOCX
unit 1 COST ACCOUNTING AND COST SHEET
PDF
A Brief Introduction About Julia Allison
PPTX
Board-Reporting-Package-by-Umbrex-5-23-23.pptx
PDF
Solara Labs: Empowering Health through Innovative Nutraceutical Solutions
PDF
MSPs in 10 Words - Created by US MSP Network
PDF
Nidhal Samdaie CV - International Business Consultant
PDF
Katrina Stoneking: Shaking Up the Alcohol Beverage Industry
PDF
Elevate Cleaning Efficiency Using Tallfly Hair Remover Roller Factory Expertise
PDF
Digital Marketing & E-commerce Certificate Glossary.pdf.................
PDF
Stem Cell Market Report | Trends, Growth & Forecast 2025-2034
Outsourced Audit & Assurance in USA Why Globus Finanza is Your Trusted Choice
kom-180-proposal-for-a-directive-amending-directive-2014-45-eu-and-directive-...
Ôn tập tiếng anh trong kinh doanh nâng cao
Types of control:Qualitative vs Quantitative
DOC-20250806-WA0002._20250806_112011_0000.pdf
Probability Distribution, binomial distribution, poisson distribution
SIMNET Inc – 2023’s Most Trusted IT Services & Solution Provider
HR Introduction Slide (1).pptx on hr intro
Belch_12e_PPT_Ch18_Accessible_university.pptx
Unit 1 Cost Accounting - Cost sheet
unit 1 COST ACCOUNTING AND COST SHEET
A Brief Introduction About Julia Allison
Board-Reporting-Package-by-Umbrex-5-23-23.pptx
Solara Labs: Empowering Health through Innovative Nutraceutical Solutions
MSPs in 10 Words - Created by US MSP Network
Nidhal Samdaie CV - International Business Consultant
Katrina Stoneking: Shaking Up the Alcohol Beverage Industry
Elevate Cleaning Efficiency Using Tallfly Hair Remover Roller Factory Expertise
Digital Marketing & E-commerce Certificate Glossary.pdf.................
Stem Cell Market Report | Trends, Growth & Forecast 2025-2034
Ad

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)
  • 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