HTML and CSS Reference
There are both a server and client components to consider when building a web application. On the server, IIS
responds to the HTTP requests as I mentioned. For static content, the HTML files can be simply stored in a virtual
folder within IIS and no programming is required. For dynamic content, a web application is needed to generate
HTML. Enter ASP.NET.
ASP.NET allows you to write code to dynamically create HTML. For example, the page can query a database
and populate a grid using the data returned from the database. Likewise, the data presented in an HTTP Post
request can be written to a database. Also, while a web application is generally considered stateless, ASP.NET
provides several techniques for saving information between requests.
On the client side, the browser is responsible for rendering the content. This content is provided as HTML,
which is essentially text with embedded formatting tags. In addition, cascading style sheets (CSS) are provided
which instruct the browser how to format the content. The support for these HTML tags and CSS constructs will
vary, however, between the available browsers and herein lies some of the biggest challenges of web development.
Improving the Web Experience
The page-centric approach is a major obstacle in raising the bar of the overall user experience. Refreshing an
entire page is not very efficient. To address this issue, two key improvements were introduced:
Using Client-side Scripting
although others such as VBScript are also possible in some browsers. The ability to run scripts in the browser is a
huge improvement. For example, a script can hide or show a section or modify the format of the content based on
the user input. Since this happens on the client, no round-trip to the server is necessary. This makes the web site
seem much more responsive.
with scripting disabled.
scripting to communicate with the web server outside of the typical page refresh scenario. In a nutshell, AJAX
Model (DOM). This allows portions of the web page to be updated as needed without a complete refresh.
AJAX can also be used to call web services independently from the web server that is hosting the web page.
You can use this to access data provided by a third party such as stock quotes or currency conversion. You can
also call your own web services to perform real-time updates or load data based on user input. For example,
you can provide a product search feature and use AJAX to call a web service that returns the matching products.
Again, this is all independent of the standard page refresh paradigm.
Figure 1-2 illustrates the more robust model that most web sites use today.