14. "The secret to building large apps is never build large apps. Break your applications into small pieces. Then, assemble those testable, bite-sized pieces into your big application" -Justin Meyer, author JavaScriptMVC
15. Singe Page App = Client Side Routing Client Side Rendering +
19. Why YUI3.4 app framework doesn't allow to use hash style URL for all browsers? It was very important to make doing the right thing easy and doing the wrong thing hard. Ryan Grove
21. Define Routes varcontroller = new Y.Controller( { routes: [ { path: â/â, callback: onHomePage }, { path: â/user/:guidâ, callback: onUserPage } ] }); onHomePage is invoked when route â/â is triggered
22. Dispatch on DOM Ready controller.dispatch(); Trigger route according to current page URL
23. Save on Navigation Y.delegate('click', onNaviLinkClick, 'body', '.navi-link', this); function onNaviLinkClick() { ⊠varnewPath = currTarget.getAttribute('href'); if (controller.getPath() != newPath) { controller.save(newPagePath); } } Trigger route according to newPagePath
24. Page Load & Page Navigation Routing Module Page B Page C Page A
56. Twitter Approach The first page response is just HTML skeleton Web is a client of its Open API The page is initialized with multiple AJAX response
57. Facebook Approach The first page response is HTML Skeleton with tailing inline JavaScript Init data is flushed in tailing JavaScript block It is called BigPipe The sequence of module rendering depends