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

Native look and feel of mobile JS interfaces with HTML5 canvas

fwdays
March 05, 2013

Native look and feel of mobile JS interfaces with HTML5 canvas

fwdays

March 05, 2013
Tweet

More Decks by fwdays

Other Decks in Programming

Transcript

  1. How to compare DOM and CANVAS? We will use FlashJS

    engine. It have CANVAS and DOM renderers, so we can launch same code in both ways. flashjs.com
  2. Why not HTML? HTML Node - is heavy to render

    object. • Designed for advanced layouts, sometimes it is useless and harmful • CSS • Legacy properties, logic
  3. Why canvas? Using canvas for UI components rendering is very

    close to event delegation - you delegate not only events but rendering as well.
  4. Typical cases For example - you`ll need to draw timelines

    like this with DOM. How many DIVs will you need?
  5. Frameworks Probably you`ll need easy to use interfaces for sprites,

    animations, scales, nested objects and much more, but HTML5 canvas API is too low level thing - you`d better to use frameworks.
  6. Canvas UI development issues Because of previous issue - you`ll

    need batch assets resizing for different screen sizes.
  7. Canvas UI development issues Using large universal engines seems to

    be wrong way sometimes. There is space for your own wheel.