SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Languages and Tools
for
Web Programming
Mrs. Alamelu.G
Assistant professor of BCA
E.M.G Yadava Women’s College
Madurai.
History of the Web
• Internet (1960s)
• World Wide Web - WWW (1991)
• First Web Browser - Netscape,
1994
• Google, 1998
• Facebook, 2004
• Smartphones (iPhone), 2007
• Tablets (iPad), 2010
Web programming
Web services vs. "classical" web programming
Client vs. server programming
client: JavaScript, Java
HTML-centric vs. program-centric
HTML-centric: PHP, ASP
cgi, fast-cgi
(Java) servlet
data model: Java servlet, database
Web services vs. web programming
web services = remote procedure call
we saw SOAP
structured data (XML)
methods and responses
generally, for machine consumption
web programming  generate HTML pages
for humans
often, database-driven
replacement for IBM 3270 terminals ...
Client vs. server programming
Execute code on client:
download Java applet  self-contained
programming environment
JavaScript (aka ECMAscript):
modify and get values from HTML
("document object model" – DOM)
Execute code on server  generate document
state maintenance (HTTP stateless)
login, shopping cart, preferences
Serving HTML Pages
HTML page includes image, audio, and video files.
All of this content lives on a web server—a remote
machine often far away from Client computer.
Client use a web browser to request, retrieve, and
eventually display web content on the screen.
What is HTML?
HTML is a language for describing web
pages.
HTML stands for Hyper Text Markup
Language.
HTML is not a programming language, it is
a markup language.
A markup language is a set of markup tags.
HTML uses markup tags to describe web
pages
Structure of an HTML page
<html>
<head> information about the page </head> <body> page
contents </body>
</html>
The header describes the page and the body contains the
page's contents an HTML page is saved into a file ending
with extension .html
Common Gateway Interface (CGI)
The interface specification that defines how information can be
passed from the browsers back to the server is called the Common
Gateway Interface, (CGI).
Processing dynamic pages
1. Web browser requests dynamic page.
2.Web server finds page and passes it to application server.
3. Application server scans page for instructions and finishes page.
4. Application server passes finished page back to web server
5. Web server sends finished page to requesting browser
Web Application
A web application is a website that contains pages with partly or final
content of a page.
The final content of a page is determined only when the visitor requests a
page from the web server.
A dynamic page which is the final content of the page that have varies of
from request based on the visitor’s actions.
Web applications are built to address a variety of challenges and problems
Common gateway interface (cgi)
Earliest attempt at dynamic web content
language-independent
passes HTTP request information via
command line (ISINDEX) – rarely used
environment variables: system info + query string (GET)
request body (POST)  standard input
return HTML or XML via standard output
non-parsed headers (NPH) return complete response
SQL architecture
 library interface
 proprietary
 JDBC, ODBC
 driver that connects (via TCP) to database
 same or different host
 issue queries, get results
 modify content
 transactions
SQL basics
• Integer: tinyint, smallint, mediumint, int(eger),
bigint
• Floating point: float, double, real
• Decimal: decimal(m,d) (for $)
• Date: date, datetime, timestamp, time, year
• String: char(N), varchar(N), tinyblob, tinytext,
blob, text, enum, set
SQL basics
 Retrieval: SELECT field1, field2 FROM table
WHERE condition ORDER BY expression
 Insertion: INSERT table SET
field1=value1,field2=value2, ...
 Update: UPDATE table SET field1=value1,
field2=value2 WHERE expression
 Delete row: DELETE FROM table WHERE
expression
Servlet life cycleRetrieval
 server application loads ServletClass
 creates instance via no-args constructor
 servers call servlet's init() method
 server calls service(req, res) method for each
request (often, with class name as URL), possibly
concurrently
 servers calls destroy() on shutdown
HTTP requests as servlets
 HTTP method GET, PUT, POST, ...  doGet,
doPut, doPost
 subclass of HttpServlet overrides default
implementation
n-tier architecture
client tier:
receives user events (keyboard, mouse)
presentation of data
user interface
e.g., Java applets, web browser, thin client
application
application-server tier:
"business logic"  actual data processing,
algorithms
can be component-based (Java Beans)
n-tier architecture
 Data-server tier
 data storage
 relational and legacy databases
 all tiers could run on same machine, but usually
separated
 HTTP (or SOAP) from client to server
 Corba or SOAP or remote-SQL between server
tiers
 Advantages:
 independent of storage model
 simpler authentication to database
THANKING YOU

Weitere ähnliche Inhalte

Was ist angesagt?

SilverStripe From a Developer's Perspective
SilverStripe From a Developer's PerspectiveSilverStripe From a Developer's Perspective
SilverStripe From a Developer's Perspectiveajshort
 
[WSO2Con EU 2017] Manipulating XML, JSON and SQL Data Types with Ballerina
[WSO2Con EU 2017] Manipulating XML, JSON and SQL Data Types with Ballerina[WSO2Con EU 2017] Manipulating XML, JSON and SQL Data Types with Ballerina
[WSO2Con EU 2017] Manipulating XML, JSON and SQL Data Types with BallerinaWSO2
 
Web Services with Objective-C
Web Services with Objective-CWeb Services with Objective-C
Web Services with Objective-CJuio Barros
 
Change RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDBChange RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDBApaichon Punopas
 
Mojo Facets – so, you have data and browser?
Mojo Facets – so, you have data and browser?Mojo Facets – so, you have data and browser?
Mojo Facets – so, you have data and browser?Dobrica Pavlinušić
 
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSING
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE  AND JSP PROCESSINGINTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE  AND JSP PROCESSING
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSINGAaqib Hussain
 
Deploying java beans in jsp
Deploying java beans in jspDeploying java beans in jsp
Deploying java beans in jspPriyanka Pradhan
 
Angular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP ServicesAngular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP ServicesWebStackAcademy
 
MuleSoft ESB - CSV File to Database
MuleSoft ESB - CSV File to DatabaseMuleSoft ESB - CSV File to Database
MuleSoft ESB - CSV File to Databaseakashdprajapati
 
Introduction to Browser Internals
Introduction to Browser InternalsIntroduction to Browser Internals
Introduction to Browser InternalsSiva Arunachalam
 
NiFi - First approach
NiFi - First approachNiFi - First approach
NiFi - First approachMickael Cassy
 

Was ist angesagt? (18)

SilverStripe From a Developer's Perspective
SilverStripe From a Developer's PerspectiveSilverStripe From a Developer's Perspective
SilverStripe From a Developer's Perspective
 
[WSO2Con EU 2017] Manipulating XML, JSON and SQL Data Types with Ballerina
[WSO2Con EU 2017] Manipulating XML, JSON and SQL Data Types with Ballerina[WSO2Con EU 2017] Manipulating XML, JSON and SQL Data Types with Ballerina
[WSO2Con EU 2017] Manipulating XML, JSON and SQL Data Types with Ballerina
 
Web Services with Objective-C
Web Services with Objective-CWeb Services with Objective-C
Web Services with Objective-C
 
Change RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDBChange RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDB
 
Mojo Facets – so, you have data and browser?
Mojo Facets – so, you have data and browser?Mojo Facets – so, you have data and browser?
Mojo Facets – so, you have data and browser?
 
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSING
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE  AND JSP PROCESSINGINTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE  AND JSP PROCESSING
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSING
 
Deploying java beans in jsp
Deploying java beans in jspDeploying java beans in jsp
Deploying java beans in jsp
 
Jsp
JspJsp
Jsp
 
Test2
Test2Test2
Test2
 
Angular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP ServicesAngular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP Services
 
MuleSoft ESB - CSV File to Database
MuleSoft ESB - CSV File to DatabaseMuleSoft ESB - CSV File to Database
MuleSoft ESB - CSV File to Database
 
Introduction to Browser Internals
Introduction to Browser InternalsIntroduction to Browser Internals
Introduction to Browser Internals
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
NiFi - First approach
NiFi - First approachNiFi - First approach
NiFi - First approach
 
Introduction ASP
Introduction ASPIntroduction ASP
Introduction ASP
 
Overview of java web services
Overview of java web servicesOverview of java web services
Overview of java web services
 
AJAX - An introduction
AJAX - An introductionAJAX - An introduction
AJAX - An introduction
 
AJAX
AJAXAJAX
AJAX
 

Ähnlich wie Languages and tools for web programming

Ähnlich wie Languages and tools for web programming (20)

Advance Java Topics (J2EE)
Advance Java Topics (J2EE)Advance Java Topics (J2EE)
Advance Java Topics (J2EE)
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.net
 
Web Database
Web DatabaseWeb Database
Web Database
 
AJppt.pptx
AJppt.pptxAJppt.pptx
AJppt.pptx
 
Java- JDBC- Mazenet Solution
Java- JDBC- Mazenet SolutionJava- JDBC- Mazenet Solution
Java- JDBC- Mazenet Solution
 
08 ajax
08 ajax08 ajax
08 ajax
 
BITM3730Week12.pptx
BITM3730Week12.pptxBITM3730Week12.pptx
BITM3730Week12.pptx
 
Servlet.pptx
Servlet.pptxServlet.pptx
Servlet.pptx
 
Servlet.pptx
Servlet.pptxServlet.pptx
Servlet.pptx
 
Ajax
AjaxAjax
Ajax
 
Unit 02: Web Technologies (2/2)
Unit 02: Web Technologies (2/2)Unit 02: Web Technologies (2/2)
Unit 02: Web Technologies (2/2)
 
Day7
Day7Day7
Day7
 
Asp.net
Asp.netAsp.net
Asp.net
 
PPT
PPTPPT
PPT
 
Web development using ASP.NET MVC
Web development using ASP.NET MVC Web development using ASP.NET MVC
Web development using ASP.NET MVC
 
Building production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stackBuilding production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stack
 
Ajax
AjaxAjax
Ajax
 
Bt0083 server side programing
Bt0083 server side programing Bt0083 server side programing
Bt0083 server side programing
 
Intro to node and mongodb 1
Intro to node and mongodb   1Intro to node and mongodb   1
Intro to node and mongodb 1
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
 

Kürzlich hochgeladen

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 

Kürzlich hochgeladen (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

Languages and tools for web programming

  • 1. Languages and Tools for Web Programming Mrs. Alamelu.G Assistant professor of BCA E.M.G Yadava Women’s College Madurai.
  • 2. History of the Web • Internet (1960s) • World Wide Web - WWW (1991) • First Web Browser - Netscape, 1994 • Google, 1998 • Facebook, 2004 • Smartphones (iPhone), 2007 • Tablets (iPad), 2010
  • 3. Web programming Web services vs. "classical" web programming Client vs. server programming client: JavaScript, Java HTML-centric vs. program-centric HTML-centric: PHP, ASP cgi, fast-cgi (Java) servlet data model: Java servlet, database
  • 4. Web services vs. web programming web services = remote procedure call we saw SOAP structured data (XML) methods and responses generally, for machine consumption web programming  generate HTML pages for humans often, database-driven replacement for IBM 3270 terminals ...
  • 5. Client vs. server programming Execute code on client: download Java applet  self-contained programming environment JavaScript (aka ECMAscript): modify and get values from HTML ("document object model" – DOM) Execute code on server  generate document state maintenance (HTTP stateless) login, shopping cart, preferences
  • 6. Serving HTML Pages HTML page includes image, audio, and video files. All of this content lives on a web server—a remote machine often far away from Client computer. Client use a web browser to request, retrieve, and eventually display web content on the screen.
  • 7. What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language. HTML is not a programming language, it is a markup language. A markup language is a set of markup tags. HTML uses markup tags to describe web pages
  • 8. Structure of an HTML page <html> <head> information about the page </head> <body> page contents </body> </html> The header describes the page and the body contains the page's contents an HTML page is saved into a file ending with extension .html
  • 9. Common Gateway Interface (CGI) The interface specification that defines how information can be passed from the browsers back to the server is called the Common Gateway Interface, (CGI).
  • 10. Processing dynamic pages 1. Web browser requests dynamic page. 2.Web server finds page and passes it to application server. 3. Application server scans page for instructions and finishes page. 4. Application server passes finished page back to web server 5. Web server sends finished page to requesting browser
  • 11. Web Application A web application is a website that contains pages with partly or final content of a page. The final content of a page is determined only when the visitor requests a page from the web server. A dynamic page which is the final content of the page that have varies of from request based on the visitor’s actions. Web applications are built to address a variety of challenges and problems
  • 12. Common gateway interface (cgi) Earliest attempt at dynamic web content language-independent passes HTTP request information via command line (ISINDEX) – rarely used environment variables: system info + query string (GET) request body (POST)  standard input return HTML or XML via standard output non-parsed headers (NPH) return complete response
  • 13. SQL architecture  library interface  proprietary  JDBC, ODBC  driver that connects (via TCP) to database  same or different host  issue queries, get results  modify content  transactions
  • 14. SQL basics • Integer: tinyint, smallint, mediumint, int(eger), bigint • Floating point: float, double, real • Decimal: decimal(m,d) (for $) • Date: date, datetime, timestamp, time, year • String: char(N), varchar(N), tinyblob, tinytext, blob, text, enum, set
  • 15. SQL basics  Retrieval: SELECT field1, field2 FROM table WHERE condition ORDER BY expression  Insertion: INSERT table SET field1=value1,field2=value2, ...  Update: UPDATE table SET field1=value1, field2=value2 WHERE expression  Delete row: DELETE FROM table WHERE expression
  • 16. Servlet life cycleRetrieval  server application loads ServletClass  creates instance via no-args constructor  servers call servlet's init() method  server calls service(req, res) method for each request (often, with class name as URL), possibly concurrently  servers calls destroy() on shutdown
  • 17. HTTP requests as servlets  HTTP method GET, PUT, POST, ...  doGet, doPut, doPost  subclass of HttpServlet overrides default implementation
  • 18. n-tier architecture client tier: receives user events (keyboard, mouse) presentation of data user interface e.g., Java applets, web browser, thin client application application-server tier: "business logic"  actual data processing, algorithms can be component-based (Java Beans)
  • 19. n-tier architecture  Data-server tier  data storage  relational and legacy databases  all tiers could run on same machine, but usually separated  HTTP (or SOAP) from client to server  Corba or SOAP or remote-SQL between server tiers  Advantages:  independent of storage model  simpler authentication to database