SlideShare une entreprise Scribd logo
1  sur  168
BACKBONE JS
       { Journey to the Front End }




Brian Mann
@backbonerails
BackboneRails.com
MY
    EXPERIENCE
WITH BACKBONE
A Little Perspective

 • Web Application Developer
     ‣ Backbone / Ruby on Rails

 • Scaling Our Project
     ‣ Totals about 600 JS files
     ‣ Close to 80 different JS modules
     ‣ 120+ server models
     ‣ Entirely Single Page

 • Published Screencasts
     ‣ Chronicles development patterns


Backbone JS: Journey to the Front End    BACKBONERAILS.com
BACKBONE IN A NUTSHELL
Key Points

 • Introduces the building blocks of MVC frameworks
 • Manages the complexity of front end logic
 • Provides the structural components for organizing
     ‣ Presentation
     ‣ Behavior
     ‣ Implementation

 • Keeps view changes in sync
 • Eliminates unmanageable spaghetti code

Backbone JS: Journey to the Front End          BACKBONERAILS.com
Tenets of Backbone

 • Powered by RESTful JSON API
 • Low Profile
     ‣ Unopinionated
     ‣ Leaves implementation up to the developer

 • Small Set of Documentation
 • Huge Success Record
     ‣ Major players using it in production

 • Awesome Community Support


Backbone JS: Journey to the Front End              BACKBONERAILS.com
SHOW DON’T TELL
Pandora   Google Analytics




WuFoo          Rdio
Google Analytics




1. Loading feedback while fetching data from server
Google Analytics




1. Loading feedback while fetching data from server
Google Analytics




2. Dialog Selection Events
Google Analytics




2. Dialog Selection Events
WuFoo




1. Picked up and dragged “Single Line Text”
WuFoo




1. Picked up and dragged “Single Line Text”
WuFoo




2. Passively saved to server, displayed single line text
WuFoo




2. Passively saved to server, displayed single line text
WuFoo




3. Two Way Data Binding
WuFoo




3. Two Way Data Binding
WuFoo




4. Immediate Selection Feedback
WuFoo




4. Immediate Selection Feedback
Rdio




1. Changing sort order - hovered over “Song” drop down
Rdio




1. Changing sort order - hovered over “Song” drop down
Rdio




2. Clicking “Artist” to sort songs by Artist
Rdio




2. Clicking “Artist” to sort songs by Artist
Rdio




3. Shows loading spinner while fetching new data
Rdio




3. Shows loading spinner while fetching new data
Rdio




4. New collection is shown, URL is updated
Rdio




4. New collection is shown, URL is updated
EVOLUTION OF THE WEB
http://www.serversrule.com/




   before 2005




Stateless Servers
http://www.serversrule.com/



      <html>
           <head>
               <title>Best Page in the Universe</title>
           </head>
           <body>
               <div id="header">
                   <ul>
                        <li>
                             <a href="link1">Link 1</a>
                        </li>
                        <li>
                             <a href="link2">Link 2</a>
                        </li>
                        <li>
                             <a href="link3">Link 3</a>
                        </li>
                   </ul>
   before 2005 </div>
               <div id="main">Home Page Content</div>
           </body>
      </html>



Stateless Servers
http://www.serversrule.com/




   My Awesome Site                   Link 1 | Link 2 | Link 3




                            Home Page




   before 2005




Stateless Servers
http://www.serversrule.com/




   My Awesome Site                   Link 1 | Link 2 | Link 3




                            Home Page




   before 2005




Stateless Servers
http://www.serversrule.com/link1




   My Awesome Site                        Link 1 | Link 2 | Link 3




                            Home Page




   before 2005




Stateless Servers
http://www.serversrule.com/link1




   before 2005




Stateless Servers
http://www.serversrule.com/link1



      <html>
           <head>
               <title>Best Page in the Universe</title>
           </head>
           <body>
               <div id="header">
                   <ul>
                        <li class="active">
                             <a href="link1">Link 1</a>
                        </li>
                        <li>
                             <a href="link2">Link 2</a>
                        </li>
                        <li>
                             <a href="link3">Link 3</a>
                        </li>
                   </ul>
   before 2005 </div>
               <div id="main">Link 1 - Content</div>
           </body>
      </html>



Stateless Servers
http://www.serversrule.com/link1



      <html>
           <head>
               <title>Best Page in the Universe</title>
           </head>
           <body>
               <div id="header">
                   <ul>
                        <li class="active">
                             <a href="link1">Link 1</a>
                        </li>
                        <li>
                             <a href="link2">Link 2</a>
                        </li>
                        <li>
                             <a href="link3">Link 3</a>
                        </li>
                   </ul>
   before 2005 </div>
               <div id="main">Link 1 - Content</div>
           </body>
      </html>



Stateless Servers
http://www.serversrule.com/link1




   My Awesome Site                        Link 1 | Link 2 | Link 3




                        Link 1 - Content




   before 2005




Stateless Servers
http://www.serversrule.com/link1




   My Awesome Site                        Link 1 | Link 2 | Link 3




                        Link 1 - Content




   before 2005




Stateless Servers
http://www.serversrule.com/link1




   My Awesome Site                        Link 1 | Link 2 | Link 3




                        Link 1 - Content




   before 2005                  2006 - 2009




Stateless Servers            Heavy AJAX Use
http://www.serversrule.com/link1




   My Awesome Site                        Link 1 | Link 2 | Link 3




                        Link 1 - Content




   before 2005                  2006 - 2009




Stateless Servers            Heavy AJAX Use
http://www.serversrule.com/link1



      <html>
   My Awesome Site
           <head>                     Link 1 | Link 2 | Link 3
               <title>Best Page in the Universe</title>
           </head>
           <body>
               <div id="header">
                   <ul>
                        <li class="active">

                         Link 1 - Content
                        </li>
                             <a href="link1">Link 1</a>

                        <li>
                             <a href="link2">Link 2</a>
                        </li>
                        <li>
                             <a href="link3">Link 3</a>
                        </li>
                   </ul>
   before 2005 </div>      2006 - 2009
               <div id="main">Link 1 - Content</div>
           </body>
      </html>



Stateless Servers             Heavy AJAX Use
http://www.serversrule.com/link1



      <html>
   My Awesome Site
           <head>                     Link 1 | Link 2 | Link 3
               <title>Best Page in the Universe</title>
           </head>
           <body>
               <div id="header">
                   <ul>
                        <li class="active">

                         Link 1 - Content
                        </li>
                             <a href="link1">Link 1</a>

                        <li>
                             <a href="link2">Link 2</a>
                        </li>
                        <li>
                             <a href="link3">Link 3</a>
                        </li>
                   </ul>
   before 2005 </div>      2006 - 2009
               <div id="main">Link 1 - Content</div>
           </body>
      </html>



Stateless Servers             Heavy AJAX Use
http://www.serversrule.com/link1



      <html>
   My Awesome Site
           <head>                     Link 1 | Link 2 | Link 3
               <title>Best Page in the Universe</title>
           </head>
           <body>
               <div id="header">
                   <ul>
                        <li class="active">

                         Link 1 - Content
                        </li>
                             <a href="link1">Link 1</a>

                        <li>
                             <a href="link2">Link 2</a>
                        </li>
                        <li>
                             <a href="link3">Link 3</a>
                        </li>
                   </ul>
   before 2005 </div>      2006 - 2009
               <div id="main">                  </div>
           </body>
      </html>



Stateless Servers             Heavy AJAX Use
http://www.serversrule.com/link1



      <html>
   My Awesome Site
           <head>                     Link 1 | Link 2 | Link 3
               <title>Best Page in the Universe</title>
           </head>
           <body>
               <div id="header">
                   <ul>
                        <li class="active">

                         Link 1 - Content
                        </li>
                             <a href="link1">Link 1</a>

                        <li>
                             <a href="link2">Link 2</a>
                        </li>
                        <li>
                             <a href="link3">Link 3</a>
                        </li>
                   </ul>
   before 2005 </div>      2006 - 2009
               <div id="main">Link 2 - Content</div>
           </body>
      </html>



Stateless Servers             Heavy AJAX Use
http://www.serversrule.com/link1



      <html>
   My Awesome Site
           <head>                     Link 1 | Link 2 | Link 3
               <title>Best Page in the Universe</title>
           </head>
           <body>
               <div id="header">
                   <ul>
                        <li class="active">

                         Link 1 - Content
                        </li>
                             <a href="link1">Link 1</a>

                        <li>
                             <a href="link2">Link 2</a>
                        </li>
                        <li>
                             <a href="link3">Link 3</a>
                        </li>
                   </ul>
   before 2005 </div>      2006 - 2009
               <div id="main">Link 2 - Content</div>
           </body>
      </html>



Stateless Servers             Heavy AJAX Use
http://www.serversrule.com/link1



      <html>
   My Awesome Site
          <head>                   Link 1 | Link 2 | Link 3
              <title>Best Page in the Universe</title>
          </head>
          <body>
              <div id="header">
                  <ul>


                        Link <a - Content 1</a>
                              1 href="link1">Link
                          </li>
                       <li>
                            <a href="link2">Link 2</a>
                       </li>
                       <li>
                            <a href="link3">Link 3</a>
                       </li>
                   </ul>
   before 2005 </div>     2006 - 2009
               <div id="main">Link 2 - Content</div>
           </body>
      </html>



Stateless Servers            Heavy AJAX Use
http://www.serversrule.com/link1



      <html>
   My Awesome Site
           <head>                     Link 1 | Link 2 | Link 3
               <title>Best Page in the Universe</title>
           </head>
           <body>
               <div id="header">
                   <ul>
                        <li>

                         Link 1 - Content
                        </li>
                             <a href="link1">Link 1</a>

                        <li>
                             <a href="link2">Link 2</a>
                        </li>
                        <li>
                             <a href="link3">Link 3</a>
                        </li>
                   </ul>
   before 2005 </div>      2006 - 2009
               <div id="main">Link 2 - Content</div>
           </body>
      </html>



Stateless Servers             Heavy AJAX Use
http://www.serversrule.com/link1



      <html>
   My Awesome Site
           <head>                     Link 1 | Link 2 | Link 3
               <title>Best Page in the Universe</title>
           </head>
           <body>
               <div id="header">
                   <ul>
                        <li>

                         Link 1 - Content
                        </li>
                             <a href="link1">Link 1</a>

                        <li>
                             <a href="link2">Link 2</a>
                        </li>
                        <li>
                             <a href="link3">Link 3</a>
                        </li>
                   </ul>
   before 2005 </div>      2006 - 2009
               <div id="main">Link 2 - Content</div>
           </body>
      </html>



Stateless Servers             Heavy AJAX Use
http://www.serversrule.com/link1



      <html>
   My Awesome Site
          <head>                    Link 1 | Link 2 | Link 3
              <title>Best Page in the Universe</title>
          </head>
          <body>
              <div id="header">
                  <ul>
                       <li>

                        Link 1 - Content
                           <a href="link1">Link 1</a>
                       </li>

                            <a href="link2">Link 2</a>
                       </li>
                       <li>
                            <a href="link3">Link 3</a>
                       </li>
                   </ul>
   before 2005 </div>     2006 - 2009
               <div id="main">Link 2 - Content</div>
           </body>
      </html>



Stateless Servers            Heavy AJAX Use
http://www.serversrule.com/link1



      <html>
   My Awesome Site
           <head>                     Link 1 | Link 2 | Link 3
               <title>Best Page in the Universe</title>
           </head>
           <body>
               <div id="header">
                   <ul>
                        <li>

                         Link 1 - Content
                        </li>
                             <a href="link1">Link 1</a>

                        <li class="active">
                             <a href="link2">Link 2</a>
                        </li>
                        <li>
                             <a href="link3">Link 3</a>
                        </li>
                   </ul>
   before 2005 </div>      2006 - 2009
               <div id="main">Link 2 - Content</div>
           </body>
      </html>



Stateless Servers             Heavy AJAX Use
http://www.serversrule.com/link1




   My Awesome Site                        Link 1 | Link 2 | Link 3




                        Link 1 - Content




   before 2005                  2006 - 2009




Stateless Servers            Heavy AJAX Use
http://www.serversrule.com/link1




   My Awesome Site                        Link 1 | Link 2 | Link 3




                        Link 2 - Content




   before 2005                  2006 - 2009




Stateless Servers            Heavy AJAX Use
http://www.serversrule.com/link1




   My Awesome Site                        Link 1 | Link 2 | Link 3




                        Link 2 - Content




   before 2005                  2006 - 2009




Stateless Servers            Heavy AJAX Use
http://www.serversrule.com/link1




   My Awesome Site                        Link 1 | Link 2 | Link 3




                        Link 2 - Content




   before 2005                  2006 - 2009            2010 - now




Stateless Servers            Heavy AJAX Use           Modern MVC
http://www.serversrule.com/link1




            My Awesome Site                        Link 1 | Link 2 | Link 3
<Links Collection>
Models:
[
  {name: “Link1”, active: false},
  {name: “Link2”, active: true},

]                        Link 2 - Content
  {name: “Link3”, active: false}




            before 2005                  2006 - 2009            2010 - now




         Stateless Servers            Heavy AJAX Use           Modern MVC
http://www.serversrule.com/link1




            My Awesome Site                        Link 1 | Link 2 | Link 3
<Links Collection>
Models:
[
  {name: “Link1”, active: false},
  {name: “Link2”, active: true},     Object { ... type=”click” .. }

]                        Link 2 - Content
  {name: “Link3”, active: false}




            before 2005                  2006 - 2009            2010 - now




         Stateless Servers            Heavy AJAX Use           Modern MVC
http://www.serversrule.com/link1




              My Awesome Site                        Link 1 | Link 2 | Link 3
<Links Collection>
Models:           1. Capture event, prevent default action
[
  {name: “Link1”, 2. Call method on model to set {active: true}
                   active: false},
  {name: “Link2”, active: true},             Object { ... type=”click” .. }
  {name: “Link3”, 3. Fires event which causes previously
]                            Link 2 - Content
                   active: false}
                     selected <li> to deselect itself - and
                        current <li> to select itself
                        <li class=”active”>...</li>

                    4. Let our managing controller know this
                       click event has occurred
              before 2005                  2006 - 2009            2010 - now
                    5. Controller decides what the next action
                       should be


           Stateless Servers            Heavy AJAX Use           Modern MVC
Backbone Components

 • Entities
     ‣ Models
     ‣ Collections




Backbone JS: Journey to the Front End   BACKBONERAILS.com
Backbone Components

 • Entities
         Model
     ‣ Models
     ‣ Collections
           User

 firstName: Brian
 lastName: Mann

 fullName()
 save()




Backbone JS: Journey to the Front End   BACKBONERAILS.com
Backbone Components

 • Entities
         Model
     ‣ Models
     ‣ Collections
           User

 firstName: Brian
 lastName: Mann

 fullName()
 save()




Backbone JS: Journey to the Front End   BACKBONERAILS.com
Backbone Components

 • Entities
         Model
     ‣ Models
     ‣ Collections
           User

 firstName: Brian
 lastName: Mann

 fullName()
 save()




Backbone JS: Journey to the Front End   BACKBONERAILS.com
Backbone Components

 • Entities                                                Events
         Model
     ‣ Models
                                            Name       When This Event Triggers
     ‣ Collections
           User                             change     when any model attributes have changed


 firstName: Brian                 change:[attribute]   when a specific attribute has changed
 lastName: Mann
                                            destroy    when a model is destroyed

 fullName()                                    sync
                                                       when a model has successfully synced with
 save()                                                the server

                                               error   when a model’s save call fails on the server

                                                       when a models validations fails on the
                                             invalid
                                                       client




Backbone JS: Journey to the Front End                             BACKBONERAILS.com
Backbone Components

 • Entities
   Collection
    ‣ Models
     ‣ Collections
          User                          User         User




          User                          User         User




Backbone JS: Journey to the Front End          BACKBONERAILS.com
Backbone Components

 • Entities
   Collection
    ‣ Models                                        Events
     ‣ Collections
                                        Name      When This Event Triggers
          User                          User                                 User
                                           add    when a model is added to the collection


                                        remove    when a model is removed from a collection

                                                  when the collection’s entire contents have
                                          reset
                                                  been replaced

          User                          User
                                         sort                                User
                                                  when the collection has been re-sorted

                                                  when a collection has started to request to
                                        request
                                                  the server
                                                  when a collection has been successfully
                                          sync
                                                  synced with the server



Backbone JS: Journey to the Front End                             BACKBONERAILS.com
Backbone Components

 • Entities
     ‣ Models
     ‣ Collections

 • Views
     ‣ usually paired with a model or collection
     ‣ given a template (a chunk of HTML)
     ‣ responsible for rendering + responding to model/collection events




Backbone JS: Journey to the Front End                BACKBONERAILS.com
Backbone Components

 • Entities
     ‣ Models
     ‣ Collections

 • Views
     ‣ usually paired with a model or collection
     ‣ given a template (a chunk of HTML)
     ‣ responsible for rendering + responding to model/collection events

 • Routers
     ‣ listen for and react to client side URLs




Backbone JS: Journey to the Front End                BACKBONERAILS.com
Backbone Components

 • Entities     http://www.app.com/#users

     ‣ Models
     ‣ Collections

 • Views
     ‣ usually paired with a model or collection
                                    Z
     ‣ given a template (a chunk of HTML)
     ‣ responsible for rendering + responding to model/collection events

 • Routers
     ‣ listen for and react to client side URLs




Backbone JS: Journey to the Front End                BACKBONERAILS.com
Backbone Components

 • Entities
     ‣ Models
     ‣ Collections

 • Views
     ‣ usually paired with a model or collection
     ‣ given a template (a chunk of HTML)
     ‣ responsible for rendering + responding to model/collection events

 • Routers
     ‣ listen for and react to client side URLs

 • Events

Backbone JS: Journey to the Front End                BACKBONERAILS.com
RELATIONSHIP BETWEEN
     VIEWS AND MODELS
http://www.app.com/#users/1/edit



Hi, Stanley Kubrick                                  Edit Profile

             Name       Stanley Kubrick

               Age      70

            Gender      male        female

             Email      stanley.kubrick@mgm.com

            Friends   1. Malcolm McDowell     x
                      2. Arthur C. Clarke x
                      3. Peter Sellers x

                        add new friend...               +




                                cancel        Save
http://www.app.com/#users/1/edit



Hi, Stanley Kubrick                                  Edit Profile

             Name       Stanley Kubrick

               Age      70   View
            Gender      male        female

             Email      stanley.kubrick@mgm.com

            Friends   1. Malcolm McDowell     x
                      2. Arthur C. Clarke x
                      3. Peter Sellers x

                        add new friend...               +




                                cancel        Save
http://www.app.com/#users/1/edit



Hi, Stanley Kubrick                                  Edit Profile

             Name       Stanley Kubrick

               Age      70   View
            Gender      male        female

             Email      stanley.kubrick@mgm.com

            Friends   1. Malcolm McDowell     x
                      2. Arthur C. Clarke x
                      3. Peter Sellers x
Model                   add new friend...            Template
                                                        +




                                cancel        Save
{
    "id": 1,
    "picture": "images/user_1.png",
    "age": 70,
    "name": "Stanley Kubrick",
    "gender": "male",
    "company": "MGM",
    "phone": "832-547-3983",
    "email": "stanley.kubrick@mgm.com",
    "address": "Hertfordshire England",
    "friends": [
       {
          "id": 1,
          "name": "Malcolm McDowell"
       },
       {
          "id": 2,
          "name": "Arthur C. Clarke"
       },
       {
          "id": 3,
          "name": "Peter Sellers"
       }
    ]
}
{
                                               "id": 1,
                                               "picture": "images/user_1.png",
<div id=”user”>Hi, Stanley Kubrick</div>       "age": 70,
                                               "name": "Stanley Kubrick",
                                               "gender": "male",
                                               "company": "MGM",
                                               "phone": "832-547-3983",
                                               "email": "stanley.kubrick@mgm.com",
                                               "address": "Hertfordshire England",
                                               "friends": [
                                                  {
                                                     "id": 1,
                                                     "name": "Malcolm McDowell"
                                                  },
                                                  {
                                                     "id": 2,
                                                     "name": "Arthur C. Clarke"
                                                  },
                                                  {
                                                     "id": 3,
                                                     "name": "Peter Sellers"
                                                  }
                                               ]
                                           }
{
                                                 "id": 1,
                                                 "picture": "images/user_1.png",
<div id=”user”>Hi, Stanley Kubrick</div>         "age": 70,
                                                 "name": "Stanley Kubrick",
                                                 "gender": "male",
                                                 "company": "MGM",
                                                 "phone": "832-547-3983",
                                                 "email": "stanley.kubrick@mgm.com",
 <a href=”mailto:stanley.kubrick@mgm.com”>
                                                 "address": "Hertfordshire England",
   Email Stanley
                                                 "friends": [
 </a>                                               {
                                                       "id": 1,
                                                       "name": "Malcolm McDowell"
                                                    },
                                                    {
                                                       "id": 2,
                                                       "name": "Arthur C. Clarke"
                                                    },
                                                    {
                                                       "id": 3,
                                                       "name": "Peter Sellers"
                                                    }
                                                 ]
                                             }
{
                                                     "id": 1,
                                                     "picture": "images/user_1.png",
<div id=”user”>Hi, Stanley Kubrick</div>             "age": 70,
                                                     "name": "Stanley Kubrick",
                                                     "gender": "male",
                                                     "company": "MGM",
                                                     "phone": "832-547-3983",
                                                     "email": "stanley.kubrick@mgm.com",
 <a href=”mailto:stanley.kubrick@mgm.com”>
                                                     "address": "Hertfordshire England",
   Email Stanley
                                                     "friends": [
 </a>                                                   {
                                                           "id": 1,
                                                           "name": "Malcolm McDowell"
                                                        },
 <div id=”friends”>                                     {
   <span id=”count”>You have 3 friends:</span>             "id": 2,
   <ul>                                                    "name": "Arthur C. Clarke"
     <li>Malcolm McDowell</li>                          },
     <li>Arthur C. Clarke</li>                          {
     <li>Peter Sellers</li>                                "id": 3,
   </ul>                                                   "name": "Peter Sellers"
 </div>                                                 }
                                                     ]
                                                 }
{
                                                     "id": 1,
                                                     "picture": "images/user_1.png",
<div id=”user”>Hi, Stanley Kubrick</div>             "age": 70,
                                                     "name": "Stanley Kubrick",
                                                     "gender": "male",
                                                     "company": "MGM",
                                                     "phone": "832-547-3983",
                                                     "email": "stanley.kubrick@mgm.com",
 <a href=”mailto:stanley.kubrick@mgm.com”>
                                                     "address": "Hertfordshire England",
   Email Stanley
                                                     "friends": [
 </a>                                                   {
                                                           "id": 1,
                                                           "name": "Malcolm McDowell"
                                                        },
 <div id=”friends”>                                     {
   <span id=”count”>You have 3 friends:</span>             "id": 2,
   <ul>                                                    "name": "Arthur C. Clarke"
     <li>Malcolm McDowell</li>                          },
     <li>Arthur C. Clarke</li>                          {
     <li>Peter Sellers</li>                                "id": 3,
   </ul>                                                   "name": "Peter Sellers"
 </div>                                                 }
                                                     ]
                                                 }
{
                                                     "id": 1,
                                                     "picture": "images/user_1.png",
<div id=”user”>Hi, Stanley Kubrick</div>             "age": 70,
                                                     "name":
                                                     "gender": "male",
                                                     "company": "MGM",
                                                     "phone": "832-547-3983",
                                                     "email": "stanley.kubrick@mgm.com",
 <a href=”mailto:stanley.kubrick@mgm.com”>
                                                     "address": "Hertfordshire England",
   Email Stanley
                                                     "friends": [
 </a>                                                   {
                                                           "id": 1,
                                                           "name": "Malcolm McDowell"
                                                        },
 <div id=”friends”>                                     {
   <span id=”count”>You have 3 friends:</span>             "id": 2,
   <ul>                                                    "name": "Arthur C. Clarke"
     <li>Malcolm McDowell</li>                          },
     <li>Arthur C. Clarke</li>                          {
     <li>Peter Sellers</li>                                "id": 3,
   </ul>                                                   "name": "Peter Sellers"
 </div>                                                 }
                                                     ]
                                                 }
{
                                                     "id": 1,
                                                     "picture": "images/user_1.png",
<div id=”user”>Hi, Stanley Kubrick</div>             "age": 70,
                                                     "name": "Paul Thomas Anderson",
                                                     "gender": "male",
                                                     "company": "MGM",
                                                     "phone": "832-547-3983",
                                                     "email": "stanley.kubrick@mgm.com",
 <a href=”mailto:stanley.kubrick@mgm.com”>
                                                     "address": "Hertfordshire England",
   Email Stanley
                                                     "friends": [
 </a>                                                   {
                                                           "id": 1,
                                                           "name": "Malcolm McDowell"
                                                        },
 <div id=”friends”>                                     {
   <span id=”count”>You have 3 friends:</span>             "id": 2,
   <ul>                                                    "name": "Arthur C. Clarke"
     <li>Malcolm McDowell</li>                          },
     <li>Arthur C. Clarke</li>                          {
     <li>Peter Sellers</li>                                "id": 3,
   </ul>                                                   "name": "Peter Sellers"
 </div>                                                 }
                                                     ]
                                                 }
{
                                                     "id": 1,
                                                     "picture": "images/user_1.png",
<div id=”user”>Hi, Stanley Kubrick</div>             "age": 70,
                                                     "name": "Paul Thomas Anderson",
                                                     "gender": "male",
                                                     "company": "MGM",
                                                     "phone": "832-547-3983",
                                                     "email": "stanley.kubrick@mgm.com",
 <a href=”mailto:stanley.kubrick@mgm.com”>
                                                     "address": "Hertfordshire England",
   Email Stanley
                                                     "friends": [
 </a>                                                   {
                                                           "id": 1,
                                                           "name": "Malcolm McDowell"
                                                        },
 <div id=”friends”>                                     {
   <span id=”count”>You have 3 friends:</span>             "id": 2,
   <ul>                                                    "name": "Arthur C. Clarke"
     <li>Malcolm McDowell</li>                          },
     <li>Arthur C. Clarke</li>                          {
     <li>Peter Sellers</li>                                "id": 3,
   </ul>                                                   "name": "Peter Sellers"
 </div>                                                 }
                                                     ]
                                                 }
{
                                                    "id": 1,
                                                    "picture": "images/user_1.png",
                                                    "age": 70,
                                                    "name": "Paul Thomas Anderson",
                                                    "gender": "male",
                                                    "company": "MGM",
                                                    "phone": "832-547-3983",
                                                    "email": "stanley.kubrick@mgm.com",
<a href=”mailto:stanley.kubrick@mgm.com”>
                                                    "address": "Hertfordshire England",
  Email Stanley
                                                    "friends": [
</a>                                                   {
                                                          "id": 1,
                                                          "name": "Malcolm McDowell"
                                                       },
<div id=”friends”>                                     {
  <span id=”count”>You have 3 friends:</span>             "id": 2,
  <ul>                                                    "name": "Arthur C. Clarke"
    <li>Malcolm McDowell</li>                          },
    <li>Arthur C. Clarke</li>                          {
    <li>Peter Sellers</li>                                "id": 3,
  </ul>                                                   "name": "Peter Sellers"
</div>                                                 }
                                                    ]
                                                }
{
                                                     "id": 1,
                                                     "picture": "images/user_1.png",
<div id=”user”>Hi, Paul Thomas Anderson</div>        "age": 70,
                                                     "name": "Paul Thomas Anderson",
                                                     "gender": "male",
                                                     "company": "MGM",
                                                     "phone": "832-547-3983",
                                                     "email": "stanley.kubrick@mgm.com",
 <a href=”mailto:stanley.kubrick@mgm.com”>
                                                     "address": "Hertfordshire England",
   Email Stanley
                                                     "friends": [
 </a>                                                   {
                                                           "id": 1,
                                                           "name": "Malcolm McDowell"
                                                        },
 <div id=”friends”>                                     {
   <span id=”count”>You have 3 friends:</span>             "id": 2,
   <ul>                                                    "name": "Arthur C. Clarke"
     <li>Malcolm McDowell</li>                          },
     <li>Arthur C. Clarke</li>                          {
     <li>Peter Sellers</li>                                "id": 3,
   </ul>                                                   "name": "Peter Sellers"
 </div>                                                 }
                                                     ]
                                                 }
{
                                                     "id": 1,
                                                     "picture": "images/user_1.png",
<div id=”user”>Hi, Paul Thomas Anderson</div>        "age": 70,
                                                     "name": "Stanley Kubrick",
                                                     "gender": "male",
                                                     "company": "MGM",
                                                     "phone": "832-547-3983",
                                                     "email": "stanley.kubrick@mgm.com",
 <a href=”mailto:stanley.kubrick@mgm.com”>
                                                     "address": "Hertfordshire England",
   Email Stanley
                                                     "friends": [
 </a>                                                   {
                                                           "id": 1,
                                                           "name": "Malcolm McDowell"
                                                        },
 <div id=”friends”>                                     {
   <span id=”count”>You have 3 friends:</span>             "id": 2,
   <ul>                                                    "name": "Arthur C. Clarke"
     <li>Malcolm McDowell</li>                          },
     <li>Arthur C. Clarke</li>                          {
     <li>Peter Sellers</li>                                "id": 3,
   </ul>                                                   "name": "Peter Sellers"
 </div>                                                 }
                                                     ]
                                                 }
{
                                                     "id": 1,
                                                     "picture": "images/user_1.png",
<div id=”user”>Hi, Paul Thomas Anderson</div>        "age": 70,
                                                     "name": "Stanley Kubrick",
                                                     "gender": "male",
                                                     "company": "MGM",
                                                     "phone": "832-547-3983",
                                                     "email": "stanley.kubrick@mgm.com",
 <a href=”mailto:stanley.kubrick@mgm.com”>
                                                     "address": "Hertfordshire England",
   Email Stanley
                                                     "friends": [
 </a>                                                   {
                                                           "id": 1,
                                                           "name": "Malcolm McDowell"
                                                        },
 <div id=”friends”>                                     {
   <span id=”count”>You have 3 friends:</span>             "id": 2,
   <ul>                                                    "name": "Arthur C. Clarke"
     <li>Malcolm McDowell</li>                          },
     <li>Arthur C. Clarke</li>                          {
     <li>Peter Sellers</li>                                "id": 3,
   </ul>                                                   "name": "Peter Sellers"
 </div>                                                 }
                                                     ]
                                                 }
{
                                                     "id": 1,
                                                     "picture": "images/user_1.png",
<div id=”user”>Hi, Paul Thomas Anderson</div>        "age": 70,
                                                     "name": "Stanley Kubrick",
                                                     "gender": "male",
                                                     "company": "MGM",
                                                     "phone": "832-547-3983",
                                                     "email":
 <a href=”mailto:stanley.kubrick@mgm.com”>
                                                     "address": "Hertfordshire England",
   Email Stanley
                                                     "friends": [
 </a>                                                   {
                                                           "id": 1,
                                                           "name": "Malcolm McDowell"
                                                        },
 <div id=”friends”>                                     {
   <span id=”count”>You have 3 friends:</span>             "id": 2,
   <ul>                                                    "name": "Arthur C. Clarke"
     <li>Malcolm McDowell</li>                          },
     <li>Arthur C. Clarke</li>                          {
     <li>Peter Sellers</li>                                "id": 3,
   </ul>                                                   "name": "Peter Sellers"
 </div>                                                 }
                                                     ]
                                                 }
{
                                                     "id": 1,
                                                     "picture": "images/user_1.png",
<div id=”user”>Hi, Paul Thomas Anderson</div>        "age": 70,
                                                     "name": "Stanley Kubrick",
                                                     "gender": "male",
                                                     "company": "MGM",
                                                     "phone": "832-547-3983",
                                                     "email": "pta@ptanderson.com",
 <a href=”mailto:stanley.kubrick@mgm.com”>
                                                     "address": "Hertfordshire England",
   Email Stanley
                                                     "friends": [
 </a>                                                   {
                                                           "id": 1,
                                                           "name": "Malcolm McDowell"
                                                        },
 <div id=”friends”>                                     {
   <span id=”count”>You have 3 friends:</span>             "id": 2,
   <ul>                                                    "name": "Arthur C. Clarke"
     <li>Malcolm McDowell</li>                          },
     <li>Arthur C. Clarke</li>                          {
     <li>Peter Sellers</li>                                "id": 3,
   </ul>                                                   "name": "Peter Sellers"
 </div>                                                 }
                                                     ]
                                                 }
{
                                                     "id": 1,
                                                     "picture": "images/user_1.png",
<div id=”user”>Hi, Paul Thomas Anderson</div>        "age": 70,
                                                     "name": "Stanley Kubrick",
                                                     "gender": "male",
                                                     "company": "MGM",
                                                     "phone": "832-547-3983",
                                                     "email": "pta@ptanderson.com",
 <a href=”mailto:stanley.kubrick@mgm.com”>
                                                     "address": "Hertfordshire England",
   Email Stanley
                                                     "friends": [
 </a>                                                   {
                                                           "id": 1,
                                                           "name": "Malcolm McDowell"
                                                        },
 <div id=”friends”>                                     {
   <span id=”count”>You have 3 friends:</span>             "id": 2,
   <ul>                                                    "name": "Arthur C. Clarke"
     <li>Malcolm McDowell</li>                          },
     <li>Arthur C. Clarke</li>                          {
     <li>Peter Sellers</li>                                "id": 3,
   </ul>                                                   "name": "Peter Sellers"
 </div>                                                 }
                                                     ]
                                                 }
{
                                                     "id": 1,
                                                     "picture": "images/user_1.png",
<div id=”user”>Hi, Paul Thomas Anderson</div>        "age": 70,
                                                     "name": "Stanley Kubrick",
                                                     "gender": "male",
                                                     "company": "MGM",
                                                     "phone": "832-547-3983",
                                                     "email": "pta@ptanderson.com",
                                                     "address": "Hertfordshire England",
                                                     "friends": [
                                                        {
                                                           "id": 1,
                                                           "name": "Malcolm McDowell"
                                                        },
 <div id=”friends”>                                     {
   <span id=”count”>You have 3 friends:</span>             "id": 2,
   <ul>                                                    "name": "Arthur C. Clarke"
     <li>Malcolm McDowell</li>                          },
     <li>Arthur C. Clarke</li>                          {
     <li>Peter Sellers</li>                                "id": 3,
   </ul>                                                   "name": "Peter Sellers"
 </div>                                                 }
                                                     ]
                                                 }
{
                                                     "id": 1,
                                                     "picture": "images/user_1.png",
<div id=”user”>Hi, Paul Thomas Anderson</div>        "age": 70,
                                                     "name": "Stanley Kubrick",
                                                     "gender": "male",
                                                     "company": "MGM",
                                                     "phone": "832-547-3983",
                                                     "email": "pta@ptanderson.com",
<a href=”mailto:pta@ptanderson.com”>                 "address": "Hertfordshire England",
  Email Paul                                         "friends": [
</a>                                                    {
                                                           "id": 1,
                                                           "name": "Malcolm McDowell"
                                                        },
 <div id=”friends”>                                     {
   <span id=”count”>You have 3 friends:</span>             "id": 2,
   <ul>                                                    "name": "Arthur C. Clarke"
     <li>Malcolm McDowell</li>                          },
     <li>Arthur C. Clarke</li>                          {
     <li>Peter Sellers</li>                                "id": 3,
   </ul>                                                   "name": "Peter Sellers"
 </div>                                                 }
                                                     ]
                                                 }
{
                                                     "id": 1,
                                                     "picture": "images/user_1.png",
<div id=”user”>Hi, Paul Thomas Anderson</div>
                                                     "age": 70,
                                                     "name": "Stanley Kubrick",
                                                     "gender": "male",
                                                     "company": "MGM",
                                                     "phone": "832-547-3983",
<a href=”mailto:pta@ptanderson.com”>                 "email": "stanley.kubrick@mgm.com",
  Email Paul                                         "address": "Hertfordshire England",
                                                     "friends": [
</a>
                                                        {
                                                           "id": 1,
                                                           "name": "Malcolm McDowell"
                                                        },
 <div id=”friends”>                                     {
   <span id=”count”>You have 3 friends:</span>             "id": 2,
   <ul>                                                    "name": "Arthur C. Clarke"
     <li>Malcolm McDowell</li>                          },
     <li>Arthur C. Clarke</li>                          {
     <li>Peter Sellers</li>                                "id": 3,
   </ul>                                                   "name": "Peter Sellers"
 </div>                                                 }
                                                     ]
                                                     ]
                                                 }
                                                 }
{
                                                     "id": 1,
                                                     "picture": "images/user_1.png",
<div id=”user”>Hi, Paul Thomas Anderson</div>
                                                     "age": 70,
                                                     "name": "Stanley Kubrick",
                                                     "gender": "male",
                                                     "company": "MGM",
                                                     "phone": "832-547-3983",
<a href=”mailto:pta@ptanderson.com”>                 "email": "stanley.kubrick@mgm.com",
  Email Paul                                         "address": "Hertfordshire England",
                                                     "friends": [
</a>
                                                        {
                                                           "id": 1,
                                                           "name": "Malcolm McDowell"
                                                        },
 <div id=”friends”>                                     {
   <span id=”count”>You have 3 friends:</span>             "id": 2,
   <ul>                                                    "name": "Arthur C. Clarke"
     <li>Malcolm McDowell</li>                          },
     <li>Arthur C. Clarke</li>                          {
     <li>Peter Sellers</li>                                "id": 3,
   </ul>                                                   "name": "Peter Sellers"
 </div>                                                 }
                                                     ]
                                                     ]
                                                 }
                                                 }
{
                                                     "id": 1,
                                                     "picture": "images/user_1.png",
<div id=”user”>Hi, Paul Thomas Anderson</div>
                                                     "age": 70,
                                                     "name": "Stanley Kubrick",
                                                     "gender": "male",
                                                     "company": "MGM",
                                                     "phone": "832-547-3983",
<a href=”mailto:pta@ptanderson.com”>                 "email": "stanley.kubrick@mgm.com",
  Email Paul                                         "address": "Hertfordshire England",
                                                     "friends": [
</a>
                                                        {
                                                          "id": 1,
                                                          "name": "Malcolm McDowell"
                                                        }
 <div id=”friends”>
   <span id=”count”>You have 3 friends:</span>
   <ul>
     <li>Malcolm McDowell</li>
     <li>Arthur C. Clarke</li>
     <li>Peter Sellers</li>
   </ul>
 </div>
                                                     ]
                                                     ]
                                                 }
                                                 }
{
                                                     "id": 1,
                                                     "picture": "images/user_1.png",
<div id=”user”>Hi, Paul Thomas Anderson</div>
                                                     "age": 70,
                                                     "name": "Stanley Kubrick",
                                                     "gender": "male",
                                                     "company": "MGM",
                                                     "phone": "832-547-3983",
<a href=”mailto:pta@ptanderson.com”>                 "email": "stanley.kubrick@mgm.com",
  Email Paul                                         "address": "Hertfordshire England",
                                                     "friends": [
</a>
                                                        {
                                                          "id": ,
                                                          "name":
                                                        }
 <div id=”friends”>
   <span id=”count”>You have 3 friends:</span>       ]
   <ul>                                          }
     <li>Malcolm McDowell</li>
     <li>Arthur C. Clarke</li>
     <li>Peter Sellers</li>
   </ul>
 </div>

                                                     ]
                                                 }
{
                                                     "id": 1,
                                                     "picture": "images/user_1.png",
<div id=”user”>Hi, Paul Thomas Anderson</div>
                                                     "age": 70,
                                                     "name": "Stanley Kubrick",
                                                     "gender": "male",
                                                     "company": "MGM",
                                                     "phone": "832-547-3983",
<a href=”mailto:pta@ptanderson.com”>                 "email": "stanley.kubrick@mgm.com",
  Email Paul                                         "address": "Hertfordshire England",
                                                     "friends": [
</a>
                                                        {
                                                          "id": 4 ,
                                                          "name": "Daniel Day Lewis"
                                                        }
 <div id=”friends”>
   <span id=”count”>You have 3 friends:</span>       ]
   <ul>                                          }
     <li>Malcolm McDowell</li>
     <li>Arthur C. Clarke</li>
     <li>Peter Sellers</li>
   </ul>
 </div>

                                                     ]
                                                 }
{
                                                     "id": 1,
                                                     "picture": "images/user_1.png",
<div id=”user”>Hi, Paul Thomas Anderson</div>
                                                     "age": 70,
                                                     "name": "Stanley Kubrick",
                                                     "gender": "male",
                                                     "company": "MGM",
                                                     "phone": "832-547-3983",
<a href=”mailto:pta@ptanderson.com”>                 "email": "stanley.kubrick@mgm.com",
  Email Paul                                         "address": "Hertfordshire England",
                                                     "friends": [
</a>
                                                        {
                                                          "id": 4 ,
                                                          "name": "Daniel Day Lewis"
                                                        }
 <div id=”friends”>
   <span id=”count”>You have 3 friends:</span>       ]
   <ul>                                          }
     <li>Malcolm McDowell</li>
     <li>Arthur C. Clarke</li>
     <li>Peter Sellers</li>
   </ul>
 </div>

                                                     ]
                                                 }
{
                                                    "id": 1,
                                                    "picture": "images/user_1.png",
<div id=”user”>Hi, Paul Thomas Anderson</div>
                                                    "age": 70,
                                                    "name": "Stanley Kubrick",
                                                    "gender": "male",
                                                    "company": "MGM",
                                                    "phone": "832-547-3983",
<a href=”mailto:pta@ptanderson.com”>                "email": "stanley.kubrick@mgm.com",
  Email Paul                                        "address": "Hertfordshire England",
                                                    "friends": [
</a>
                                                       {
                                                         "id": 4 ,
                                                         "name": "Daniel Day Lewis"
                                                       }
                                                    ]
                                                }




                                                    ]
                                                }
{
                                                    "id": 1,
                                                    "picture": "images/user_1.png",
<div id=”user”>Hi, Paul Thomas Anderson</div>
                                                    "age": 70,
                                                    "name": "Stanley Kubrick",
                                                    "gender": "male",
                                                    "company": "MGM",
                                                    "phone": "832-547-3983",
<a href=”mailto:pta@ptanderson.com”>                "email": "stanley.kubrick@mgm.com",
  Email Paul                                        "address": "Hertfordshire England",
                                                    "friends": [
</a>
                                                       {
                                                         "id": 4 ,
                                                         "name": "Daniel Day Lewis"
                                                       }
<div id=”friends”>
  <span id=”count”>You have 1 friend:</span>        ]
  <ul>                                          }
    <li>Daniel Day Lewis</li>
  </ul>
</div>



                                                    ]
                                                }
{
                                                    "id": 1,
                                                    "picture": "images/user_1.png",
<div id=”user”>Hi, Paul Thomas Anderson</div>
                                                    "age": 70,
                                                    "name": "Stanley Kubrick",
                                                    "gender": "male",
                                                    "company": "MGM",
                                                    "phone": "832-547-3983",
<a href=”mailto:pta@ptanderson.com”>                "email": "stanley.kubrick@mgm.com",
  Email Paul                                        "address": "Hertfordshire England",
                                                    "friends": [
</a>
                                                       {
                                                         "id": 4 ,
                                                         "name": "Daniel Day Lewis"
                                                       }
<div id=”friends”>
  <span id=”count”>You have 1 friend:</span>        ]
  <ul>                                          }
    <li>Daniel Day Lewis</li>
  </ul>
</div>



                                                    ]
                                                }
BACKBONE IN ACTION
View Layout Container
Title View




             View Layout Container
Title View




             View Layout Container

                  Day Views
Title View                    Time Control View




             View Layout Container

                  Day Views
Title View                       Time Control View

             Chosen Time View




                View Layout Container

                     Day Views
Event
 Calendar                                                        Month
 
 |
 
 Week
 
 |
 
 Day
 -February-
 
      M                 T                          W                                    TH                                                                                F                                                                                           S                                                                                  SU
  1                2                      3                                     4                                                              5                                                                                            6                                                                                          7


 8                 9                     10                                      11                                                         12                                                                                           13                                                                                        14


15                 16                    17                                     18                                                          19                                                                                       20                                                                                             21


 22                23                    24                                     25                                                             26                                                                                          27                                                                                          28
[{
   id: 1,
   name: Doctors Appt,
                            Event
 Calendar                                                        Month
 
 |
 
 Week
 
 |
 
 Day
   where: Dentist,
   date: 02-02-2013,
 -February-
 
   time_start: 2:00pm,
   time_end: 3:00pm             M                 T                          W                                    TH                                                                                F                                                                                           S                                                                                  SU
},{
   id: 2,
   name: Ruby Meetup,
                              1                2                      3                                     4                                                              5                                                                                            6                                                                                          7
   where: Centergy Bld,
   date: 02-13-2013,
   time_start: 7:00pm,

},{
   time_end: 9:00pm
                             8                 9                     10                                      11                                                         12                                                                                           13                                                                                        14
   id: 3,
   name: Buy Flowers!,
   where: null,
   date: 02-14-2013,
   time_start: null,        15                 16                    17                                     18                                                          19                                                                                       20                                                                                             21
   time_end: null
},{
   id: 4,
   name: Visit Vet,
   where: Avian Center,
   date: 02-24-2013,
                             22                23                    24                                     25                                                             26                                                                                          27                                                                                          28
   time_start: 10:00am,
   time_end: 11:00am
}]
[{
   id: 1,
   name: Doctors Appt,
                            Event
 Calendar                                                                                 Month
 
 |
 
 Week
 
 |
 
 Day
   where: Dentist,
   date: 02-02-2013,
 -February-
 
   time_start: 2:00pm,
   time_end: 3:00pm             M                          T                                             W                                        TH                                                                         F                                                                                           S                                                                                  SU
},{
   id: 2,
   name: Ruby Meetup,
                              1                2                                               3                                               4                                                    5                                                                                            6                                                                                          7
   where: Centergy Bld,
                                                Doctors
 
   date: 02-13-2013,                           Appt
   time_start: 7:00pm,

},{
   time_end: 9:00pm
                             8                 9                                              10                                               11                                                12                                                                                           13                                                                                        14
   id: 3,
   name: Buy Flowers!,                                                                                                                                                                                                                                                                          Ruby
                                                     Buy
 
   where: null,                                                                                                                                                                                                                                                                                  Meetup                                                                                  Flowers!
   date: 02-14-2013,
   time_start: null,        15                 16                                             17                                               18                                                19                                                                                       20                                                                                             21
   time_end: null
},{
   id: 4,
   name: Visit Vet,
   where: Avian Center,
   date: 02-24-2013,
                             22                23                                             24                                               25                                                   26                                                                                          27                                                                                          28
   time_start: 10:00am,
   time_end: 11:00am                                                                               Visit
 
}]
                                                                                                      Vet
[{
   id: 1,
   name: Doctors Appt,
                            Event
 Calendar                                                                                 Month
 
 |
 
 Week
 
 |
 
 Day
   where: Dentist,
   date: 02-02-2013,
 -February-
 
   time_start: 2:00pm,
   time_end: 3:00pm             M                          T                                             W                                        TH                                                                         F                                                                                           S                                                                                  SU
},{
   id: 2,
   name: Ruby Meetup,
                              1                2                                               3                                               4                                                    5                                                                                            6                                                                                          7
   where: Centergy Bld,
                                                Doctors
 
   date: 02-13-2013,                           Appt
   time_start: 7:00pm,

},{
   time_end: 9:00pm
                             8                 9                                              10                                               11                                                12                                                                                           13                                                                                        14
   id: 3,
   name: Buy Flowers!,                                                                                                                                                                                                                                                                          Ruby
                                                     Buy
 
   where: null,                                                                                                                                                                                                                                                                                  Meetup                                                                                  Flowers!
   date: 02-14-2013,
   time_start: null,        15                 16                                             17                                               18                                                19                                                                                       20                                                                                             21
   time_end: null
},{
   id: 4,
   name: Visit Vet,
   where: Avian Center,
   date: 02-24-2013,
                             22                23                                             24                                               25                                                   26                                                                                          27                                                                                          28
   time_start: 10:00am,
   time_end: 11:00am                                                                               Visit
 
}]
                                                                                                      Vet
[{
   id: 1,
   name: Doctors Appt,
                            Event
 Calendar                                                                                 Month
 
 |
 
 Week

Contenu connexe

Tendances

Kindergarten cheat sheet for the wiki2
Kindergarten cheat sheet for the wiki2Kindergarten cheat sheet for the wiki2
Kindergarten cheat sheet for the wiki2andreamiller20
 
HTML5 and the web of tomorrow!
HTML5  and the  web of tomorrow!HTML5  and the  web of tomorrow!
HTML5 and the web of tomorrow!Christian Heilmann
 
Take Your Markup to 11
Take Your Markup to 11Take Your Markup to 11
Take Your Markup to 11Emily Lewis
 
Engineering the New LinkedIn Profile
Engineering the New LinkedIn ProfileEngineering the New LinkedIn Profile
Engineering the New LinkedIn ProfileJosh Clemm
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5Terry Ryan
 
What does the browser pre-loader do?
What does the browser pre-loader do?What does the browser pre-loader do?
What does the browser pre-loader do?Andy Davies
 
Html5 Brown Bag
Html5 Brown BagHtml5 Brown Bag
Html5 Brown Bagstuplum
 
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...Lucidworks
 
Web Programming - 1st TA Session
Web Programming - 1st TA SessionWeb Programming - 1st TA Session
Web Programming - 1st TA SessionColin Su
 
ePUB 3 and Publishing e-books
ePUB 3 and Publishing e-booksePUB 3 and Publishing e-books
ePUB 3 and Publishing e-booksKerem Karatal
 

Tendances (12)

Kindergarten cheat sheet for the wiki2
Kindergarten cheat sheet for the wiki2Kindergarten cheat sheet for the wiki2
Kindergarten cheat sheet for the wiki2
 
HTML5 and the web of tomorrow!
HTML5  and the  web of tomorrow!HTML5  and the  web of tomorrow!
HTML5 and the web of tomorrow!
 
Take Your Markup to 11
Take Your Markup to 11Take Your Markup to 11
Take Your Markup to 11
 
Engineering the New LinkedIn Profile
Engineering the New LinkedIn ProfileEngineering the New LinkedIn Profile
Engineering the New LinkedIn Profile
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
What does the browser pre-loader do?
What does the browser pre-loader do?What does the browser pre-loader do?
What does the browser pre-loader do?
 
Html5 Brown Bag
Html5 Brown BagHtml5 Brown Bag
Html5 Brown Bag
 
[In Control 2010] HTML5
[In Control 2010] HTML5[In Control 2010] HTML5
[In Control 2010] HTML5
 
Html5
Html5Html5
Html5
 
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
 
Web Programming - 1st TA Session
Web Programming - 1st TA SessionWeb Programming - 1st TA Session
Web Programming - 1st TA Session
 
ePUB 3 and Publishing e-books
ePUB 3 and Publishing e-booksePUB 3 and Publishing e-books
ePUB 3 and Publishing e-books
 

En vedette

En vedette (6)

Backbone js-slides
Backbone js-slidesBackbone js-slides
Backbone js-slides
 
симфони это не страшно
симфони   это не страшносимфони   это не страшно
симфони это не страшно
 
Workshop storytelling digital october
Workshop storytelling digital octoberWorkshop storytelling digital october
Workshop storytelling digital october
 
Tikal's Backbone_js introduction workshop
Tikal's Backbone_js introduction workshopTikal's Backbone_js introduction workshop
Tikal's Backbone_js introduction workshop
 
Introduction to backbone js
Introduction to backbone jsIntroduction to backbone js
Introduction to backbone js
 
Backbone js
Backbone jsBackbone js
Backbone js
 

Similaire à Backbone JS - Journey to the Front End [Dev Nexus Conference]

Practical progressive enhancement
Practical progressive enhancementPractical progressive enhancement
Practical progressive enhancementGraham Bird
 
Darwin web standards
Darwin web standardsDarwin web standards
Darwin web standardsJustin Avery
 
HTML 5 Drupalcamp Ireland Dublin 2010
HTML 5 Drupalcamp Ireland Dublin 2010HTML 5 Drupalcamp Ireland Dublin 2010
HTML 5 Drupalcamp Ireland Dublin 2010alanburke
 
Beginning Html 5 Presentation
Beginning Html 5 PresentationBeginning Html 5 Presentation
Beginning Html 5 PresentationUsman Saleem
 
Liquibase via maven
Liquibase via mavenLiquibase via maven
Liquibase via mavenMaki Turki
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web ServicesGreg Hines
 
Lesson 3: Linking It All Together
Lesson 3: Linking It All Together Lesson 3: Linking It All Together
Lesson 3: Linking It All Together Olivia Moran
 
TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單偉格 高
 
46h interaction 1.lesson Hello world
46h interaction 1.lesson Hello world46h interaction 1.lesson Hello world
46h interaction 1.lesson Hello worldhemi46h
 
Creating HTML Pages
Creating HTML PagesCreating HTML Pages
Creating HTML PagesMike Crabb
 
Enough with the javas cript already! de Nicholas Zakas
Enough with the javas cript already! de Nicholas ZakasEnough with the javas cript already! de Nicholas Zakas
Enough with the javas cript already! de Nicholas ZakasKubide
 
Introduction to blogging with Jekyll
Introduction to blogging with JekyllIntroduction to blogging with Jekyll
Introduction to blogging with JekyllEric Lathrop
 
Enough with the JavaScript already!
Enough with the JavaScript already!Enough with the JavaScript already!
Enough with the JavaScript already!Nicholas Zakas
 
LIS3353 SP12 Week 4
LIS3353 SP12 Week 4LIS3353 SP12 Week 4
LIS3353 SP12 Week 4Amanda Case
 
HTML 5 Fundamental
HTML 5 FundamentalHTML 5 Fundamental
HTML 5 FundamentalLanh Le
 

Similaire à Backbone JS - Journey to the Front End [Dev Nexus Conference] (20)

Practical progressive enhancement
Practical progressive enhancementPractical progressive enhancement
Practical progressive enhancement
 
Darwin web standards
Darwin web standardsDarwin web standards
Darwin web standards
 
HTML 5 Drupalcamp Ireland Dublin 2010
HTML 5 Drupalcamp Ireland Dublin 2010HTML 5 Drupalcamp Ireland Dublin 2010
HTML 5 Drupalcamp Ireland Dublin 2010
 
Beginning Html 5 Presentation
Beginning Html 5 PresentationBeginning Html 5 Presentation
Beginning Html 5 Presentation
 
Liquibase via maven
Liquibase via mavenLiquibase via maven
Liquibase via maven
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 
Lesson 3: Linking It All Together
Lesson 3: Linking It All Together Lesson 3: Linking It All Together
Lesson 3: Linking It All Together
 
Web 101 intro to html
Web 101  intro to htmlWeb 101  intro to html
Web 101 intro to html
 
TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單
 
46h interaction 1.lesson Hello world
46h interaction 1.lesson Hello world46h interaction 1.lesson Hello world
46h interaction 1.lesson Hello world
 
Creating HTML Pages
Creating HTML PagesCreating HTML Pages
Creating HTML Pages
 
Enough with the javas cript already! de Nicholas Zakas
Enough with the javas cript already! de Nicholas ZakasEnough with the javas cript already! de Nicholas Zakas
Enough with the javas cript already! de Nicholas Zakas
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Introduction to blogging with Jekyll
Introduction to blogging with JekyllIntroduction to blogging with Jekyll
Introduction to blogging with Jekyll
 
Enough with the JavaScript already!
Enough with the JavaScript already!Enough with the JavaScript already!
Enough with the JavaScript already!
 
LIS3353 SP12 Week 4
LIS3353 SP12 Week 4LIS3353 SP12 Week 4
LIS3353 SP12 Week 4
 
HTML 5 Fundamental
HTML 5 FundamentalHTML 5 Fundamental
HTML 5 Fundamental
 
Html5 semantics
Html5 semanticsHtml5 semantics
Html5 semantics
 
LINKING IN HTML
LINKING IN HTMLLINKING IN HTML
LINKING IN HTML
 
Html hyperlinks
Html hyperlinksHtml hyperlinks
Html hyperlinks
 

Dernier

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Dernier (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Backbone JS - Journey to the Front End [Dev Nexus Conference]

  • 1. BACKBONE JS { Journey to the Front End } Brian Mann @backbonerails BackboneRails.com
  • 2. MY EXPERIENCE WITH BACKBONE
  • 3. A Little Perspective • Web Application Developer ‣ Backbone / Ruby on Rails • Scaling Our Project ‣ Totals about 600 JS files ‣ Close to 80 different JS modules ‣ 120+ server models ‣ Entirely Single Page • Published Screencasts ‣ Chronicles development patterns Backbone JS: Journey to the Front End BACKBONERAILS.com
  • 4. BACKBONE IN A NUTSHELL
  • 5. Key Points • Introduces the building blocks of MVC frameworks • Manages the complexity of front end logic • Provides the structural components for organizing ‣ Presentation ‣ Behavior ‣ Implementation • Keeps view changes in sync • Eliminates unmanageable spaghetti code Backbone JS: Journey to the Front End BACKBONERAILS.com
  • 6. Tenets of Backbone • Powered by RESTful JSON API • Low Profile ‣ Unopinionated ‣ Leaves implementation up to the developer • Small Set of Documentation • Huge Success Record ‣ Major players using it in production • Awesome Community Support Backbone JS: Journey to the Front End BACKBONERAILS.com
  • 8.
  • 9. Pandora Google Analytics WuFoo Rdio
  • 10. Google Analytics 1. Loading feedback while fetching data from server
  • 11. Google Analytics 1. Loading feedback while fetching data from server
  • 12. Google Analytics 2. Dialog Selection Events
  • 13. Google Analytics 2. Dialog Selection Events
  • 14. WuFoo 1. Picked up and dragged “Single Line Text”
  • 15. WuFoo 1. Picked up and dragged “Single Line Text”
  • 16. WuFoo 2. Passively saved to server, displayed single line text
  • 17. WuFoo 2. Passively saved to server, displayed single line text
  • 18. WuFoo 3. Two Way Data Binding
  • 19. WuFoo 3. Two Way Data Binding
  • 22. Rdio 1. Changing sort order - hovered over “Song” drop down
  • 23. Rdio 1. Changing sort order - hovered over “Song” drop down
  • 24. Rdio 2. Clicking “Artist” to sort songs by Artist
  • 25. Rdio 2. Clicking “Artist” to sort songs by Artist
  • 26. Rdio 3. Shows loading spinner while fetching new data
  • 27. Rdio 3. Shows loading spinner while fetching new data
  • 28. Rdio 4. New collection is shown, URL is updated
  • 29. Rdio 4. New collection is shown, URL is updated
  • 31. http://www.serversrule.com/ before 2005 Stateless Servers
  • 32. http://www.serversrule.com/ <html> <head> <title>Best Page in the Universe</title> </head> <body> <div id="header"> <ul> <li> <a href="link1">Link 1</a> </li> <li> <a href="link2">Link 2</a> </li> <li> <a href="link3">Link 3</a> </li> </ul> before 2005 </div> <div id="main">Home Page Content</div> </body> </html> Stateless Servers
  • 33. http://www.serversrule.com/ My Awesome Site Link 1 | Link 2 | Link 3 Home Page before 2005 Stateless Servers
  • 34. http://www.serversrule.com/ My Awesome Site Link 1 | Link 2 | Link 3 Home Page before 2005 Stateless Servers
  • 35. http://www.serversrule.com/link1 My Awesome Site Link 1 | Link 2 | Link 3 Home Page before 2005 Stateless Servers
  • 36. http://www.serversrule.com/link1 before 2005 Stateless Servers
  • 37. http://www.serversrule.com/link1 <html> <head> <title>Best Page in the Universe</title> </head> <body> <div id="header"> <ul> <li class="active"> <a href="link1">Link 1</a> </li> <li> <a href="link2">Link 2</a> </li> <li> <a href="link3">Link 3</a> </li> </ul> before 2005 </div> <div id="main">Link 1 - Content</div> </body> </html> Stateless Servers
  • 38. http://www.serversrule.com/link1 <html> <head> <title>Best Page in the Universe</title> </head> <body> <div id="header"> <ul> <li class="active"> <a href="link1">Link 1</a> </li> <li> <a href="link2">Link 2</a> </li> <li> <a href="link3">Link 3</a> </li> </ul> before 2005 </div> <div id="main">Link 1 - Content</div> </body> </html> Stateless Servers
  • 39. http://www.serversrule.com/link1 My Awesome Site Link 1 | Link 2 | Link 3 Link 1 - Content before 2005 Stateless Servers
  • 40. http://www.serversrule.com/link1 My Awesome Site Link 1 | Link 2 | Link 3 Link 1 - Content before 2005 Stateless Servers
  • 41. http://www.serversrule.com/link1 My Awesome Site Link 1 | Link 2 | Link 3 Link 1 - Content before 2005 2006 - 2009 Stateless Servers Heavy AJAX Use
  • 42. http://www.serversrule.com/link1 My Awesome Site Link 1 | Link 2 | Link 3 Link 1 - Content before 2005 2006 - 2009 Stateless Servers Heavy AJAX Use
  • 43. http://www.serversrule.com/link1 <html> My Awesome Site <head> Link 1 | Link 2 | Link 3 <title>Best Page in the Universe</title> </head> <body> <div id="header"> <ul> <li class="active"> Link 1 - Content </li> <a href="link1">Link 1</a> <li> <a href="link2">Link 2</a> </li> <li> <a href="link3">Link 3</a> </li> </ul> before 2005 </div> 2006 - 2009 <div id="main">Link 1 - Content</div> </body> </html> Stateless Servers Heavy AJAX Use
  • 44. http://www.serversrule.com/link1 <html> My Awesome Site <head> Link 1 | Link 2 | Link 3 <title>Best Page in the Universe</title> </head> <body> <div id="header"> <ul> <li class="active"> Link 1 - Content </li> <a href="link1">Link 1</a> <li> <a href="link2">Link 2</a> </li> <li> <a href="link3">Link 3</a> </li> </ul> before 2005 </div> 2006 - 2009 <div id="main">Link 1 - Content</div> </body> </html> Stateless Servers Heavy AJAX Use
  • 45. http://www.serversrule.com/link1 <html> My Awesome Site <head> Link 1 | Link 2 | Link 3 <title>Best Page in the Universe</title> </head> <body> <div id="header"> <ul> <li class="active"> Link 1 - Content </li> <a href="link1">Link 1</a> <li> <a href="link2">Link 2</a> </li> <li> <a href="link3">Link 3</a> </li> </ul> before 2005 </div> 2006 - 2009 <div id="main"> </div> </body> </html> Stateless Servers Heavy AJAX Use
  • 46. http://www.serversrule.com/link1 <html> My Awesome Site <head> Link 1 | Link 2 | Link 3 <title>Best Page in the Universe</title> </head> <body> <div id="header"> <ul> <li class="active"> Link 1 - Content </li> <a href="link1">Link 1</a> <li> <a href="link2">Link 2</a> </li> <li> <a href="link3">Link 3</a> </li> </ul> before 2005 </div> 2006 - 2009 <div id="main">Link 2 - Content</div> </body> </html> Stateless Servers Heavy AJAX Use
  • 47. http://www.serversrule.com/link1 <html> My Awesome Site <head> Link 1 | Link 2 | Link 3 <title>Best Page in the Universe</title> </head> <body> <div id="header"> <ul> <li class="active"> Link 1 - Content </li> <a href="link1">Link 1</a> <li> <a href="link2">Link 2</a> </li> <li> <a href="link3">Link 3</a> </li> </ul> before 2005 </div> 2006 - 2009 <div id="main">Link 2 - Content</div> </body> </html> Stateless Servers Heavy AJAX Use
  • 48. http://www.serversrule.com/link1 <html> My Awesome Site <head> Link 1 | Link 2 | Link 3 <title>Best Page in the Universe</title> </head> <body> <div id="header"> <ul> Link <a - Content 1</a> 1 href="link1">Link </li> <li> <a href="link2">Link 2</a> </li> <li> <a href="link3">Link 3</a> </li> </ul> before 2005 </div> 2006 - 2009 <div id="main">Link 2 - Content</div> </body> </html> Stateless Servers Heavy AJAX Use
  • 49. http://www.serversrule.com/link1 <html> My Awesome Site <head> Link 1 | Link 2 | Link 3 <title>Best Page in the Universe</title> </head> <body> <div id="header"> <ul> <li> Link 1 - Content </li> <a href="link1">Link 1</a> <li> <a href="link2">Link 2</a> </li> <li> <a href="link3">Link 3</a> </li> </ul> before 2005 </div> 2006 - 2009 <div id="main">Link 2 - Content</div> </body> </html> Stateless Servers Heavy AJAX Use
  • 50. http://www.serversrule.com/link1 <html> My Awesome Site <head> Link 1 | Link 2 | Link 3 <title>Best Page in the Universe</title> </head> <body> <div id="header"> <ul> <li> Link 1 - Content </li> <a href="link1">Link 1</a> <li> <a href="link2">Link 2</a> </li> <li> <a href="link3">Link 3</a> </li> </ul> before 2005 </div> 2006 - 2009 <div id="main">Link 2 - Content</div> </body> </html> Stateless Servers Heavy AJAX Use
  • 51. http://www.serversrule.com/link1 <html> My Awesome Site <head> Link 1 | Link 2 | Link 3 <title>Best Page in the Universe</title> </head> <body> <div id="header"> <ul> <li> Link 1 - Content <a href="link1">Link 1</a> </li> <a href="link2">Link 2</a> </li> <li> <a href="link3">Link 3</a> </li> </ul> before 2005 </div> 2006 - 2009 <div id="main">Link 2 - Content</div> </body> </html> Stateless Servers Heavy AJAX Use
  • 52. http://www.serversrule.com/link1 <html> My Awesome Site <head> Link 1 | Link 2 | Link 3 <title>Best Page in the Universe</title> </head> <body> <div id="header"> <ul> <li> Link 1 - Content </li> <a href="link1">Link 1</a> <li class="active"> <a href="link2">Link 2</a> </li> <li> <a href="link3">Link 3</a> </li> </ul> before 2005 </div> 2006 - 2009 <div id="main">Link 2 - Content</div> </body> </html> Stateless Servers Heavy AJAX Use
  • 53. http://www.serversrule.com/link1 My Awesome Site Link 1 | Link 2 | Link 3 Link 1 - Content before 2005 2006 - 2009 Stateless Servers Heavy AJAX Use
  • 54. http://www.serversrule.com/link1 My Awesome Site Link 1 | Link 2 | Link 3 Link 2 - Content before 2005 2006 - 2009 Stateless Servers Heavy AJAX Use
  • 55. http://www.serversrule.com/link1 My Awesome Site Link 1 | Link 2 | Link 3 Link 2 - Content before 2005 2006 - 2009 Stateless Servers Heavy AJAX Use
  • 56. http://www.serversrule.com/link1 My Awesome Site Link 1 | Link 2 | Link 3 Link 2 - Content before 2005 2006 - 2009 2010 - now Stateless Servers Heavy AJAX Use Modern MVC
  • 57. http://www.serversrule.com/link1 My Awesome Site Link 1 | Link 2 | Link 3 <Links Collection> Models: [ {name: “Link1”, active: false}, {name: “Link2”, active: true}, ] Link 2 - Content {name: “Link3”, active: false} before 2005 2006 - 2009 2010 - now Stateless Servers Heavy AJAX Use Modern MVC
  • 58. http://www.serversrule.com/link1 My Awesome Site Link 1 | Link 2 | Link 3 <Links Collection> Models: [ {name: “Link1”, active: false}, {name: “Link2”, active: true}, Object { ... type=”click” .. } ] Link 2 - Content {name: “Link3”, active: false} before 2005 2006 - 2009 2010 - now Stateless Servers Heavy AJAX Use Modern MVC
  • 59. http://www.serversrule.com/link1 My Awesome Site Link 1 | Link 2 | Link 3 <Links Collection> Models: 1. Capture event, prevent default action [ {name: “Link1”, 2. Call method on model to set {active: true} active: false}, {name: “Link2”, active: true}, Object { ... type=”click” .. } {name: “Link3”, 3. Fires event which causes previously ] Link 2 - Content active: false} selected <li> to deselect itself - and current <li> to select itself <li class=”active”>...</li> 4. Let our managing controller know this click event has occurred before 2005 2006 - 2009 2010 - now 5. Controller decides what the next action should be Stateless Servers Heavy AJAX Use Modern MVC
  • 60. Backbone Components • Entities ‣ Models ‣ Collections Backbone JS: Journey to the Front End BACKBONERAILS.com
  • 61. Backbone Components • Entities Model ‣ Models ‣ Collections User firstName: Brian lastName: Mann fullName() save() Backbone JS: Journey to the Front End BACKBONERAILS.com
  • 62. Backbone Components • Entities Model ‣ Models ‣ Collections User firstName: Brian lastName: Mann fullName() save() Backbone JS: Journey to the Front End BACKBONERAILS.com
  • 63. Backbone Components • Entities Model ‣ Models ‣ Collections User firstName: Brian lastName: Mann fullName() save() Backbone JS: Journey to the Front End BACKBONERAILS.com
  • 64. Backbone Components • Entities Events Model ‣ Models Name When This Event Triggers ‣ Collections User change when any model attributes have changed firstName: Brian change:[attribute] when a specific attribute has changed lastName: Mann destroy when a model is destroyed fullName() sync when a model has successfully synced with save() the server error when a model’s save call fails on the server when a models validations fails on the invalid client Backbone JS: Journey to the Front End BACKBONERAILS.com
  • 65. Backbone Components • Entities Collection ‣ Models ‣ Collections User User User User User User Backbone JS: Journey to the Front End BACKBONERAILS.com
  • 66. Backbone Components • Entities Collection ‣ Models Events ‣ Collections Name When This Event Triggers User User User add when a model is added to the collection remove when a model is removed from a collection when the collection’s entire contents have reset been replaced User User sort User when the collection has been re-sorted when a collection has started to request to request the server when a collection has been successfully sync synced with the server Backbone JS: Journey to the Front End BACKBONERAILS.com
  • 67. Backbone Components • Entities ‣ Models ‣ Collections • Views ‣ usually paired with a model or collection ‣ given a template (a chunk of HTML) ‣ responsible for rendering + responding to model/collection events Backbone JS: Journey to the Front End BACKBONERAILS.com
  • 68. Backbone Components • Entities ‣ Models ‣ Collections • Views ‣ usually paired with a model or collection ‣ given a template (a chunk of HTML) ‣ responsible for rendering + responding to model/collection events • Routers ‣ listen for and react to client side URLs Backbone JS: Journey to the Front End BACKBONERAILS.com
  • 69. Backbone Components • Entities http://www.app.com/#users ‣ Models ‣ Collections • Views ‣ usually paired with a model or collection Z ‣ given a template (a chunk of HTML) ‣ responsible for rendering + responding to model/collection events • Routers ‣ listen for and react to client side URLs Backbone JS: Journey to the Front End BACKBONERAILS.com
  • 70. Backbone Components • Entities ‣ Models ‣ Collections • Views ‣ usually paired with a model or collection ‣ given a template (a chunk of HTML) ‣ responsible for rendering + responding to model/collection events • Routers ‣ listen for and react to client side URLs • Events Backbone JS: Journey to the Front End BACKBONERAILS.com
  • 71. RELATIONSHIP BETWEEN VIEWS AND MODELS
  • 72. http://www.app.com/#users/1/edit Hi, Stanley Kubrick Edit Profile Name Stanley Kubrick Age 70 Gender male female Email stanley.kubrick@mgm.com Friends 1. Malcolm McDowell x 2. Arthur C. Clarke x 3. Peter Sellers x add new friend... + cancel Save
  • 73. http://www.app.com/#users/1/edit Hi, Stanley Kubrick Edit Profile Name Stanley Kubrick Age 70 View Gender male female Email stanley.kubrick@mgm.com Friends 1. Malcolm McDowell x 2. Arthur C. Clarke x 3. Peter Sellers x add new friend... + cancel Save
  • 74. http://www.app.com/#users/1/edit Hi, Stanley Kubrick Edit Profile Name Stanley Kubrick Age 70 View Gender male female Email stanley.kubrick@mgm.com Friends 1. Malcolm McDowell x 2. Arthur C. Clarke x 3. Peter Sellers x Model add new friend... Template + cancel Save
  • 75. { "id": 1, "picture": "images/user_1.png", "age": 70, "name": "Stanley Kubrick", "gender": "male", "company": "MGM", "phone": "832-547-3983", "email": "stanley.kubrick@mgm.com", "address": "Hertfordshire England", "friends": [ { "id": 1, "name": "Malcolm McDowell" }, { "id": 2, "name": "Arthur C. Clarke" }, { "id": 3, "name": "Peter Sellers" } ] }
  • 76. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Stanley Kubrick</div> "age": 70, "name": "Stanley Kubrick", "gender": "male", "company": "MGM", "phone": "832-547-3983", "email": "stanley.kubrick@mgm.com", "address": "Hertfordshire England", "friends": [ { "id": 1, "name": "Malcolm McDowell" }, { "id": 2, "name": "Arthur C. Clarke" }, { "id": 3, "name": "Peter Sellers" } ] }
  • 77. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Stanley Kubrick</div> "age": 70, "name": "Stanley Kubrick", "gender": "male", "company": "MGM", "phone": "832-547-3983", "email": "stanley.kubrick@mgm.com", <a href=”mailto:stanley.kubrick@mgm.com”> "address": "Hertfordshire England", Email Stanley "friends": [ </a> { "id": 1, "name": "Malcolm McDowell" }, { "id": 2, "name": "Arthur C. Clarke" }, { "id": 3, "name": "Peter Sellers" } ] }
  • 78. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Stanley Kubrick</div> "age": 70, "name": "Stanley Kubrick", "gender": "male", "company": "MGM", "phone": "832-547-3983", "email": "stanley.kubrick@mgm.com", <a href=”mailto:stanley.kubrick@mgm.com”> "address": "Hertfordshire England", Email Stanley "friends": [ </a> { "id": 1, "name": "Malcolm McDowell" }, <div id=”friends”> { <span id=”count”>You have 3 friends:</span> "id": 2, <ul> "name": "Arthur C. Clarke" <li>Malcolm McDowell</li> }, <li>Arthur C. Clarke</li> { <li>Peter Sellers</li> "id": 3, </ul> "name": "Peter Sellers" </div> } ] }
  • 79. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Stanley Kubrick</div> "age": 70, "name": "Stanley Kubrick", "gender": "male", "company": "MGM", "phone": "832-547-3983", "email": "stanley.kubrick@mgm.com", <a href=”mailto:stanley.kubrick@mgm.com”> "address": "Hertfordshire England", Email Stanley "friends": [ </a> { "id": 1, "name": "Malcolm McDowell" }, <div id=”friends”> { <span id=”count”>You have 3 friends:</span> "id": 2, <ul> "name": "Arthur C. Clarke" <li>Malcolm McDowell</li> }, <li>Arthur C. Clarke</li> { <li>Peter Sellers</li> "id": 3, </ul> "name": "Peter Sellers" </div> } ] }
  • 80. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Stanley Kubrick</div> "age": 70, "name": "gender": "male", "company": "MGM", "phone": "832-547-3983", "email": "stanley.kubrick@mgm.com", <a href=”mailto:stanley.kubrick@mgm.com”> "address": "Hertfordshire England", Email Stanley "friends": [ </a> { "id": 1, "name": "Malcolm McDowell" }, <div id=”friends”> { <span id=”count”>You have 3 friends:</span> "id": 2, <ul> "name": "Arthur C. Clarke" <li>Malcolm McDowell</li> }, <li>Arthur C. Clarke</li> { <li>Peter Sellers</li> "id": 3, </ul> "name": "Peter Sellers" </div> } ] }
  • 81. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Stanley Kubrick</div> "age": 70, "name": "Paul Thomas Anderson", "gender": "male", "company": "MGM", "phone": "832-547-3983", "email": "stanley.kubrick@mgm.com", <a href=”mailto:stanley.kubrick@mgm.com”> "address": "Hertfordshire England", Email Stanley "friends": [ </a> { "id": 1, "name": "Malcolm McDowell" }, <div id=”friends”> { <span id=”count”>You have 3 friends:</span> "id": 2, <ul> "name": "Arthur C. Clarke" <li>Malcolm McDowell</li> }, <li>Arthur C. Clarke</li> { <li>Peter Sellers</li> "id": 3, </ul> "name": "Peter Sellers" </div> } ] }
  • 82. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Stanley Kubrick</div> "age": 70, "name": "Paul Thomas Anderson", "gender": "male", "company": "MGM", "phone": "832-547-3983", "email": "stanley.kubrick@mgm.com", <a href=”mailto:stanley.kubrick@mgm.com”> "address": "Hertfordshire England", Email Stanley "friends": [ </a> { "id": 1, "name": "Malcolm McDowell" }, <div id=”friends”> { <span id=”count”>You have 3 friends:</span> "id": 2, <ul> "name": "Arthur C. Clarke" <li>Malcolm McDowell</li> }, <li>Arthur C. Clarke</li> { <li>Peter Sellers</li> "id": 3, </ul> "name": "Peter Sellers" </div> } ] }
  • 83. { "id": 1, "picture": "images/user_1.png", "age": 70, "name": "Paul Thomas Anderson", "gender": "male", "company": "MGM", "phone": "832-547-3983", "email": "stanley.kubrick@mgm.com", <a href=”mailto:stanley.kubrick@mgm.com”> "address": "Hertfordshire England", Email Stanley "friends": [ </a> { "id": 1, "name": "Malcolm McDowell" }, <div id=”friends”> { <span id=”count”>You have 3 friends:</span> "id": 2, <ul> "name": "Arthur C. Clarke" <li>Malcolm McDowell</li> }, <li>Arthur C. Clarke</li> { <li>Peter Sellers</li> "id": 3, </ul> "name": "Peter Sellers" </div> } ] }
  • 84. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Paul Thomas Anderson</div> "age": 70, "name": "Paul Thomas Anderson", "gender": "male", "company": "MGM", "phone": "832-547-3983", "email": "stanley.kubrick@mgm.com", <a href=”mailto:stanley.kubrick@mgm.com”> "address": "Hertfordshire England", Email Stanley "friends": [ </a> { "id": 1, "name": "Malcolm McDowell" }, <div id=”friends”> { <span id=”count”>You have 3 friends:</span> "id": 2, <ul> "name": "Arthur C. Clarke" <li>Malcolm McDowell</li> }, <li>Arthur C. Clarke</li> { <li>Peter Sellers</li> "id": 3, </ul> "name": "Peter Sellers" </div> } ] }
  • 85. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Paul Thomas Anderson</div> "age": 70, "name": "Stanley Kubrick", "gender": "male", "company": "MGM", "phone": "832-547-3983", "email": "stanley.kubrick@mgm.com", <a href=”mailto:stanley.kubrick@mgm.com”> "address": "Hertfordshire England", Email Stanley "friends": [ </a> { "id": 1, "name": "Malcolm McDowell" }, <div id=”friends”> { <span id=”count”>You have 3 friends:</span> "id": 2, <ul> "name": "Arthur C. Clarke" <li>Malcolm McDowell</li> }, <li>Arthur C. Clarke</li> { <li>Peter Sellers</li> "id": 3, </ul> "name": "Peter Sellers" </div> } ] }
  • 86. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Paul Thomas Anderson</div> "age": 70, "name": "Stanley Kubrick", "gender": "male", "company": "MGM", "phone": "832-547-3983", "email": "stanley.kubrick@mgm.com", <a href=”mailto:stanley.kubrick@mgm.com”> "address": "Hertfordshire England", Email Stanley "friends": [ </a> { "id": 1, "name": "Malcolm McDowell" }, <div id=”friends”> { <span id=”count”>You have 3 friends:</span> "id": 2, <ul> "name": "Arthur C. Clarke" <li>Malcolm McDowell</li> }, <li>Arthur C. Clarke</li> { <li>Peter Sellers</li> "id": 3, </ul> "name": "Peter Sellers" </div> } ] }
  • 87. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Paul Thomas Anderson</div> "age": 70, "name": "Stanley Kubrick", "gender": "male", "company": "MGM", "phone": "832-547-3983", "email": <a href=”mailto:stanley.kubrick@mgm.com”> "address": "Hertfordshire England", Email Stanley "friends": [ </a> { "id": 1, "name": "Malcolm McDowell" }, <div id=”friends”> { <span id=”count”>You have 3 friends:</span> "id": 2, <ul> "name": "Arthur C. Clarke" <li>Malcolm McDowell</li> }, <li>Arthur C. Clarke</li> { <li>Peter Sellers</li> "id": 3, </ul> "name": "Peter Sellers" </div> } ] }
  • 88. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Paul Thomas Anderson</div> "age": 70, "name": "Stanley Kubrick", "gender": "male", "company": "MGM", "phone": "832-547-3983", "email": "pta@ptanderson.com", <a href=”mailto:stanley.kubrick@mgm.com”> "address": "Hertfordshire England", Email Stanley "friends": [ </a> { "id": 1, "name": "Malcolm McDowell" }, <div id=”friends”> { <span id=”count”>You have 3 friends:</span> "id": 2, <ul> "name": "Arthur C. Clarke" <li>Malcolm McDowell</li> }, <li>Arthur C. Clarke</li> { <li>Peter Sellers</li> "id": 3, </ul> "name": "Peter Sellers" </div> } ] }
  • 89. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Paul Thomas Anderson</div> "age": 70, "name": "Stanley Kubrick", "gender": "male", "company": "MGM", "phone": "832-547-3983", "email": "pta@ptanderson.com", <a href=”mailto:stanley.kubrick@mgm.com”> "address": "Hertfordshire England", Email Stanley "friends": [ </a> { "id": 1, "name": "Malcolm McDowell" }, <div id=”friends”> { <span id=”count”>You have 3 friends:</span> "id": 2, <ul> "name": "Arthur C. Clarke" <li>Malcolm McDowell</li> }, <li>Arthur C. Clarke</li> { <li>Peter Sellers</li> "id": 3, </ul> "name": "Peter Sellers" </div> } ] }
  • 90. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Paul Thomas Anderson</div> "age": 70, "name": "Stanley Kubrick", "gender": "male", "company": "MGM", "phone": "832-547-3983", "email": "pta@ptanderson.com", "address": "Hertfordshire England", "friends": [ { "id": 1, "name": "Malcolm McDowell" }, <div id=”friends”> { <span id=”count”>You have 3 friends:</span> "id": 2, <ul> "name": "Arthur C. Clarke" <li>Malcolm McDowell</li> }, <li>Arthur C. Clarke</li> { <li>Peter Sellers</li> "id": 3, </ul> "name": "Peter Sellers" </div> } ] }
  • 91. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Paul Thomas Anderson</div> "age": 70, "name": "Stanley Kubrick", "gender": "male", "company": "MGM", "phone": "832-547-3983", "email": "pta@ptanderson.com", <a href=”mailto:pta@ptanderson.com”> "address": "Hertfordshire England", Email Paul "friends": [ </a> { "id": 1, "name": "Malcolm McDowell" }, <div id=”friends”> { <span id=”count”>You have 3 friends:</span> "id": 2, <ul> "name": "Arthur C. Clarke" <li>Malcolm McDowell</li> }, <li>Arthur C. Clarke</li> { <li>Peter Sellers</li> "id": 3, </ul> "name": "Peter Sellers" </div> } ] }
  • 92. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Paul Thomas Anderson</div> "age": 70, "name": "Stanley Kubrick", "gender": "male", "company": "MGM", "phone": "832-547-3983", <a href=”mailto:pta@ptanderson.com”> "email": "stanley.kubrick@mgm.com", Email Paul "address": "Hertfordshire England", "friends": [ </a> { "id": 1, "name": "Malcolm McDowell" }, <div id=”friends”> { <span id=”count”>You have 3 friends:</span> "id": 2, <ul> "name": "Arthur C. Clarke" <li>Malcolm McDowell</li> }, <li>Arthur C. Clarke</li> { <li>Peter Sellers</li> "id": 3, </ul> "name": "Peter Sellers" </div> } ] ] } }
  • 93. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Paul Thomas Anderson</div> "age": 70, "name": "Stanley Kubrick", "gender": "male", "company": "MGM", "phone": "832-547-3983", <a href=”mailto:pta@ptanderson.com”> "email": "stanley.kubrick@mgm.com", Email Paul "address": "Hertfordshire England", "friends": [ </a> { "id": 1, "name": "Malcolm McDowell" }, <div id=”friends”> { <span id=”count”>You have 3 friends:</span> "id": 2, <ul> "name": "Arthur C. Clarke" <li>Malcolm McDowell</li> }, <li>Arthur C. Clarke</li> { <li>Peter Sellers</li> "id": 3, </ul> "name": "Peter Sellers" </div> } ] ] } }
  • 94. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Paul Thomas Anderson</div> "age": 70, "name": "Stanley Kubrick", "gender": "male", "company": "MGM", "phone": "832-547-3983", <a href=”mailto:pta@ptanderson.com”> "email": "stanley.kubrick@mgm.com", Email Paul "address": "Hertfordshire England", "friends": [ </a> { "id": 1, "name": "Malcolm McDowell" } <div id=”friends”> <span id=”count”>You have 3 friends:</span> <ul> <li>Malcolm McDowell</li> <li>Arthur C. Clarke</li> <li>Peter Sellers</li> </ul> </div> ] ] } }
  • 95. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Paul Thomas Anderson</div> "age": 70, "name": "Stanley Kubrick", "gender": "male", "company": "MGM", "phone": "832-547-3983", <a href=”mailto:pta@ptanderson.com”> "email": "stanley.kubrick@mgm.com", Email Paul "address": "Hertfordshire England", "friends": [ </a> { "id": , "name": } <div id=”friends”> <span id=”count”>You have 3 friends:</span> ] <ul> } <li>Malcolm McDowell</li> <li>Arthur C. Clarke</li> <li>Peter Sellers</li> </ul> </div> ] }
  • 96. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Paul Thomas Anderson</div> "age": 70, "name": "Stanley Kubrick", "gender": "male", "company": "MGM", "phone": "832-547-3983", <a href=”mailto:pta@ptanderson.com”> "email": "stanley.kubrick@mgm.com", Email Paul "address": "Hertfordshire England", "friends": [ </a> { "id": 4 , "name": "Daniel Day Lewis" } <div id=”friends”> <span id=”count”>You have 3 friends:</span> ] <ul> } <li>Malcolm McDowell</li> <li>Arthur C. Clarke</li> <li>Peter Sellers</li> </ul> </div> ] }
  • 97. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Paul Thomas Anderson</div> "age": 70, "name": "Stanley Kubrick", "gender": "male", "company": "MGM", "phone": "832-547-3983", <a href=”mailto:pta@ptanderson.com”> "email": "stanley.kubrick@mgm.com", Email Paul "address": "Hertfordshire England", "friends": [ </a> { "id": 4 , "name": "Daniel Day Lewis" } <div id=”friends”> <span id=”count”>You have 3 friends:</span> ] <ul> } <li>Malcolm McDowell</li> <li>Arthur C. Clarke</li> <li>Peter Sellers</li> </ul> </div> ] }
  • 98. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Paul Thomas Anderson</div> "age": 70, "name": "Stanley Kubrick", "gender": "male", "company": "MGM", "phone": "832-547-3983", <a href=”mailto:pta@ptanderson.com”> "email": "stanley.kubrick@mgm.com", Email Paul "address": "Hertfordshire England", "friends": [ </a> { "id": 4 , "name": "Daniel Day Lewis" } ] } ] }
  • 99. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Paul Thomas Anderson</div> "age": 70, "name": "Stanley Kubrick", "gender": "male", "company": "MGM", "phone": "832-547-3983", <a href=”mailto:pta@ptanderson.com”> "email": "stanley.kubrick@mgm.com", Email Paul "address": "Hertfordshire England", "friends": [ </a> { "id": 4 , "name": "Daniel Day Lewis" } <div id=”friends”> <span id=”count”>You have 1 friend:</span> ] <ul> } <li>Daniel Day Lewis</li> </ul> </div> ] }
  • 100. { "id": 1, "picture": "images/user_1.png", <div id=”user”>Hi, Paul Thomas Anderson</div> "age": 70, "name": "Stanley Kubrick", "gender": "male", "company": "MGM", "phone": "832-547-3983", <a href=”mailto:pta@ptanderson.com”> "email": "stanley.kubrick@mgm.com", Email Paul "address": "Hertfordshire England", "friends": [ </a> { "id": 4 , "name": "Daniel Day Lewis" } <div id=”friends”> <span id=”count”>You have 1 friend:</span> ] <ul> } <li>Daniel Day Lewis</li> </ul> </div> ] }
  • 103. Title View View Layout Container
  • 104. Title View View Layout Container Day Views
  • 105. Title View Time Control View View Layout Container Day Views
  • 106. Title View Time Control View Chosen Time View View Layout Container Day Views
  • 107. Event
  • 108.  Calendar Month
  • 109.  
  • 110.  |
  • 111.  
  • 112.  Week
  • 113.  
  • 114.  |
  • 115.  
  • 116.  Day
  • 118.   M T W TH F S SU 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
  • 119. [{ id: 1, name: Doctors Appt, Event
  • 120.  Calendar Month
  • 121.  
  • 122.  |
  • 123.  
  • 124.  Week
  • 125.  
  • 126.  |
  • 127.  
  • 128.  Day where: Dentist, date: 02-02-2013,
  • 130.   time_start: 2:00pm, time_end: 3:00pm M T W TH F S SU },{ id: 2, name: Ruby Meetup, 1 2 3 4 5 6 7 where: Centergy Bld, date: 02-13-2013, time_start: 7:00pm, },{ time_end: 9:00pm 8 9 10 11 12 13 14 id: 3, name: Buy Flowers!, where: null, date: 02-14-2013, time_start: null, 15 16 17 18 19 20 21 time_end: null },{ id: 4, name: Visit Vet, where: Avian Center, date: 02-24-2013, 22 23 24 25 26 27 28 time_start: 10:00am, time_end: 11:00am }]
  • 131. [{ id: 1, name: Doctors Appt, Event
  • 132.  Calendar Month
  • 133.  
  • 134.  |
  • 135.  
  • 136.  Week
  • 137.  
  • 138.  |
  • 139.  
  • 140.  Day where: Dentist, date: 02-02-2013,
  • 142.   time_start: 2:00pm, time_end: 3:00pm M T W TH F S SU },{ id: 2, name: Ruby Meetup, 1 2 3 4 5 6 7 where: Centergy Bld, Doctors
  • 143.   date: 02-13-2013, Appt time_start: 7:00pm, },{ time_end: 9:00pm 8 9 10 11 12 13 14 id: 3, name: Buy Flowers!, Ruby
  • 144.   Buy
  • 145.   where: null, Meetup Flowers! date: 02-14-2013, time_start: null, 15 16 17 18 19 20 21 time_end: null },{ id: 4, name: Visit Vet, where: Avian Center, date: 02-24-2013, 22 23 24 25 26 27 28 time_start: 10:00am, time_end: 11:00am Visit
  • 146.   }] Vet
  • 147. [{ id: 1, name: Doctors Appt, Event
  • 148.  Calendar Month
  • 149.  
  • 150.  |
  • 151.  
  • 152.  Week
  • 153.  
  • 154.  |
  • 155.  
  • 156.  Day where: Dentist, date: 02-02-2013,
  • 158.   time_start: 2:00pm, time_end: 3:00pm M T W TH F S SU },{ id: 2, name: Ruby Meetup, 1 2 3 4 5 6 7 where: Centergy Bld, Doctors
  • 159.   date: 02-13-2013, Appt time_start: 7:00pm, },{ time_end: 9:00pm 8 9 10 11 12 13 14 id: 3, name: Buy Flowers!, Ruby
  • 160.   Buy
  • 161.   where: null, Meetup Flowers! date: 02-14-2013, time_start: null, 15 16 17 18 19 20 21 time_end: null },{ id: 4, name: Visit Vet, where: Avian Center, date: 02-24-2013, 22 23 24 25 26 27 28 time_start: 10:00am, time_end: 11:00am Visit
  • 162.   }] Vet
  • 163. [{ id: 1, name: Doctors Appt, Event
  • 164.  Calendar Month
  • 165.  
  • 166.  |
  • 167.  
  • 168.  Week
  • 169.  
  • 170.  |
  • 171.  
  • 172.  Day where: Dentist, date: 02-02-2013,
  • 174.   time_start: 2:00pm, time_end: 3:00pm M T W TH F S SU },{ id: 2, name: Ruby Meetup, 1 2 3 4 5 6 7 where: Centergy Bld, Doctors
  • 175.   date: 02-13-2013, Appt time_start: 7:00pm, },{ time_end: 9:00pm 8 9 10 11 12 13 14 id: 3, name: Buy Flowers!, Ruby
  • 176.   Buy