Lesson 1: Client-side vs. Server-side Scripting
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.
At the completion of this exercise:
- you will be able to name and describe some of the advanced technologies that are used to deliver web content.
- you will be able to explain the difference between client-side and server-side scripting.
- you will be able to define progressive enhancement.
- you will be able to identify what technologies are being used to implement particular websites or web features.
- Read the page Building the Web: Beyond HTML.
- 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.
- 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.
Great! Proceed to Module 2.