Lesson 1: Client-side vs. Server-side Scripting

Overview

In the early days of the web, most web pages were static pages with very little or no interactivity. Today's web, however is much more interactive. People can shop online, bank online, watch videos, listen to music, share photos, chat with friends, play interactive games, maintain BLOGs, and on and on. The level of interactivity on today's web would not be possible if web designers were limited to using HTML and CSS. This lesson describes some of the advanced technologies that help to make the web more engaging.

Learner Outcomes

At the completion of this exercise:

Activities

  1. Read the page Building the Web: Beyond HTML.
  2. As a group, visit prominent websites that exemplify the types of technologies discussed in this lesson. Look closely at how sites respond to user input. For example, if you input content into a form, how does your input affect the content on that page, or on subsequent pages? Talk about the role that scripts are playing in the delivery of all the content you observe. Is the content or feature made possible using client-side scripts? Server-side scripts? A back-end database? Try to guess or figure out what technologies are being used, beyond HTML.
  3. As homework, find three websites:
    • One that seems to use client-side scripting
    • One that seems to use server-side scripting
    • One that seems to include content that's stored in a database

    Remember that if web pages respond in any way to user input, there is some form of scripting involved. Client-side scripts typically result in changes to the current page (such as sub-menus appearing, or hidden content suddenly becoming visible), whereas server-side scripts typically result in custom content being delivered to the browser when a new page is loaded. Also, client-side scripts will show up in the source code, and server-side scripts may be detectable by the filename extension (for example, .php, .asp, .aspx). Also, if the URL of a page includes variables and values separated by "&" and "=", the page is probably using server-side scripting, taking those variables and processing them before creating an HTML web page.

    To determine whether a database is involved behind the scenes, consider the content itself. Some sites deliver content or perform functions that could only be accomplished with the help of a database.

    Sometimes identifying the technologies used in creating websites is challenging. Sometimes it's even impossible. But try to make educated guesses based on what you've learned in this lesson, and be prepared to discuss your opinions with the class about why a particular technology might or might not have been used for a given website.

All done?

Great! Proceed to Module 2.