Let me introduce you to the

     YUI App
   Framework
   Alain Horner, 02. 06. 2012
A few words about myself...
●   Alain Horner
●   Alain, web developer at Liip
●   Alain, student at ZHAW
●   Alain, who?

●    Github: https://github.com/elHornair
●    Twitter: https://twitter.com/#!/elHornair
Intro
YUI3
●   Fast
●   Modular Architecture / Dependency Management
●   Component Infrastructure
●   Event System
●   DOM Interaction, Ajax, Many Widgets
●   Great Documentation
The YUI App Framework...
... is based on YUI3
... is Open Source
... is developed by Yahoo! and the YUI community
... is inspired by Backbone.js
The YUI App Framework...
... is based on YUI3
... is Open Source
... is developed by Yahoo! and the YUI community
... is inspired by Backbone.js
... is a framework
Framework
vs. Library
What is a framework?
●   „A basic conceptional structure“
●   „Used to implement the standard structure of an
    application for a specific environment“
●   „A structural plan or basis of a project“
What is a library?
●   „A collection of routines that a program can use“
●   „Available for common use within a certain
    environment“
Definition by Alain who?
●   A library does stuff for you
    ●   Stuff: Select a DOM node
●   A framework tells you how to do stuff
    ●   Stuff: Build a web application
The YUI App Framework...
... is open sourced
... is developed by Yahoo! and the YUI community
... is based on YUI3
... is inspired by Backbone.js
... is a framework
... gives you a basic structure for frontend heavy web
    applications
MVC
MVC
●   Separation of Concerns
●   YUI App Framework is „MVC'ish“
Demo Project
Model
Model
●   Data
●   Attributes / Observation
●   Business logic
●   Data syncing
    ●   load() / save()
    ●   Custom sync layer
Creating a Model Instance
Model List
●   Collection of Model Instances
●   n:n
●   Assistant
●   Event Bubbling
●   Data Syncing
Creating a Model List
      Instance
View
What is a View?
View
●   Visible piece of application
●   Renderable
    ●   Do it yourself
    ●   Just provides container
●   Templating
●   Events
●   Models / Model Lists
Controller
Controller
 Router
Router
●   Not only controlling
●   URL & Callback => View
●   Manages history
    ●   HTML5 pushState / popState
    ●   Graceful degradation
Y.App
Y.App
●   Puts it all together
●   Routes
●   Views as pages
    ●   Relationships
●   Transitions
●   Pjax!
    ●   pushState & Ajax
Ups & Downs
Up
●   Solid foundation
●   Quick start
●   Extendable
●   Standard stuff is done for you
●   GREAT documentation
Down
●   Learning Curve (YUI3)
●   Defines Structure
Outro
Summary
●   Basic structure for frontend heavy web applications
●   MVC'ish
●   Configurable but reasonable defaults
●   Few lines of code
Where to go from here...
●   http://github.com/elHornair/CheeseApp
●   http://yuilibrary.com/yui/docs/app
●   https://github.com/ericf/photosnear.me
So Long, and Thanks for All
        the Cheese

YUI App Framework

  • 1.
    Let me introduceyou to the YUI App Framework Alain Horner, 02. 06. 2012
  • 2.
    A few wordsabout myself... ● Alain Horner ● Alain, web developer at Liip ● Alain, student at ZHAW ● Alain, who? ● Github: https://github.com/elHornair ● Twitter: https://twitter.com/#!/elHornair
  • 3.
  • 4.
    YUI3 ● Fast ● Modular Architecture / Dependency Management ● Component Infrastructure ● Event System ● DOM Interaction, Ajax, Many Widgets ● Great Documentation
  • 5.
    The YUI AppFramework... ... is based on YUI3 ... is Open Source ... is developed by Yahoo! and the YUI community ... is inspired by Backbone.js
  • 6.
    The YUI AppFramework... ... is based on YUI3 ... is Open Source ... is developed by Yahoo! and the YUI community ... is inspired by Backbone.js ... is a framework
  • 8.
  • 9.
    What is aframework? ● „A basic conceptional structure“ ● „Used to implement the standard structure of an application for a specific environment“ ● „A structural plan or basis of a project“
  • 10.
    What is alibrary? ● „A collection of routines that a program can use“ ● „Available for common use within a certain environment“
  • 11.
    Definition by Alainwho? ● A library does stuff for you ● Stuff: Select a DOM node ● A framework tells you how to do stuff ● Stuff: Build a web application
  • 12.
    The YUI AppFramework... ... is open sourced ... is developed by Yahoo! and the YUI community ... is based on YUI3 ... is inspired by Backbone.js ... is a framework ... gives you a basic structure for frontend heavy web applications
  • 13.
  • 14.
    MVC ● Separation of Concerns ● YUI App Framework is „MVC'ish“
  • 15.
  • 17.
  • 18.
    Model ● Data ● Attributes / Observation ● Business logic ● Data syncing ● load() / save() ● Custom sync layer
  • 24.
  • 27.
    Model List ● Collection of Model Instances ● n:n ● Assistant ● Event Bubbling ● Data Syncing
  • 40.
    Creating a ModelList Instance
  • 44.
  • 45.
    What is aView?
  • 51.
    View ● Visible piece of application ● Renderable ● Do it yourself ● Just provides container ● Templating ● Events ● Models / Model Lists
  • 60.
  • 61.
  • 62.
    Router ● Not only controlling ● URL & Callback => View ● Manages history ● HTML5 pushState / popState ● Graceful degradation
  • 68.
  • 69.
    Y.App ● Puts it all together ● Routes ● Views as pages ● Relationships ● Transitions ● Pjax! ● pushState & Ajax
  • 83.
  • 84.
    Up ● Solid foundation ● Quick start ● Extendable ● Standard stuff is done for you ● GREAT documentation
  • 85.
    Down ● Learning Curve (YUI3) ● Defines Structure
  • 86.
  • 87.
    Summary ● Basic structure for frontend heavy web applications ● MVC'ish ● Configurable but reasonable defaults ● Few lines of code
  • 88.
    Where to gofrom here... ● http://github.com/elHornair/CheeseApp ● http://yuilibrary.com/yui/docs/app ● https://github.com/ericf/photosnear.me
  • 90.
    So Long, andThanks for All the Cheese