UMass Lowell Dept. of Computer Science

91.461 GUI Programming I

Fall 2015 Semester, Section 201

Prof. Jesse M. Heines

Notes for Class No. 3

Understanding Web Servers and Browsers

Tuesday, September 8, 2015

A video of this class is (or will be) posted at:   http://echo360.uml.edu/heines201516/guiprogramming1.html


Handouts and Materials


Openings / Announcements / Reminders

Class Status Inventory

At this point I’m assuming that everyone ...

  1. has decided that they are here to stay!
  2. has read the course syllabus and certified that they have done so
  3. has joined Piazza — this is not optional
  4. has optionally downloaded the Poll Everywhere app to their phone
  5. has NetBeans or some other IDE running on their systems and ...


Class Notes

Related reading for this class:  CCS:TMM Ch. 1-2


Understanding Web Servers, Browsers, and Applications

The “Handshake”

Click the images below to enlarge them if you wish

Multitiered applications

Additional browser (client) functionality embedded in the browser itself

Additional browser (client) functionality available via plug-ins and add-ons

Web applications


What Is a Markup Language?


Understanding HTML Structure

Hierarchical Nesting

Figure 2-11, p. 42

figure source:  MacDonald, Creating a Web Site: The Missing Manual, Fig. 2-11 on p. 42

“Document Object Model”


I do not intend to lecture further on HTML

Use the online resources pointed to on the course website Resources page

I will, however, answer any and all questions that you may have on HTML5 in class an on Piazza


Critical concepts to remember


Issues with Assignment No. 2 Submissions

  1. be sure to submit the right file
  2. be sure to set permissions properly
  3. in general, do not underline text
  4. include your full name in the comments (review the notes for our last class)
  5. remember that you are to create a menu
  6. every link should go somewhere or do something (such as bringing up an alert dialog box, although that’s also frowned upon in today’s styles)
  7. if you create a “dummy” page for the assignments we haven’t done yet, that page should say somthing, such as “Not yet implemented” of “Under construction”

    Under Construction

  8. don’t forget to document the major sections of your code
  9. and don’t forget that I always encourage you to do more: be an autodidact


On problems with weblab.cs.uml.edu

I have the ability to reboot the web server on weblab.cs.uml.edu if it crashes, so please contact me immediately if this happens


Introduction to CSS

Good on-line references in addition to the W3Schools website (and numerous others)

What are styles?

Purpose:  To define the rendering of HTML objects

The C of CSS stands for cascade

Assignment No. 3 “What You Are To Do”

  1. Read the first two chapters of the textbook carefully and Chapter 3 up to at least the middle of page 68 (page 57 in the 2nd edition).  Then read Chapter 6.  I strongly advise you to do the tutorial that begins on page 178 (page 138 in the 2nd edition), at least through page 188 (page 144 in the 2nd edition).  It will really help you learn.

  2. To solidify your knowledge, *EITHER* watch Lesson 3 of Build Your First Website: Getting Started with HTML & CSS by Kevin Yank through Step 12 *OR* Lessons 1 and 2 of Getting Started with CSS by Russ Weakley.  The material in both of these videos is similar, but of couse not exactly the same, and you may certainly watch both if you have the time.  The material in the first video (the one by Kevin Yank that was assigned in Assignment No. 2) is actually more comprehensive, so if you are new to CSS I would recommend that you watch that one.  If you already have good experience with CSS, the second video (the one by Russ Weakley) will give you a quicker review.

    The important things to focus on in both the reading and the videos are the numerous techniques for specifying CSS selectors.  This is what we will be working on in class.  Writing CSS rules for things like colors and text styles is relatively easy, but using selectors to specify the precise objects you want to affect is not.  Also, note that jQuery and now even the latest version of JavaScript use the exact same selector mechanism, so it is absolutely critical that you master these techniques.  For this reason, CSS selectors will be the subject of our second quiz.


Inline Styles vs. Internal vs. External Style Sheets

Advantages and disadvantages of each

Inline Styles

<p style="color: red">This is red text.</p>

This is red text.

<p style="color: red ; font-style: italic ; text-decoration: underline">This is red, italic, underlined text.</p>

This is red, italic, underlined text.

Internal Style Sheets

<style type="text/css">
  ... rules go here ...
</style>

<style type="text/css">
  p.riu {  /* this rule applies to all p tags whose class is riu (red, italic, underline) */
    color: red ;
    font-style: italic ;
    text-decoration: underline
  }

</style>

External Style Sheets

<link rel="stylesheet" type="text/css" href="../css/LectureNotes.css">

<style type="text/css">
  @import url( ../css/LectureNotes.css ) ;  /* note that there are no quotes here */
</style>

p.riu {  /* this rule applies to all p tags whose class is riu (red, italic, underline) */
  color: red ;
  font-style: italic ;
  text-decoration: underline
}

A Comment on Comments


CSS Rules

The following material is covered in David Sawyer McFarland’s JavaScript & jQuery: The Missing Manual book (Chapter 4), but it is covered in much more detail in Chapter 3 of his CSS: The Missing Manual book.


[figure source:  CSS: The Missing Manual by David Sawyer McFarland, Figure 2-2, 2nd edition: page 33, 3rd edition: p. 38]



This is document http://jesseheines.com:8080/~heines/91.461/91.461-2015-16f/461-lecs/lecture03.jsp.  It was last modified on Friday, August 26, 2022 at 4:09 PM.
Copyright © 2022 by Jesse M. Heines.  All rights reserved.  May be freely copied or excerpted for educational purposes with credit to the author.