Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Modular applications with Montage Components

Modular applications with Montage Components

There is a growing demand to build increasingly complex mobile applications with HTML5, in part due to its cross-platform nature. However delivering these applications is still very challenging. The Montage framework was designed from the ground up to build complex HTML5 applications. This talk will explain how Montage’s reusable and encapsulated Components provides a natural and effective way to write modular, robust, applications by allowing team members to work on different part at the same time.

Benoit Marchant

April 01, 2013
Tweet

More Decks by Benoit Marchant

Other Decks in Programming

Transcript

  1. modules template mobile component HTML5 encapsulated MVC data-binding promises CommonJS

    declarative BSD serialization package separation of concerns reusable ECMAScript 5 composition TEAM workflow simplify write once battery gpu cpu applications property change listener CSS framework widgets flow repetition condition substitution text button loader list progress slider input audio slot video checkbox radio toggle textfield event cross-platform deferred drawing
  2. Component Assigned one DOM Element MVC Structure From Widget to

    App Specific Deferred Drawing Template
  3. Template Full HTML5 document Resource Encapsulation Object Serialization Great JS

    / CSS Team Work Automatic Dependencies Load .reel HTML JS CSS
  4. Movie Content Navigation Components establish their own API to accept

    data through properties or methods Main Movie Categories Event to change CategoryId Selected CategoryId
  5. <html> ... <body> <div data-montage-id="facade-flow" class="facade-flow"> <div data-montage-id="flow" class="flow flow-fade-out">

    <div data-montage-id="image" class="Image"></div> </div> <div class="film"></div> <div data-montage-id="details"></div> </div> </body> </html> Main.reel/Main.html
  6. <div data-montage-id="facade-flow" class="facade-flow"> <div data-montage-id="flow" class="flow flow-fade-out"> <div data-montage-id="image" class="Image"></div>

    </div> <div class="film"></div> <div data-montage-id="details"></div> </div> Markup Object Serialization <script type="text/montage-serialization"> { "owner": { "properties": { "element": {"#": "facade-flow"} } }, ...
  7. <div data-montage-id="facade-flow" class="facade-flow"> <div data-montage-id="flow" class="flow flow-fade-out"> <div data-montage-id="image" class="Image"></div>

    </div> <div class="film"></div> <div data-montage-id="details"></div> </div> <script type="text/montage-serialization"> { "owner": { "properties": { "element": {"#": "facade-flow"} } }, ...
  8. "flow": { "prototype": "montage/ui/flow.reel", "properties": { "element": {"#": "flow"}, "cameraFov":

    36.99, "cameraTargetPoint": [0, 0, 0], "stride": 1 }, "bindings": { "contentController": {"<-": "@owner.moviesController"} } }, <div data-montage-id="facade-flow" class="facade-flow"> <div data-montage-id="flow" class="flow flow-fade-out"> <div data-montage-id="image" class="Image"></div> </div> <div class="film"></div> <div data-montage-id="details"></div> </div> Module Id
  9. "flow": { "prototype": "montage/ui/flow.reel", "properties": { "element": {"#": "flow"}, "cameraFov":

    36.99, "cameraTargetPoint": [0, 0, 0], "stride": 1 }, "bindings": { "contentController": {"<-": "@owner.moviesController"} } }, <div data-montage-id="facade-flow" class="facade-flow"> <div data-montage-id="flow" class="flow flow-fade-out"> <div data-montage-id="image" class="Image"></div> </div> <div class="film"></div> <div data-montage-id="details"></div> </div> Setting Property Values
  10. "flow": { "prototype": "montage/ui/flow.reel", "properties": { "element": {"#": "flow"}, "cameraFov":

    36.99, "cameraTargetPoint": [0, 0, 0], "stride": 1 }, "bindings": { "contentController": {"<-": "@owner.moviesController"} } }, <div data-montage-id="facade-flow" class="facade-flow"> <div data-montage-id="flow" class="flow flow-fade-out"> <div data-montage-id="image" class="Image"></div> </div> <div class="film"></div> <div data-montage-id="details"></div> </div> data binding
  11. <div data-montage-id="facade-flow" class="facade-flow"> <div data-montage-id="flow" class="flow flow-fade-out"> <div data-montage-id="image" class="Image"></div>

    </div> <div class="film"></div> <div data-montage-id="details"></div> </div> "details": { "prototype": "ui/details.reel", "properties": { "element": {"#": "details"} }, "bindings": { "data": {"<-": "@owner.selectedMovie" } } },
  12. Movie Detail Title Description Date Runtime Audience Critics Trailer Button

    Rent Button data.title data.date actionEvent actionEvent data.criticScore data.synopsis data.runtime data.audienceScore
  13. "trailerButton": { "prototype": "montage/ui/button.reel", "properties": { "element": {"#": "trailer-button"} },

    "listeners": [ { "type": "action", "listener": {"@": "owner"} } ] }, <button data-montage-id="trailer-button">Trailer</button> Listeners
  14. "trailerButton": { "prototype": "montage/ui/button.reel", "properties": { "element": {"#": "trailer-button"} },

    "listeners": [ { "type": "action", "listener": {"@": "owner"} } ] }, <button data-montage-id="trailer-button">Trailer</button> Object Reference
  15. "trailerButton": { "prototype": "montage/ui/button.reel", "properties": { "element": {"#": "trailer-button"} },

    "listeners": [ { "type": "action", "listener": {"@": "owner"} } ] }, handleTrailerButtonAction: { value: function(event) { ... } } handleAction handleEvent Owner EventHandling Method Precedence
  16. Q&A