A Different View: Building a Scalable Javascript View Architecture

Post on 18-Dec-2014

3,861 views 1 download

description

A recent wave of excitement has generated an immense amount of javascript frameworks or libraries. However, none of these libraries really make a lot of headway in addressing how to do highly-scalable Javascript UI development. This talk proposes some different paradigms for programming interfaces on the client, leveraging time-tested design patterns used in enterprise software for years. For more, see http://diurnal.st

transcript

A Different View

Thursday, March 29, 12

Backbone.ViewGood• Loose $ dependency

• Simple event delegation system

• Trim API (initialize/render)

...But• Setup code inflexible

• Classical inheritance model

• No nesting support

Thursday, March 29, 12

D R Y

Thursday, March 29, 12

Breaking it downModel creation

Views auto-assembled

Views auto-created

Thursday, March 29, 12

Model creation

Thursday, March 29, 12

Views auto-createdView.js

BackBreaker.js

Thursday, March 29, 12

Views auto-assembled

View.js

Thursday, March 29, 12

Demoslashhashbang.com/demos/viewframework

Thursday, March 29, 12

Code SharingFunctionality Mixins• FlexGrid, States, Themable, Skeleton

Base Definitions• StandardCarouselLayout, ShareButton

Future: Dynamic Runtime Behaviors• AMD, Mobile-optimization, other environment-specific

Thursday, March 29, 12

Questions?Answers.

Thursday, March 29, 12