Server Side Programming

Only available on StudyMode
  • Download(s) : 57
  • Published : April 25, 2013
Open Document
Text Preview
3/3/2013

Introduction


Client-side applications require additional support in the case of  Heavy processing.  Serving dynamic requests from users.  Data available on multiple databases.  Communication with other clients. The request is sent to the server and processed at server-side. Results are dynamically generated documents based on requests made. 3/3/2013

Server Side Programming





© Sowmya Kamath S., Dept of I.T, NITK Surathkal

3/3/2013

Dept of I.T, NITK Surathkal

Static Page Serving

Dynamic Page Serving

1. Request service 1. Request resource

2. Retrieve file 3. Send document

2. Do Computation 3. Generate XHTML page with results of computation (newly generated page)

4. Return dynamically generated document

Dept of I.T, NITK Surathkal

3/3/2013

Dept of I.T, NITK Surathkal

3/3/2013

1

3/3/2013

3-tier Model


3-tier Model (contd.)

E-commerce applications are almost always modeled using the 3tier Model.



This enhances modular design and platform independence of a

web based application.


Using the 3-tier model, the business logic can be kept separate from the frontend(web client) and the backend(the server, database systems etc.)

Dept of I.T, NITK Surathkal

3/3/2013

Dept of I.T, NITK Surathkal

3/3/2013

3-tier Model (contd.)

3-tier Model (contd.)
Advantages:  Ease in scaling.


Separate handling of different functions. Modular design and layered architecture facilitates change or replacement of one tier without affecting the others.



Dept of I.T, NITK Surathkal

3/3/2013

Dept of I.T, NITK Surathkal

3/3/2013

2

3/3/2013

Client Side Scripting


Client-side vs. Server Side Scripting


Browser typically employs script handling mechanism to execute code and control content output and display. Script source code is exposed to the user. User may disable script support. Limited to dynamic effect displays, event handling and form validations . 3/3/2013







Client-side Advantages  Minimal processing on server. Server sends web page with embedded script. Client's browser executes script.  Server platform and language support largely irrelevant, just retrieves file and transmits. Disadvantages  Client browser may not fully support or script execution may be turned off. Browsers inconsistent in execution.  Security issues—user can see (change?) script embedded in source. 3/3/2013

Dept of I.T, NITK Surathkal

Dept of I.T, NITK Surathkal

Client-side vs. Server Side Scripting (contd.)


Server Side Programming


Server-side Advantages  Can connect to various data sources and customize reply to client.  Easier large-scale site creation. No need to create hundreds of static pages; instead create smaller set of dynamic pages. Disadvantages  Poor coding by programmer may open resources to attack through security flaws.  Script tied to server execution environment. Server must support desired scripting language. 3/3/2013

„Database Interaction


  

„Searches
„Form processing „Customized and personalized pages etc. „Mailing lists, RSS feeds

Dept of I.T, NITK Surathkal

Dept of I.T, NITK Surathkal

3/3/2013

3

3/3/2013

History of Server Side Programming Techniques


History of Server Side Programming Techniques (contd.)


C „ ommon Gateway Interface (CGI) was the first generation approach to providing dynamic web content  … scripts Used  embeds XHTML in programming code „Numerous second generation alternatives were invented:  … FastCGI, … mod_perl, … NSAPI, … and Java Servlets ISAPI  These embed XHTML in programming code. 



Costly.

Scripting - the Third Generation Approach  „Embed simple code in XHTML pages  „ The XHTML pages use the code to decide what elements to display and what data should be displayed  „ unctions and/or subroutines can be called to compute F information for inclusion in the web page....
tracking img