• What?
  • Who?
  • Contact Jonathan Jeter
  • Privacy Policy

Jonathan Jeter

Director of Application Development

  • Jonathan Jeter on Google+
  • Jonathan Jeter on Facebook
  • Follow Jonathan Jeter on Twitter
  • Jonathan Jeter on LinkedIn
  • Jonathan Jeter's rss feed
Home Web Development Killer App Design with Javascript and HTML 5

Killer App Design with Javascript and HTML 5

March 11, 2012 By Jonathan Jeter 1 Comment

HTML5 and Complex Web Apps

Web 2.0 vs HTML5 apps

Web 2.0

  • Dynamic content
  • Database driven
  • Social applications
  • Stupid name
  • “The Internet is more than lame dancing genies and hit counters!”

HTML5 Apps

  • Interactive content
  • Real-time
  • Task-oriented
  • Cool logo
  • “You can have a desktop experience in your browser”
  • Not trying to replicate a desktop software experience.

HTML5 – New Markup (separating functionality and presentation in the DOM with data-* attributes)

Amazing JavaScript APIs

Application Architecture

Lots of tools available that will allow for a more robust application development process.

  • Moving state to the client
  • Wep app Kool-Aid: MVC/MVVM, pub/sub and the module pattern
  • Your application as an API

Don’t do it alone

Toolkits, precompilers, boilerplates, and more

For the enterprise-y among you

Testing, IDEs and other developer tools

Separating Presentation and functionality in the DOM

The current method is using CSS selectors. It works until an element (class) needs to be changed in the markup.

WebSockets

Bi-directional communication between the server and client (over a single TCP socet). A push technology for the browser. The standard example for this is a chat application, but anything that might initiate a UI from the server-side would be a good example of this. Much better than polling with multiple nested AJAX callbacks.

With web sockets, you assign a node on the client and on the server. Recommended for usage over AJAX in these specific examples.

Device Access

File system, orientation, geolocation and even battery life access available from mobile devices. Examples are really straightforward. You can start dropping some of these things into your apps immediately.

Web Workers

Web workers are a solution for multi-threaded JavaScript apps. Web Workers spawn background script in your web application. Don’t hold up the entire application/UI while waiting for some serious computation to occur.

Offline Storage

Store data in the user’s browser and retrieve it via simple JavaScript API, in all varieties and flavors, from SQL, NoSQL, etc.

Bringing a desktop experience to the Browser

Web app Kool-Aid: JavaScript application design patterns

This is for JavaScript applications that need to scale, not a small local app. MVC Frameworks should only be used for projects that need to be scalable or have a lot

MVC/MVVM – Model-View-Controller and related MVVM patterns are used to separate logic and presentation for more reusable code.

Old school MVC in web apps sends the request to the web server which is processed by the controller and the entire page is sent back.

When you put MVC in the client it gets a little more complex because the server is constantly interacting with the browser because the routing logic is handled in the browser.

Module Pattern – best practice in general. Allows for flexible, reusable, decoupled code — essential when building large-scale applications with a team of developers.

Pub/Sub (the Observer pattern) – To avoid dependencies between modules in your application, have them communicate through even subscriptions instead of direct calls. (There are pre-existing toolkits that aren’t very big) Everything is based on an event. (like an AJAX onSuccess call) very straightforward to the point of being obvious, but it’s so simple that sometimes it’s overlooked. Once you’ve encapsulated your application in modules, this becomes important.

Leverage some existing code to get you started, then handle/subscribe/publish

Managing Complexity

There is no reason to  shoehorn code into the browser based on the environment that you like to code in (Visual Studio/Eclipse).

MVC/MVVM frameworks

Full-featured (include UI components)

  • Ember
  • Enyo
  • SproutCore
  • Closure

Just the tools

  • Backbone (+ broilerplate) (most popular as of Mar 2012)
  • Angular (trendiest as of Mar 2012)
  • Sammy
  • Spine
  • JavaScript MVC
  • Knockout

“I have JavaScript so How About… (insert your favorite here)”

  • Google Web Tookit
  • Pyjamas
  • Cappucino
  • Batman

“Just Write in JavaScript!”

Any of these frameworks add complexity to your app. Don’t just use it to use it. Make sure that you need it.

Testing

make sure it works. refresh the page!

JavaScript

jasmine

jsspec

BahaviorJS

UI Testing

Selenium

Markup and CSS

CSS utilities and pre-compilers

CSS kind of sucks. Pre-compilers bring common programming concepts like functions and variables to the langage.

  • LESS (Jonathon’s pick)
  • SASS
  • Compass

Frameworks and toolkits

Because HTML5 and CSS3 aren’t full supported, there are a number of farmeworks/boilerplates/etc available to bridge the gap.

  • HTML5 Boilerplate
  • Lungo JS
  • 320 and up
  • Twitter bootstrap

JavaScript IDEs

  • Aptana
  • Cloud9
  • WebStorm
  • IxEdit

Slide URL

 

 

Related articles
  • The JavaScript Renaissance (reverberate.org)
  • The rise of JavaScript micro-frameworks (greatfinds.icrossing.com)
  • Tutorial: How to Deploy Your HTML5 App on StackMob (Part 2) (stackmob.com)

Tell someone about this:

  • Email
  • Print
  • Twitter
  • LinkedIn
  • Facebook
  • More
  • Reddit
  • Pocket
  • Tumblr

Like this:

Like Loading...

Related

Filed Under: Web Development Tagged With: AJAX, API Separating Presentation, App design, app kool-aid, Application programming interface, Aptana Cloud9 WebStorm, BahaviorJS UI Testing, battery life access, Boilerplate Lungo JS, Cascading Style Sheets, chat application, common programming concepts, Complex Web Apps, CSS, CSS selectors, desktop software experience, Device Access File, Document Object Model, Ember Enyo SproutCore, IxEdit Slide URL, JavaScript, javascript api, JavaScript APIs Application, javascript applications, JavaScript jasmine jsspec, JavaScript micro-frameworks, JavaScript MVC Knockout, JavaScript Renaissance, Killer App Design, mobile device, mobile devices, module pattern, multi-threaded javascript apps, multiple nested ajax, MVC Frameworks, Offline Storage Store, old school mvc, pre-compilers css kind, push technology, related mvvm patterns, robust application development, SASS Compass Frameworks, simple javascript api, single tcp socet, small local app, SXSW, SXSW2012, Technology Internet, twitter bootstrap javascript, Web 2.0, web app, Web app Kool-Aid, Web application, Web apps, Web Apps Web, web server, web sockets, Web Tookit, Web Tookit Pyjamas, Web workers, WebSocket, WebSockets Bi-directional communication, wep app kool-aid, Workers spawn background

About Jonathan Jeter

Jonathan Jeter has been creating websites since 1997. He is currently Director of Technology Services and Digital Development at TracyLocke, a shopper marketing agency. You can follow him @mywebthoughts, on LinkedIn or connect on Google+.

Trackbacks

  1. SWSX Vids & Notes | mcdermott solutions says:
    March 13, 2012 at 9:45 pm

    […] Killer App Design with Javascript and HTML 5 (notes) […]

    Reply

What do YOU think? Let me know...Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Stuff I Like to Talk About:

  • Business
  • Digital Imaging
  • Internet Marketing
    • Email Marketing
    • SEM / Paid Search
  • Life
  • Other Stuff
    • Health
    • Taekwondo (TKD)
  • Sports
    • Football
  • Technology
    • Augmented Reality
    • Awesome or Scary?
    • Marketing Technology
      • Data / Analytics
      • Omnichannel
    • Mobile
      • Android
    • Virtual Reality
  • User Interface / User Experience Design
  • Web Development
    • Browsers
    • CSS
    • Front-End Development
    • Google+ (Google Plus)
    • HTML5
    • JavaScript
    • jQuery
    • Mobile
    • MVC
    • Responsive Design
    • SEO
    • Social Media
    • UI/UX
    • WordPress

HTML

  • HTML Entities

JavaScript

  • MEAN.js

My Sites

  • Head Turning Media
  • Jonathan Jeter (Brand Yourself)
  • My Humor

Online Experts

  • Bryan Eisenberg
  • Danny Sullivan
  • Duane Forrester
  • Keith Brown
  • Louis Gray
  • Matt Cutts

UI / UX

  • Jared Spool
  • Paul Jeter
FreshBooks
Genesis Framework for WordPress Premise Landing Pages Made Easy

Most Popular

  • Verizon Wireless – My Favorite Mobile Provider
  • Who?
  • Intro to WebGL and Three.js – Front Porch…
  • Exploring Standard Ad Unit Sizes: Google AdSense…
  • Looking for Instagram or Android fonts or logos and…
  • A Brief History of the Complete Redesign of Google…
  • People Data and the Future of Marketing –…
  • Exploring Standard Ad Unit Sizes: Google AdSense…
  • Jared Spool – The Essential Principles behind…
  • Contact Jonathan Jeter

Copyright © 2025 Jonathan Jeter

%d