SlideShare a Scribd company logo
More native look and feel
  with HTML5 canvas
Cases, advantages, issues and solutions
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
Why?
Why not HTML?
HTML Node - is heavy
to render object.

● Designed for advanced
  layouts, sometimes it is
  useless and harmful
● CSS
● Legacy properties, logic
Why canvas?
One DOM interface - unlimited number of
objects, so much more easier to render.
Why canvas?
Using canvas for UI components rendering is
very close to event delegation - you delegate
not only events but rendering as well.
Cases
Typical cases

Responsible components with transformation of
many objects.

              DOM example
             CANVAS example
Typical cases

DOM interface decoration with animated
objects.

              DOM example
             CANVAS example
Typical cases
For example - you`ll need to draw timelines like
this with DOM. How many DIVs will you need?
?
Your case
Anti-cases
Anticases
Small amount of objects without transforms or
transitions / animations are enought.
Anticases
Your objects have
to include content
with advanced layout.
And much more...
CANVAS is not a silver bullet for HTML
perfomance...
Big canvas - bad canvas?
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.
Canvas UI development issues
Because of previous issue - you`ll need batch
assets resizing for different screen sizes.
Canvas UI development issues
Using large universal engines
seems to be wrong way sometimes.

There is space for
your own wheel.
?
Questions
Thanks =)
Denis Radin
PixelsCommander.com




Special thanks to FlashJS
engine - www.flashjs.com

More Related Content

KEY
Canvas Deep Dive
KEY
Rockstar Graphics with HTML5 @Media UK
PDF
Building JavaScript Apps for Force.com with EmberJS
PDF
Choosing your animation adventure - Generate NYC 2018
PDF
20111129 modernizr
PPTX
Standards and guides in web design
PPTX
Html5 & css3
PDF
Front-end Tools: Sifting Through the Madness
Canvas Deep Dive
Rockstar Graphics with HTML5 @Media UK
Building JavaScript Apps for Force.com with EmberJS
Choosing your animation adventure - Generate NYC 2018
20111129 modernizr
Standards and guides in web design
Html5 & css3
Front-end Tools: Sifting Through the Madness

Similar to More native look and feel of mobile JS applications with HTML5 canvas (20)

PPTX
Stc 2015 preparing legacy projects for responsive design - technical issues
PDF
Building a game engine with jQuery
PPTX
101207 raphael
PPT
Intro to-html-backbone
PPTX
Academy PRO: D3, part 3
PDF
The Modern Web, Part 2: HTML5
KEY
20120802 timisoara
PDF
Node PDX: Intro to Sails.js
PPTX
Practical html5
PDF
Maintainable Javascript carsonified
PPTX
JS digest. July 2018
PDF
Html 5 mobile - nitty gritty
PPT
Image video processing and canvas element by Abhay Rao
PDF
From Flash to Canvas - a penchant for black holes
PDF
Quantum. Just Quantum
PDF
Intro to mobile web application development
PPTX
Spectrum 16 pmc 16 - preparing legacy projects for responsive design
PDF
What is HTML5
PPTX
Custom WordPress Development Company USA
PDF
Dita for the web: Make Adaptive Content Simple for Writers and Developer
Stc 2015 preparing legacy projects for responsive design - technical issues
Building a game engine with jQuery
101207 raphael
Intro to-html-backbone
Academy PRO: D3, part 3
The Modern Web, Part 2: HTML5
20120802 timisoara
Node PDX: Intro to Sails.js
Practical html5
Maintainable Javascript carsonified
JS digest. July 2018
Html 5 mobile - nitty gritty
Image video processing and canvas element by Abhay Rao
From Flash to Canvas - a penchant for black holes
Quantum. Just Quantum
Intro to mobile web application development
Spectrum 16 pmc 16 - preparing legacy projects for responsive design
What is HTML5
Custom WordPress Development Company USA
Dita for the web: Make Adaptive Content Simple for Writers and Developer
Ad

More from Denis Radin (10)

PDF
Mining crypto in browser as a bleeding edge performance challenge for the Web...
PDF
Pixel shaders based UI components + writing your first pixel shader
PDF
Migrating your Web app to Virtual Reality
PDF
Building native apps with web components
PDF
Applying NASA coding guidelines to JavaScript or airspace is closer than you ...
PDF
1.Loading
PDF
HTML GL - 60 FPS and amazing effects by rendering HTML/CSS in WebGL, framewor...
PDF
Front-end tower of Babylon
ODP
JavaScript and HTML in shipbuilding and aircraft industries
PPT
FlAnalyzer
Mining crypto in browser as a bleeding edge performance challenge for the Web...
Pixel shaders based UI components + writing your first pixel shader
Migrating your Web app to Virtual Reality
Building native apps with web components
Applying NASA coding guidelines to JavaScript or airspace is closer than you ...
1.Loading
HTML GL - 60 FPS and amazing effects by rendering HTML/CSS in WebGL, framewor...
Front-end tower of Babylon
JavaScript and HTML in shipbuilding and aircraft industries
FlAnalyzer
Ad

More native look and feel of mobile JS applications with HTML5 canvas