CSS, and JS is loaded onto one page (either all at once or dynamically). New content is most commonly loaded via AJAX without a page refresh. Could also be websockets, flash, silverlight, etc Examples: GitHub, GMail, Rdio, Azure portal
•Doesn’t break the browser. •Fast & Responsive: should feel like a native application •Accessible: Makes good use of WAI-ARIA - Avoid proprietary tech. - SPAs should not stray too far from the way traditional sites are rendered, unless there is good reason to. Features of the browser, such as scrolling, the back button, using “Enter” to submit forms, etc., should behave as expected. Be intentional about breaking these paradigms, and test the hell out of them. •There’s no point in building a SPA if it’s not faster than a server-side app. •You CAN make JS apps accessible, and it’s probably easier than you think. http://www.w3.org/WAI/ intro/aria
blogs because of search indexing • Generally, SPAs are not public and have marketing pages that can be indexed by search engines •If high interactivity is not needed
cared what other people thought about his JavaScript habits? NO! Image source: Wikimedia Commons, c. 1882. http://en.wikipedia.org/wiki/File:A_Wilde_time_3.jpg
(optional) Built-in (optional) Built-in (optional) Backbone BYO Built-in (optional) Built-in (overridable) Ember Built-in string-based templates (optional) Built-in (mandatory) Built-in (overridable) Knockout Built-in DOM-based templates (optional) BYO BYO Thanks to Steve Sanderson’s awesome blog post about this: http://blog.stevensanderson.com/2012/08/01/rich-javascript-applications-the-seven-frameworks-throne- of-js-2012/ Explain about frameworks vs libraries (KO & Backbone are more like libraries; Angular and Ember are frameworks) I prefer AngularJS because it gets out of your way.
not building an application, or you’re just missing out.” —Steve Sanderson, Knockout Core Member http://blog.stevensanderson.com/2012/08/01/rich-javascript-applications-the-seven-frameworks-throne- of-js-2012/
.” —Progressive Enhancement* (*actually, Mark Twain) Progressive enhancement is still extremely relevant, especially with public-facing apps. Especially for mobile users, users in 3rd world countries, slow Internet connections, etc. Not all apps are worth doing in JS Stay open-minded!
a view Declarative DOM templates Testing - Discuss different sources for data - Show off MVC, routing, template syntax - Where the data is fetched in the controller, show how it would look with DOM manipulation, and explain why it’s fragile. If you want to do something with jQuery, there’s probably a better way.
bar while data is loading. Allow a user to filter the table. Add sorting to the table. Promises (success & then) Success and then Discuss data binding Show the updated test
from Firebase Allow a user to add their own songs Demonstrate adding a song and it showing up instantaneously Show timestamp field New controller BlendSongs DB service (reduce repetition) Angular Form validation
into a build system Deploy it to GitHub Show how controllers are broken into multiple files Explain benefits of using a build system, show off brunch (config, file layout, etc) Discuss modularization strategies