Static Sites vs Dynamic Pages
Many people who are unfamiliar with web content management systems wonder what the benefits of such a system over traditional static HTML and server page languages like ASP, JSP, and PHP. Well lemme explain that first!
A website is collection of documents written in the HTML language. When a user looks at a website with a browser , the browser is able to follow the instructions presented to it in HTML to make a website look a certain way. Click Here to open a new browser window which will show you an average website. If you were to look at the HTML code for this site, you would see the following:
<title>An html Website</title>
<body bgcolor="#003399" text="#ffcc33">
<h1>An html Website</h1>
<p>This is an average website.
this html page will show same content forever.
The above HTML code for “the html website” is static. That is, if the user were to reload a static website, they would see the exact same content every time. Its content was written directly by an author, and when the user goes to the site, that code is downloaded into a browser and interpreted.
In contrast to a static website, a dynamic website is one whose content is regenerated every time a user visits or reloads the site. Click Here to open a new browser window to a dynamic page( here i hav used PHP code) which tells the time at the particular second that it was accessed. If you click on the “Reload” button several times, you should notice that the time will change.
If u try to get the code of this page from the html source you will get the following:
<title>Today's Date & Time:</title>
<h1>Today's Date & Time:</h1>
<p>Wednesday 05th of July 2006 11:30:36 AM
the time will change when the page is refreshed. try it!!
But the actual code was:
<h3>The Date & Time: </h3>
<? echo (date ("l dS of F Y h:i:s A")); ?>
<p>the time will change when the page is refreshed. try it!!
This is the difference between a static page and a dynamic page! got it!!
In common , the html page is run on ur system as such, but the dynamic pages( server pages) will send the file to the particular server engine from ur system browser and then will be published back on ur browser after processing the dynamic codes.When you create a static web page, you simply write HTML code. Writing a dynamic page with PHP(or any other) is similar, except you embed the PHP(or any other) code inside of the HTML code.
The Server Pages Commonly used in Web management are ASP , PHP , JSP,XSP,perl Cold fusion etc. We will see them in detail now.
ASP vs. PHP vs JSP
Today’s world is flooded with technologies , especially in the web genre, Ofcourse, it’s difficult to keep track of the new (or old for that matter) technologies.But there are two acronym that stand strong in today’s web design vernacular! than any other do.ASP and PHP are different approaches to building dynamic Web sites that can incorporate database interactivity and other application server uses into your Web site.
ASP stands for Active Server Pages and PHP stands for Hypertext Preprocessor.
ASP is a product from the Microsoft and is used with “Internet Information Server” (IIS) which is a program that runs on Microsoft servers. ASP is generally not supported beyond Microsoft servers. However, there are 3rd party applications that can make it compatible with a few other servers. ASP is widely used for large companies Web needs.
PHP is a parsing language. The major NT and UNIX Web servers support it and it is widely used with the mySQL database. Small and medium Web developers use it religiously. Independent Web developers as well as a growing number of small and medium sized businesses love PHP.
JSP – Java Server Page is an extension to the Java servlet technology pioneered by Sun. Like ASP and PHP it provides a simple programming vehicle for displaying dynamic Web content. JSP is the Sun/Java attempt to compete with Microsoft’s ASP. JSP is not widely used however it has a small core of enthusiasts who are claiming it to be as powerful and dynamic as ASP. These patrons usually fail to even acknowledge the PHP genres existence (probably because PHP is far more popular than JSP).
There are many other too.. for an instance Coldfusion a product from Macromedia.
Why do we need these server pages??
The need for either of these Web development tools is derived from the inability to control the end-users computer(the site visitor’s computer). In other words Web developers don’t have control over what applications their site traffic may or may not have on their user system.For example, whether the client uses MS access or MYSQL. for database? or MS word or Corel word perfect for word processing? ans so.. If your site is going to incorporate a Web page design that will include database, word-processing and other application data, a developer has to know exactly what apps will be used to generate Web content. The best way to control this is to have all content generated on the Server instead of the client.
Sever Side Scripting is the way today’s Web pages are run. Static Web sites (no dynamics) that just have information and no interactivity with server programs are becoming less . It is no longer a huge financial burden to pull off dynamic content. There are many free servers that allow you to write scripts to the server and you can run a full throttle business class site with just a small financial contribution each month using some of the more sophisticated Web hosting packages.
Now the problem is to decide which dynamic program to use for the web design? is it!! Lets see that now.
ASP is not a straightforward program that can be picked up from scratch easily. However this is typical of a Microsoft application. The major reasons that large companies are running it instead of PHP include the following 3 important factors.
- Microsoft products are all over the globe and it makes their site compatible with a significant number of other big businesses sites. This makes business to business transactions easier because everyone involved is running the same platforms and applications. (this is microsoft’s market bang!!)
- Large companies already have their computers running Microsoft products and their employees are trained in the Microsoft program environment. This keeps training investments down to a minimum and keeps companies from investing in new equipment and software.
- If a large company wants to take over another (an acquisition or merger) or is bought out themselves, the ability to easily integrate systems (databases, document processing, spread sheet and accounting applications) is invaluable and can make a company appear to be a much more attractive prospect to potential benefactors. Therefore keeping your business dressed up in MS clothing can have a certain appeal.
Trying to incorporate existing Microsoft application data into a PHP run Web site would require starting from scratch with a great deal of headaches including purchasing new programs. Therefore some small and medium sized businesses that already are hooked on Microsoft products may opt for ASP as well.
However PHP is the developers tool that has gained the most respect amongst Web gurus. Most describe it as an easy to use and feature packed program that allows you to create dynamic and database driven Web sites effortlessly. It is a free program that is open source so it can be modified to fit developers needs. Most developers who like Linux and mySQL are also fans of PHP. ( Setting up server with PHP and MYSQL is provided in the previous post by madan)
But , there is a rapid growth on the usage of PHP among most independent developers. The reasons behind its rapid growth are:
- It’s easy to learn and the available support for it is through the roof. The Web has always been about individuals banding together to create resources for one another. PHP is loved by the Web community and you will find and abundance of tutorials, tools, Web sites and other online support ready and available to guide you from your Web sites conception to it’s launch.
- More and more host servers are supporting PHP; chances are you can find a good free or cheap host for your site that will allow you to run a dynamic PHP site.
- ASP is supported by Microsoft servers only (unless you use a 3rd party utility that facilitates support); however, PHP is supported by many different “html” servers.
Choosing the products for ur page is based on many variables but none more important than preference. No one visiting your site would says that ur page is designed in php or asp , as he never bothers about them. What they will do is evaluate the site’s usefulness based on design and content. Therefore as long as your site follows the good design and also provides the content that the client was looking for any of these dynamic content tools will work just fine, so take your pick.