HTML and CSS Reference
In-Depth Information
Chapter 6
Scripting and Applications
Modern web sites are meant to be dynamic. Very few web sites are based purely on document structure and style
sheets. Web site sections often behave differently or react to user input. While small programs can run in the browser,
complex functions are usually executed on the web server. Most dynamic sites are powered by databases that are
handled by server-side scripts. Since server-side languages frequently use variables and reuse large code blocks, the
validity of the generated code relies on the code quality of the development framework, the Content Management
System, or the templates, often resulting in incorrect markup and styles. Even so, web designers can modify the code
so that the server-side system will generate valid, error-free markup and style sheets. This can be challenging if the
framework or CMS core uses invalid syntax and multiplies incorrect code blocks throughout the site.
In this chapter, you will learn why the standardization of dynamic content is more challenging than that of static
pages. Becoming familiar with the basic syntax of the most widely used client-side and server-side scripting languages
is crucial, because small programs written in these languages are often embedded into the markup. The inline
scripts might have an impact on the standards compliance of a whole web page. You will also learn how to provide
alternate content for scripts. Although the standard compliance of the markup generated on the server side using
web programming languages, frameworks, and development platforms to provide web applications is constantly
improving, the generated code is often incorrect. Many of these development technologies are not standardized
but are implemented worldwide and considered de facto standards. Many technologies rely on a number of other
technologies and standards. This chapter provides a quick overview of some of the most common scripting and
application development technologies that often determine the standard compliance of dynamic web sites.
Client-Server Architectures
The distributed application structure that divides tasks and/or workloads between resource or service providers,
called servers , and service requesters, called clients , is known as the client-server model . Clients and servers
communicate over the Web to exchange data and perform tasks.
The client-server architecture represents relationships between cooperating programs in a web application.
For example, a contact form can be evaluated on the client side and processed on the server side.
The general syntax and grammar conventions of the most popular client-side and server-side scripting and
programming languages, technologies, and frameworks are discussed in the following sections. Note that a detailed
description of scripts and applications is beyond the scope of the topic.
Scripting and Standards Implementation
A script is program code that does not require preprocessing (such as compiling) before execution [1]. Small dynamic
components of web documents such as the current date or interactive content and behavior can be added by scripting
languages . Modifications can be performed on the web page content without reloading the new version of the page.
Content can be added to or sent from a web page with Asynchronous JavaScript and XML ( Ajax ) without reloading the
entire updated page.
Search WWH ::

Custom Search