Lectures for Web Programming

On-campus and Online

Week 1 - Introduction | Prerequisites: HTML, CSS & JavaScript Basics

Lecture

Demos

Files

Download: Handout

LyndaCampus:

Prerequisites

Related

  • Recap of HTML, CSS and JavaScript Basics
  • HTML (15:06) Transition to HTML5, Key Rules, Doctype, Encoding, Tables, Links, Images.
  • HTML Elements (9:00) Hierarchy of Tags, Block and Inline Elements - div, id, class.
  • HTML5 (7:56) Overview of key new features in HTML5.
  • CSS (12:20) Why, What, Where, Location of CSS Style Definition, Structure of CSS Formatting Rule.
  • CSS Cascade (17:40) Inheritance, Specificity & Location Cascade, Constructing Complex Selectors.
  • CSS3 (2:38) Overview of key new features in CSS3.
  • Box Model (4:08) Box Model: width, height, padding, border, margin, box-sizing, overflow.
  • Floating & Positioning Elements (7:22) Floating Element, Absolutely Positioned Element, CSS properties: float, clear, position, display.
  • CSS Reset (2:26) "Clean Slate" CSS, Make HTML5 Backwards Compatible, HTML5 shiv.
  • Programming (7:20) Basic Programming Concepts.
  • JavaScript (22:25) Basic Elements, Document Object Model, Image Rollovers.
  • Test & Debug (5:45) Easy Things to Check First.

Resources

  • HTML = HyperText Markup Language
  • Encoding
  • Unicode
  • UFT-8: dominant character encoding for files, e-mail, web pages and software that manipulate textual data.
  • CSS = Cascading Style Sheet

 

  • CSS Cascade
  • CSS Navigation

 

  • Debug: Easy Things to Check First
  • Be careful about typos.
  • Upload file in the correct location
  • Make sure spelling of URL = spelling of filename.
  • CSS
  • Use colon (:) to separate your properties from value (color: red;).
  • Complete each property-value pair with semicolon (;)
  • No spaces between number and their units (16px).
  • Still Stuck, then check for typos and easy stuff first :)
  • FTP = File Transfer Protocol   and   Permissions
  • Permissions
  • Types of Permissions
  • Read : for being able to read the file/directory
  • Write : for being able to write in the file/directory
  • Execute : for being able to access the file/directory
  • Who are Permissions set for?
  • Owner : you
  • Group : group you belong to
  • Others : the rest of the world

  • JavaScript     Client-side scripting language

Back to Top

Week 2 - Workflow Tools | Code Editor | Version Control | JavaScript Essentials

Lecture

  • JavaScript Basics 1 - W3Schools
    • js_statements
    • js_variables
    • js_functions test yourself
    • Scope js_scope
    • Variable declared outside function, becomes GLOBAL.
      All scripts and functions on page can access it.
    • Variables declared within a JavaScript function, become LOCAL to the function.
    • Variables created without the keyword var, are always global, even if created inside a function.
    • Global variables live as long as your application lives
    • Local variables have short lives. They are created when the function is invoked, and deleted when the function is finished.
  • JavaScript Basics 2
    • js_events
    • js_if_else
    • js_arrays
    • Debugging js_debugging
    • Best Practices js_best_practices
    • Avoid Global Variables ... Use local variables instead, and learn how to use closures.
    • Always Declare Local Variables
    • Declarations on Top
    • Initialize Variables
    • Never Declare Number, String, or Boolean Objects

Demos

  • Repeat Actions and Test for Conditions

Files

Download: Handout

LyndaCampus:

Resources

  • CSS - Why, What, Where, Location of CSS Style Definition, Structure of CSS Formatting Rule, Inheritance, Specificity & Location Cascade, Constructing Complex Selectors, Box Model, Floating Element, Absolutely Positioned Element, CSS Navigation.
  • Basic Programming Principles
  • JavaScript - Basic Elements, Document Object Model
  • CSS = Cascading Style Sheet

 

  • CSS Cascade
  • CSS Navigation

 

  • JavaScript     Client-side scripting language

Back to Top

Week 3 - Programming Principles: JavaScript Essentials

Lecture

  • JavaScript Objects
    • js_objects test yourself
    • Properties: (property) keys are used to access (property) values
    • Methods: stored in properties as function definitions
    • Object Literal: comma-separated list of name:value pairs in curly brackets

Demos

Files

Download: Handout

Back to Top

Week 4 - Programming Principles: JavaScript Essentials

Lecture

  • Create Data to map
    Specify location object that stores: location name, category, short info, address, lat, lng, map to use
  • Create Array that contains location objects
  • Create Geocode function for address link
    var geocoder = new google.maps.Geocoder();
    https://developers.google.com/maps/documentation/javascript/reference#Geocoder
    geocode(request:GeocoderRequest
    callback:function(Array<GeocoderResult>,GeocoderStatus))
    GeocoderRequest = address    “4 Huntington Street, New Brunswick, NJ”
    GeocoderResult = results[0].geometry.location.toString()
  • Geocode and Place All Markers using Recursive Function

    Create automateGeocodePlaceMarker (geocoderUse, locIndex, locArray, mapToUse)

    geocoderUse.geocode({'address': locObjUse.address},

          function(results, status) {

            if (status === 'OK') {
                // assign geocode to locObj + specify map to use + place marker

                // recursive function call   only if  locIndex + 1 < locArray.length

            } else {

                // Geocoder NOT OK because QUERY LIMIT triggered

                setTimeout(function(){automateGeocodePlaceMarker and use locIndex)

                https://www.w3schools.com/jsref/met_win_settimeout.asp

            }

    });
  • Create placeMarker (locationObjUse, mapToUse)
  • ======
  • Use Custom Markers link  
    Define nested object icons = { Restaurant: { icon: iconBase + 'parking_lot_maps.png' }}
  • List of Map Icons
  • Customize Info Window link
    Format location info and width = 400
    • h2 element used for location name,
    • p element for category and floated to left,
    • p element for short info,
    • Border = 2px and left border = 10px.
    Add click eventListener
    Make map draggable
  • ======
  • Add Form assign name and id = “myForm”
  • Add Radio Buttons to control whether category info is shown in Info Window
    http://www.w3schools.com/js/js_validation.asp
    document.forms["myForm"]["category"].value
    => call in Info Window eventListener
  • Add Checkboxes to control which categories are shown in map
  • addEventListener (“submit”, updateMap);
  • Create updateMap function
    event.preventDefault();
  • Remove Marker link
    var markers = [];      markers.push(marker);

Demos

Files

Download: Handout

Back to Top

Week 5 - Responsive Web Design | Front-End Frameworks: Bootstrap.js

Lecture

  • Create Data to map - Specify location object
  • Create Array that contains location objects for each map
  • Create Geocode function for address link
    var geocoder = new google.maps.Geocoder();
    geocode(request:GeocoderRequest
    callback:function(Array<GeocoderResult>,GeocoderStatus))
    Can place marker once geocode returned => callback function
  • Create automateGeocodePlaceMarker(geocoderToUse, i);}
    geocoderUse.geocode({'address': locObjUse.address},
    function(results, status) {
    if (status === 'OK') {
    // assign geocode to locObj
    // specify map to use based locObjUse.mapToUse
    // place marker
    } else {

    setTimeout(function(){automateGeocodePlaceMarker and use locIndex)

    https://www.w3schools.com/jsref/met_win_settimeout.asp

    });

  • Create placeMarker (locationObjUse, mapToUse)
  • Use Custom Markers link | List of Map Icons
  • Customize Info Window link
    Format location info: div contains h2 and p elements and apply border to div
    Add click eventListener
    Make map draggable
  • ======
  • Add Form assign name and id = “myForm”
  • Add Radio Buttons to control category info in Info Window
    http://www.w3schools.com/js/js_validation.asp
    document.forms["myForm"]["category"].value
    => call in Info Window eventListener
  • Add Checkboxes to control which categories are shown in map
  • addEventListener (“submit”, updateMap);
  • Create updateMap function
    event.preventDefault();
  • Remove Marker link
    var markers = [];     
    markers.push(marker); => call in placeMarker

    if (document.getElementById(currentLocation.category).checked) {

        currentMarker.setMap(mapToUse);

    } else { currentMarker.setMap(null); }
  • Bootstrap 4 - W3Schools
    • Installation: Basic or Advanced
    • getbootstrap.com
    • jquery.com
    • Standard = CDN  vs  Customize = Download Source
    • Grid System 12 columns - W3Schools
    • Containers
    • .container
    • .container-fluid
    • Rows and Columns
    • .col-SIZE-SPAN - W3Schools
    • SIZE: extra | sm | md | lg | xl
    • SPAN: needs to add up to 12
    • 1 Column => SPAN = 12

      2 Column => SPAN = 6

      3 Column => SPAN = 4

      4 Column => SPAN = 3

      6 Column =>SPAN = 2

      12 Column => SPAN = 1

  • Bootstrap 3 - W3Schools
    • Installation: Basic or Advanced
    • getbootstrap.com
    • jquery.com
    • Standard = CDN  vs  Customize = Download Source
    • Grid System 12 columns - W3Schools
    • Containers
    • .container
    • .container-fluid
    • Rows and Columns
    • .col-SIZE-SPAN - W3Schools
    • SIZE: xs (phone) | sm (tablet) | md | lg
    • SPAN: needs to add up to 12
    • 1 Column => SPAN = 12

      2 Column => SPAN = 6

      3 Column => SPAN = 4

      4 Column => SPAN = 3

      6 Column =>SPAN = 2

      12 Column => SPAN = 1

Demos

  • Navigation Components

Files

Download: Handout

Back to Top

Week 6 - Responsive Web Design | Front-End Frameworks: Bootstrap.js

Lecture

  • Bootstrap 4 - W3Schools
    • Installation: Basic or Advanced
    • getbootstrap.com
    • jquery.com
    • Standard = CDN  vs  Customize = Download Source
    • Grid System 12 columns - W3Schools
    • Containers
    • .container
    • .container-fluid
    • Rows and Columns
    • .col-SIZE-SPAN - W3Schools
    • SIZE: extra | sm | md | lg | xl
    • SPAN: needs to add up to 12
    • 1 Column => SPAN = 12

      2 Column => SPAN = 6

      3 Column => SPAN = 4

      4 Column => SPAN = 3

      6 Column =>SPAN = 2

      12 Column => SPAN = 1
  • Bootstrap 3 - W3Schools
    • Installation: Basic or Advanced
    • getbootstrap.com
    • jquery.com
    • Standard = CDN  vs  Customize = Download Source
    • Grid System 12 columns - W3Schools
    • Containers
    • .container
    • .container-fluid
    • Rows and Columns
    • .col-SIZE-SPAN - W3Schools
    • SIZE: xs (phone) | sm (tablet) | md | lg
    • SPAN: needs to add up to 12
    • 1 Column => SPAN = 12

      2 Column => SPAN = 6

      3 Column => SPAN = 4

      4 Column => SPAN = 3

      6 Column =>SPAN = 2

      12 Column => SPAN = 1
 

Demos

  • Navigation Components

Files

Download: Handout

Back to Top

Week 7 - Modular, Reusable User Interface Components | Front-End Frameworks: React.js

Demos

  • Props and State

Files

Download: Handout

Back to Top

Week 8 -Modular, Reusable User Interface Components | Front-End Frameworks: React.js

Demos

Files

Download: Handout

Back to Top

Week 9 - Single Page Application | Data Exchange: JSON | Back-End Frameworks: Node.js and Express.js

Demos

Files

Download: Handout

Back to Top

Week 11 - Back-End Frameworks: Node.js and Express.js

Demos

Files

Download: Handout

Back to Top

Week 12 - Component-Based Architecture | Front-End Franeworks: Angular.js

Demos

Files

Download: Handout

Back to Top

Week 13 - MEAN Stack | Databases: MongoDB Development

Demos

Files

Download: Handout

Related

  • Database Modeling: Optimization

Back to Top

Week 15 - Course Review | Term Project

Lectures

Topics:

  • Course Review.

Files

Download: Handout

Back to Top