|
Entering the world of Web Development~~ |
|
|
|
|
Written by Madhuparna
|
|
Monday, 16 June 2008 |
Web development is a broad term for any activities related to developing a web site for the World Wide Web or an intranet. Various technologies can be used for web development starting from CGI to java serves pages or in short JSP.In this introductory article I would present the journey of web development from CGI to JSP,how one technology replaced the other.
The following norms may be followed for the right web development:
· Using the right tools such as build and deployment tools,version-control tools and profiling tools effectively.
· Using the appropriate design patterns such as Model View Controller(MVC),front controller,Data Access Object etc instead of trying to reinvent a solution to a certain class of problems over and over again.
· Using frameworks such as MVC(Structs,Spring),persistence(Hibernate),testing(jUnit,HttpUnit) etc to implement generic solutions to common problems faced by developers.
· Writing test cases early in the development cycle,often even before the actual code,tecting frequently during development,having early build and integration cycles and refactoring the code.The Common Gateway Interface (CGI) is a standard protocol for interfacing external application software with an information server, commonly a web server.The task of such an information server is to respond to requests (in the case of web servers, requests from client web browsers) by returning output. Each time a request is received, the server analyzes what the request asks for, and returns the appropriate output. CGI defines a standard way of doing it.The basic function of the Web server restricts it to serve a finite number of static Web pages.The content of each page remains the same.There is no easy way to show the information that may change such as today’s weather,the latest news etc.The major shortcomings of basic CGI are as follows:
· The overhead of starting an operating system process for each incoming request.
· The overhead of loading and running a program for each incoming request.
These two operations consume a large number of CPU cycles and memory.Because both operations must be performed for each incoming request,a server can be overloaded if too many requests arrive in a short period of time.
Java based CGI is not suitable for handling CGI requests because Java is inherently an integrated language.Because of this,a very large program called the Java Virtual Machine (JVM) must be started to handle an incoming request.Because the Java platform can load new classes during runtime dynamically this capability can be used to load new Java classes to handle incoming requests.In other words a server-side process is started once and loaded with JVM once but additional classes are loaded by the JVM to process incoming requests.This gave birth to a new technology java servlets.In short a programmer will first write a Java code,then compile it,and then register the execute the code via servlet container.Should there be any need to modify the servlet,the Java source code must be modified,recomplied and then deployed via the servlet container.To avoid this modification and recompilation JSP came into being.When using JSPs,it is not necessary to write or compile any code in Java programming language.Modifications to the JSP can be viewed immediately because the JSP container(JSP engine) will automatically recompile the JSP.A JSP code is basically an HTML page with some special markup tags.When the JSP is accessed by an incoming request,the JSP container will parse the special tags and replace them with dynamic output.
To be continued………….
I am beginner in this whole new technology.Precious comments and suggestions on this article from others are requested.
|
|
Last Updated ( Saturday, 11 December 2010 )
|