Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Navigation for Single Page Applications

This screencast covers how to construct a single page application with a tab-like navigation user interface and routing. A solution is introduced that uses only Web Standards (HTML, JavaScript, CSS, The DOM).

Even though libraries like Bootstrap, Backbone, Angular, Knockout and Ember do most of the work for you when implementing this kind of system, this screencast does not use any libraries at all. This emphasizes the core technogies, and provides a foundation for understanding how those libraries work.

Curran Kelleher October 2014

Background

Single Page Application

Workflow Review

  • Editor / IDE
    • Needs to insert only spaces or only tabs
    • Mixed tabs and spaces causes editor-specific indentation errors
  • Git Command Line
    • Running on your machine in same directory as the editor
  • Local Server (e.g. python -m SimpleHTTPServer 8080)
    • This is far better than doing your development over an SSH connection
  • DOM Inspector (<p>Hello</p>)
  • JavaScript Console (console.log("Hello");)

Navigation Interfaces

  • Wordpress Blogs
  • Approaches
    • Separate HTML pages
      • e.g. PHP applications
      • Used to be standard practice
      • Replaced by the "Single Page Application"
    • Single Page Application
      • A single page with no reload
      • Dynamic behavior added using JavaScript
      • Content fetched as needed
      • Routing using a fragment identifier
        • Was the standard practice for a long time
        • Slowly being replaced by HTML5 History API
      • Routing using HTML5 History API
      • Caching

Examples

Check out the Example Viewer. Use left and right arrow keys to navigate.

Feel free to use and modify for your own presentations! MIT License.

By Curran Kelleher October 2014