mage titans - magento 2 frontend framework - ui components
TRANSCRIPT
Building pretty anything with Magento 2 frontend framework
Vitaliy Korotun, Magento, Architect
complex forms
UI Components
853 PRs closed and 277+1 open
Open-source software may be developed in a collaborative public manner
Standardization
MODULAR RequireJS
GRANULAR 386 VS 12K
CONFIGURABLE RequireJS
EXTENSIBLE RequireJS + Module
Interceptors
REUSABLE UI Components + (no
inline JS)
DI RequireJS +
Module Interceptors
aka mixins
Sync
Async
Shared
Private
Server-side
Client-side
Classic
Single Page
One-Flush
Progressive
Backend
Storefront
PHTML
(X)HTML
Unification
AND
IsolationNo standard <form> tag
Each component instance in separate namespace
Bare HTML includes are allowed (“data-form-part” attribute is required)
Interaction2-way Data Binding (with KnockoutJS)
uiRegistry – is a components locator. Methods: get/set/has/promise
Comprehensive linking capabilities (with links/imports/exports/tracks properties)
Performance
Collapsed tabs are initializedbut not rendered
JavaScript files bundling
Optimized rendering flow both for forms (>2.1.3) and grids (>2.0.0)
Values updated but not base grid markup
Extensibility
UIC XML declaration/configuration files merged across all modules and themes
RequireJS “Mixins” (aka Module Interceptors) to customize original modules constructors
$.async to manipulate with DOM within the asynchronous rendering environment
Down the road
XML Layout
Blocks
PHTML Templates
Inline JavaScript
Course grain JavaScript
XML UIC Layout
UI Components
Unified Templates
Modular JavaScript
Fine grain JavaScript
Futureability
PHTML | XHTML | TWIG | ELSE
LESS | SASS | POST CSS | ELSE
REACT | ANGULAR2 | AURELIA | ELSE
REQUIREJS | WEBPACK | ELSE
ES6 + NODE JS | NOTHING ELSE