6. Code libraries
●jQuery — fixes DOM
●Underscore — fills ECMAScript 3-5 gap
●Backbone — brings MV*
●They are created to fix Web
For some historical reasons many good tools are libraries.
The DOM is a Mess 2009
06
23. Components are standalone
●Contain all dependencies
–Most of them are external
●Easy to reuse
– bower i name
– npm i name
●It is simple to use a part
23
25. Components are isolated
●Do not interfere with others
–Scoped CSS
–Flexible layout
–No globals leak
●Have restricted access to others
– require()
25
27. WebComponents
●Idea of Custom HTML Elements
●API/Framework
–Shadow DOM (Encapsulation)
–HTML Imports & Templates
–Template Binding
Web components and the future of web development from MR 2013
27
28. WebComponents in 2014
HTML Templates
Shadow DOM
Custom Elements
HTML Imports
It is possible to polyfill others using Polymer.
28
29. Alternatives for these APIs
WebComponents API Alternative
Custom Elements Component engines
Shadow DOM BEM Methodology
HTML Templates Template engines
HTML Imports Build tools
Scoped CSS BEM or OOCSS
Template Binding Data binding
29
32. BEM briefly
●Avoid CSS cascade
●Block — Custom Element
●Element — Shadow DOM
●Modifier — Component State
Maintainable frontend development with BEM from MR 2013
32