SlideShare a Scribd company logo
1 of 8
ADVANCED MECHANISMS FOR DYNAMIC CONTENT DELIVERY
Beyond CGI and SSI
CGI is a simple mechanism for implementing portable server-side applications.
There are a number of problems associated with CGI processing. Its main deficiency
is performance. Processing a request that invokes a CGI script requires the
spawning of a child process to execute that script. Moreover, any initialization and
other processing that might be common to all requests must be repeated for every
single request.
SSI has similar deficiencies when its command processing employs CGI under the
hood. It adds the additional performance penalty by requiring servers to parse SSI
pages. Most importantly, SSI may represent a serious security risk, especially when
not configured carefully by the server administrator. The SSI mechanism is not
scaleable, and provides only limited opportunities for reuse.
Native APIs (ISAPI and NSAPI)
Efficiency concerns may be addressed by using native server APIs. A native
API is simply a mechanism providing direct ‘hooks’ into the Web server’s application
programming interface. Use of a native API implies the use of compiled code that is
optimized for use within the context of a specific Web server environment.
NSAPI and ISAPI are two approaches employed by Netscape’s Web server software
and Microsoft’s IIS, respectively. The problem is that there is no commonality or
consistency amongst these native APIs. They are different from each other, and
code written for one environment cannot be reused in another. This makes it
impossible to implement portable application
Fast CGI
FastCGI is an attempt to combine the portability of CGI applications with the efficiency of non-
portable applications based on server APIs. The idea is simple instead of requiring the spawning
of a new process every time a CGI script is to be executed, FastCGI allows processes associated
with CGI scripts to ‘stay alive’ after a request has been satisfied. This means that new processes
do not have to be spawned again and again, since the same process can be reused by multiple
requests. These processes may be initialized once without endlessly re-executing initialization
code.
Template processing
Another approach used to serve dynamic content involves the use of template processors. In
this approach, templates are essentially HTML files with additional ‘tags’ that prescribe
methods for inserting dynamically generated content from external sources. The template file
contains HTML that provides general page layout parameters, with the additional tags
discretely placed so that content is placed appropriately on the rendered page. Among the
most popular template approaches are PHP (an open source product), Cold Fusion (from
Allaire/Macromedia), and Active Server Pages or ASP (from Microsoft).
Template processing cont.
COLD FUSION
<CFQUERY NAME="query1" DATASOURCE="oracle" . . .>
SELECT id, columnX, columnY, columnZ FROM TABLE1 WHERE id = #substitution-parameter#
</CFQUERY>
<CFIF query1.recordcount GT 0>
<TABLE>
<CFOUTPUT QUERY="query1">
<TR>
<TD>#columnX#</TD>
<TD>#columnY#</TD>
<TD>#columnZ#</TD>
</TR>
</CFOUTPUT>
</TABLE>
</CFIF>
A better approach to serving dynamic content is the Servlet API—
Java technology for implementing applications that are portable
not only across different servers but also across different
hardware platforms and operating systems. Like FastCGI, the
servlet API uses server application modules that remain resident
and reusable, rather than requiring the spawning of a new
process for every request. Unlike FastCGI, the servlet API is
portable across servers, operating systems, and hardware
platforms. Servlets execute the same way in any environment that
provides a compliant servlet runner. The servlet API generated
very strong following; it is widely used in a variety of Web
server environments
Servlets
Java Server Pages
In contrast with earlier template approaches, most of which used proprietary tags,
JSP instructions are formatted as XML tags, combined with Java code fragments.
Together, these tags and code fragments express the logic to transform JSP pages into
the markup used to present the desired content. It is not necessary for all application
logic to be included in the page—the embedded code may reference other server-based
resources. JSP ability to reference server-based components is similar to SSI support for
referencing CGI scripts. It helps to separate the page logic from its look and feel and
supports a reusable component-based design
Advanced mechanisms for dynamic content delivery

More Related Content

What's hot (20)

Introduction to Swagger
Introduction to SwaggerIntroduction to Swagger
Introduction to Swagger
 
Ef code first
Ef code firstEf code first
Ef code first
 
JDBC
JDBCJDBC
JDBC
 
Java web application development
Java web application developmentJava web application development
Java web application development
 
Basics of the Web Platform
Basics of the Web PlatformBasics of the Web Platform
Basics of the Web Platform
 
Spring jdbc
Spring jdbcSpring jdbc
Spring jdbc
 
Oracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuningOracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuning
 
Jdbc_ravi_2016
Jdbc_ravi_2016Jdbc_ravi_2016
Jdbc_ravi_2016
 
Servlet vs Reactive Stacks in 5 Use Cases
Servlet vs Reactive Stacks in 5 Use CasesServlet vs Reactive Stacks in 5 Use Cases
Servlet vs Reactive Stacks in 5 Use Cases
 
Bootstrap - Basics
Bootstrap - BasicsBootstrap - Basics
Bootstrap - Basics
 
Collections framework in java
Collections framework in javaCollections framework in java
Collections framework in java
 
Http methods
Http methodsHttp methods
Http methods
 
Web standards
Web standards Web standards
Web standards
 
Entity framework code first
Entity framework code firstEntity framework code first
Entity framework code first
 
Web server
Web serverWeb server
Web server
 
CSS Flexbox (flexible box layout)
CSS Flexbox (flexible box layout)CSS Flexbox (flexible box layout)
CSS Flexbox (flexible box layout)
 
REST API
REST APIREST API
REST API
 
Swagger
SwaggerSwagger
Swagger
 
Input Validation
Input ValidationInput Validation
Input Validation
 
REST API Design & Development
REST API Design & DevelopmentREST API Design & Development
REST API Design & Development
 

Similar to Advanced mechanisms for dynamic content delivery

Programming Server side with Sevlet
 Programming Server side with Sevlet  Programming Server side with Sevlet
Programming Server side with Sevlet backdoor
 
Running PHP on Windows Technical Overview
Running PHP on Windows Technical OverviewRunning PHP on Windows Technical Overview
Running PHP on Windows Technical OverviewWes Yanaga
 
Building enterprise depth APIs with the IBM hybrid integration portfolio
Building enterprise depth APIs with the IBM hybrid integration portfolioBuilding enterprise depth APIs with the IBM hybrid integration portfolio
Building enterprise depth APIs with the IBM hybrid integration portfolioKim Clark
 
Scaling Integration
Scaling IntegrationScaling Integration
Scaling IntegrationKim Clark
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...WebStackAcademy
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Mack Hardy
 
Unit 1st and 3rd notes of java
Unit 1st and 3rd notes of javaUnit 1st and 3rd notes of java
Unit 1st and 3rd notes of javaNiraj Bharambe
 
Containerize, PaaS, or Go Serverless!?
Containerize, PaaS, or Go Serverless!?Containerize, PaaS, or Go Serverless!?
Containerize, PaaS, or Go Serverless!?Phil Estes
 
Google App Engine - Overview #1
Google App Engine - Overview #1Google App Engine - Overview #1
Google App Engine - Overview #1Kay Kim
 
SERVER SIDE SCRIPTING
SERVER SIDE SCRIPTINGSERVER SIDE SCRIPTING
SERVER SIDE SCRIPTINGProf Ansari
 
Comman Gateway interface Java cgi pro.pptx
Comman Gateway interface Java cgi pro.pptxComman Gateway interface Java cgi pro.pptx
Comman Gateway interface Java cgi pro.pptxJebastinRaj1
 
apidays LIVE Paris - GraphQL meshes by Jens Neuse
apidays LIVE Paris - GraphQL meshes by Jens Neuseapidays LIVE Paris - GraphQL meshes by Jens Neuse
apidays LIVE Paris - GraphQL meshes by Jens Neuseapidays
 
Global Logic sMash Overview And Experiences
Global Logic   sMash  Overview And  ExperiencesGlobal Logic   sMash  Overview And  Experiences
Global Logic sMash Overview And ExperiencesProject Zero
 
AWS Community Day - Amy Negrette - Gateways to Gateways
AWS Community Day - Amy Negrette - Gateways to GatewaysAWS Community Day - Amy Negrette - Gateways to Gateways
AWS Community Day - Amy Negrette - Gateways to GatewaysAWS Chicago
 
Server side programming
Server side programming Server side programming
Server side programming javed ahmed
 
PHP on Windows 2008
PHP on Windows 2008PHP on Windows 2008
PHP on Windows 2008jorke
 

Similar to Advanced mechanisms for dynamic content delivery (20)

Ecom 1
Ecom 1Ecom 1
Ecom 1
 
Programming Server side with Sevlet
 Programming Server side with Sevlet  Programming Server side with Sevlet
Programming Server side with Sevlet
 
Running PHP on Windows Technical Overview
Running PHP on Windows Technical OverviewRunning PHP on Windows Technical Overview
Running PHP on Windows Technical Overview
 
Building enterprise depth APIs with the IBM hybrid integration portfolio
Building enterprise depth APIs with the IBM hybrid integration portfolioBuilding enterprise depth APIs with the IBM hybrid integration portfolio
Building enterprise depth APIs with the IBM hybrid integration portfolio
 
Java servlets and CGI
Java servlets and CGIJava servlets and CGI
Java servlets and CGI
 
Scaling Integration
Scaling IntegrationScaling Integration
Scaling Integration
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
 
Common Gateway Interface ppt
Common Gateway Interface pptCommon Gateway Interface ppt
Common Gateway Interface ppt
 
Cgi
CgiCgi
Cgi
 
Unit 1st and 3rd notes of java
Unit 1st and 3rd notes of javaUnit 1st and 3rd notes of java
Unit 1st and 3rd notes of java
 
Containerize, PaaS, or Go Serverless!?
Containerize, PaaS, or Go Serverless!?Containerize, PaaS, or Go Serverless!?
Containerize, PaaS, or Go Serverless!?
 
Google App Engine - Overview #1
Google App Engine - Overview #1Google App Engine - Overview #1
Google App Engine - Overview #1
 
SERVER SIDE SCRIPTING
SERVER SIDE SCRIPTINGSERVER SIDE SCRIPTING
SERVER SIDE SCRIPTING
 
Comman Gateway interface Java cgi pro.pptx
Comman Gateway interface Java cgi pro.pptxComman Gateway interface Java cgi pro.pptx
Comman Gateway interface Java cgi pro.pptx
 
apidays LIVE Paris - GraphQL meshes by Jens Neuse
apidays LIVE Paris - GraphQL meshes by Jens Neuseapidays LIVE Paris - GraphQL meshes by Jens Neuse
apidays LIVE Paris - GraphQL meshes by Jens Neuse
 
Global Logic sMash Overview And Experiences
Global Logic   sMash  Overview And  ExperiencesGlobal Logic   sMash  Overview And  Experiences
Global Logic sMash Overview And Experiences
 
AWS Community Day - Amy Negrette - Gateways to Gateways
AWS Community Day - Amy Negrette - Gateways to GatewaysAWS Community Day - Amy Negrette - Gateways to Gateways
AWS Community Day - Amy Negrette - Gateways to Gateways
 
Server side programming
Server side programming Server side programming
Server side programming
 
PHP on Windows 2008
PHP on Windows 2008PHP on Windows 2008
PHP on Windows 2008
 

Recently uploaded

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 

Recently uploaded (20)

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 

Advanced mechanisms for dynamic content delivery

  • 1. ADVANCED MECHANISMS FOR DYNAMIC CONTENT DELIVERY
  • 2. Beyond CGI and SSI CGI is a simple mechanism for implementing portable server-side applications. There are a number of problems associated with CGI processing. Its main deficiency is performance. Processing a request that invokes a CGI script requires the spawning of a child process to execute that script. Moreover, any initialization and other processing that might be common to all requests must be repeated for every single request. SSI has similar deficiencies when its command processing employs CGI under the hood. It adds the additional performance penalty by requiring servers to parse SSI pages. Most importantly, SSI may represent a serious security risk, especially when not configured carefully by the server administrator. The SSI mechanism is not scaleable, and provides only limited opportunities for reuse.
  • 3. Native APIs (ISAPI and NSAPI) Efficiency concerns may be addressed by using native server APIs. A native API is simply a mechanism providing direct ‘hooks’ into the Web server’s application programming interface. Use of a native API implies the use of compiled code that is optimized for use within the context of a specific Web server environment. NSAPI and ISAPI are two approaches employed by Netscape’s Web server software and Microsoft’s IIS, respectively. The problem is that there is no commonality or consistency amongst these native APIs. They are different from each other, and code written for one environment cannot be reused in another. This makes it impossible to implement portable application
  • 4. Fast CGI FastCGI is an attempt to combine the portability of CGI applications with the efficiency of non- portable applications based on server APIs. The idea is simple instead of requiring the spawning of a new process every time a CGI script is to be executed, FastCGI allows processes associated with CGI scripts to ‘stay alive’ after a request has been satisfied. This means that new processes do not have to be spawned again and again, since the same process can be reused by multiple requests. These processes may be initialized once without endlessly re-executing initialization code. Template processing Another approach used to serve dynamic content involves the use of template processors. In this approach, templates are essentially HTML files with additional ‘tags’ that prescribe methods for inserting dynamically generated content from external sources. The template file contains HTML that provides general page layout parameters, with the additional tags discretely placed so that content is placed appropriately on the rendered page. Among the most popular template approaches are PHP (an open source product), Cold Fusion (from Allaire/Macromedia), and Active Server Pages or ASP (from Microsoft).
  • 5. Template processing cont. COLD FUSION <CFQUERY NAME="query1" DATASOURCE="oracle" . . .> SELECT id, columnX, columnY, columnZ FROM TABLE1 WHERE id = #substitution-parameter# </CFQUERY> <CFIF query1.recordcount GT 0> <TABLE> <CFOUTPUT QUERY="query1"> <TR> <TD>#columnX#</TD> <TD>#columnY#</TD> <TD>#columnZ#</TD> </TR> </CFOUTPUT> </TABLE> </CFIF>
  • 6. A better approach to serving dynamic content is the Servlet API— Java technology for implementing applications that are portable not only across different servers but also across different hardware platforms and operating systems. Like FastCGI, the servlet API uses server application modules that remain resident and reusable, rather than requiring the spawning of a new process for every request. Unlike FastCGI, the servlet API is portable across servers, operating systems, and hardware platforms. Servlets execute the same way in any environment that provides a compliant servlet runner. The servlet API generated very strong following; it is widely used in a variety of Web server environments Servlets
  • 7. Java Server Pages In contrast with earlier template approaches, most of which used proprietary tags, JSP instructions are formatted as XML tags, combined with Java code fragments. Together, these tags and code fragments express the logic to transform JSP pages into the markup used to present the desired content. It is not necessary for all application logic to be included in the page—the embedded code may reference other server-based resources. JSP ability to reference server-based components is similar to SSI support for referencing CGI scripts. It helps to separate the page logic from its look and feel and supports a reusable component-based design