HTML and CSS Reference
In-Depth Information
Static web pages have constant content that is either valid or not, but can be relatively easily validated and, if
necessary, updated to make the markup and styles standard-compliant. Server-side scripting, on the other hand,
provides content generated on the fly . The source code of the program that generates the markup on the server-side
is quite complex to check for markup errors. Server-side scripts often rely on hard-coded codeblocks that cannot be
easily modified. Validating and standardizing large web sites with hundreds of thousands of web pages relying on
incorrect code can be practically infeasible.
The major problem with web sites relying on data stored in databases and processed by server-side scripts is
the higher complexity and the lack of full control. Templates used by Content Management Systems are not always
standards-compliant which is distributed on all sites that apply the same templates. Moreover, a single problem of
either the script or the database can result in an error message instead of the web page content (Figure 6-1 ).
Figure 6-1. Content replaced by error message
There is a huge difference between small programs running on web pages and programs created for generating
web pages. Server-side scripting languages are powerful and provide features that cannot be achieved by static
content. There is nothing wrong with small contact forms, for example. However, server-side scripts should be used
only where really needed. A huge advantage of server-side scripts is that they can provide the same headers, footers,
and so on, as templates for identical markup fragments (header, sidebar, main area, footer, etc.) throughout the web
site that can be easily maintained from a single location (in contrast to static web pages). However, the application
of server-side scripting should be minimized on web sites that do not rely on databases and dynamically generated
content, such as small-scale, brochure-style web sites. Undoubtedly, a large share of invalid markup code on the
Web is generated by server-side scripting languages. In many cases, additional practices are required to obtain valid
markup, such as to handle the ampersand characters used as an argument separator in URLs of PHP sessions [2]
Client-Side Development
Client-side development refers to those web programs that run on the client side, generally a web browser, instead
of being executed on the server side (on a web server). Client-side programs can be used to provide different and
changing content on a web page, depending on user input and other variables. For example, “dynamic” greetings can
be added to a web page according to the current time of day.
Search WWH ::

Custom Search