Introducing Aurelia - Wit-hdip-computer-science.github.io

Transcription

Introducing Aurelia

Agenda SPAs Web Components Aurelia

Single Pages Apps (SPAs) Single Page Applications (SPAs) are a web app served up asa single HTML request. One initial page load of HTML Dynamic features via sophisticated Javascript/AJAXincorporated into the page Built with a client-side MVC (Model View Controller)/MVVM(Model View View-Model) library or framework (Angular,Ember, Aurelia) Interact with Rest backends - using JSON default data format

Key Features of SPAs Back-end language agnostic Apps usually driven by data and events Enhanced Performance & User Experience Decoupling/testability Easier to build/maintain Heavy JS lifting on the client, lighter back-end Easier to provide offline operation

SPA - PerformanceSPA - UX Load time - One file eachof HTML, CSS, JS, staticfiles not dynamic AJAX and SPAs haveraised the bar for userexpectations Less data transfer: XHRcalls only send raw data,not HTML markup Besides actually beingfaster, JS interactions makeapps feel more responsiveLoad distribution:dramatically less load onserver, by distributing it toclients Immediate feedback onclick Smaller data transfermeans faster responses

Web Components A set of features currently being added bythe W3C to the HTML and DOMspecifications that allow for the creationof reusable components in webapplications. Bring component-based softwareengineering to the World Wide Web. The components model allows forencapsulation and interoperability ofindividual HTML elements.

Web Components An emerging standard forthe web development

Polymer Web Components Library Google project to pioneer WebComponent Libraries

Polymer Catalogue

Aurelia“Aurelia is a JavaScript client framework for mobile, desktopand web leveraging simple conventions and empoweringcreativity”Technical Principles: Forward-thinking Modern Architecture Two-Way Databinding Extensible HTML Routing & UIComposition MV* with Conventions Testable Broad Language Support

Forward-thinking Written with next-generationEcmaScript. Integrates with Web Components. No external dependencies. Leverage the technology of the futurebut target today's mobile, desktop andbrowser environments.

Two-Way Databinding Powerful two-way binding to any object. Uses adaptive techniques to select themost efficient way to observe eachproperty in your model Automatically sync UI with best-in-classperformance.

Routing & UI Composition Data-driven UI composition Advanced client-side router: pluggable pipeline dynamic route patterns child routers asynchronous screenactivation

Broad Language Support Use ES5, ES 2015, ES 2016 andTypeScript. Aurelia's APIs were designed tobe consumed these languages

Modern Architecture Not a monolithic framework Composed of smaller, focusedmodules. Use them together as a fullfeatured framework or pick andchoose to build a custom solution.

Extensible HTML HTML compiler supports: creation of custom HTML elements addition of custom attributes toexisting elements controls template generationSupports dynamic loading,databinding and high-performancebatched rendering.

MV* with Conventions Fully integrated MV*architecture Leverages conventions tofacilitate seamless appconstruction Plug in conventions to overrideframework approach

Testable Combines ES 2015 modules with aDependency Injection Container, Facilitates creation of cohesive,minimally coupled code Important for testing

Key Features of SPAs Back-end language agnostic Apps usually driven by data and events Enhanced Performance & User Experience Decoupling/testability Easier to build/maintain Heavy JS lifting on the client, lighter back-end Easier to provide offline operation