jsf 2.3: integration with front-end frameworks

17
Text JSF 2.3 Responsive Web Design + Single-Page Applications by Ian Hlavats

Upload: ian-hlavats

Post on 27-Nov-2014

573 views

Category:

Technology


2 download

DESCRIPTION

This presentation will be shared at JavaOne 2014 during the JSF BOF session. It outlines the new generation of front-end frameworks and technologies and how JSF 2.3 can better support them.

TRANSCRIPT

Page 1: JSF 2.3: Integration with Front-End Frameworks

Text

JSF 2.3Responsive Web Design + Single-Page Applications by Ian Hlavats

Page 2: JSF 2.3: Integration with Front-End Frameworks

Industry Trends

Rise of Front-End Frameworks

Responsive Web Design (Bootstrap, Foundation)

Single Page Applications (AngularJS, Ember.js)

Page 3: JSF 2.3: Integration with Front-End Frameworks

ResponsiveWeb Design• Flexible grid system• Adapts to device• Mobile-first approach

Page 4: JSF 2.3: Integration with Front-End Frameworks

Bootstrap /Foundation• Bootstrap is #1

project on GitHub• Cross-browser RWD• SASS/LESS support• Reusable UI

components

Page 5: JSF 2.3: Integration with Front-End Frameworks

Next-Gen CSS

• Pre-processors• Variables• Functions• Mixins• Better syntax• Modular

organization

Page 6: JSF 2.3: Integration with Front-End Frameworks

Single Page Applications (SPA)

One top-level HTML page (template)

Many partial HTML pages loaded via DOM changes

Client-side MVC with JavaScript API

JSON/REST based on thin-server architecture

Page 7: JSF 2.3: Integration with Front-End Frameworks

Enhanced HTML with custom elements and attributes

Modular architecture

Models, views, controllers, services, factories, filters, …

Two-way data binding

Custom directives for reusable UI components

AngularJS

Page 8: JSF 2.3: Integration with Front-End Frameworks

Transpiler Languages

Object-oriented

Support interfaces, classes, generics, inheritance

Type-safe

Modular

Compile to JavaScript

Page 9: JSF 2.3: Integration with Front-End Frameworks

Grunt task runnerModular build tool based on Node.js

Compiles TypeScript to JavaScript

Runs Karma unit tests, JSHint static analyzer

Optimizes assets for production

Page 10: JSF 2.3: Integration with Front-End Frameworks

Bower

Dependency manager for JavaScript libraries

Searchable registry to find and download common libraries

Assumes all libraries are available in public/private Git repos

Looks for bower.json to declare dependencies

Page 11: JSF 2.3: Integration with Front-End Frameworks

Great, so what does this all mean for JSF?

Page 12: JSF 2.3: Integration with Front-End Frameworks

SWOT Assessment: JSF

Strengths

Components/RenderKits

Managed Beans

Weaknesses

Server-centric

Library incompatibilities

Opportunities

Better support for front-end frameworks and responsive web design

Threats

Obsolescence

Page 13: JSF 2.3: Integration with Front-End Frameworks

How can we make JSF 2.3 better?

Page 14: JSF 2.3: Integration with Front-End Frameworks

Integrate, Engage, EmbraceIntegrate with front-end technologies and frameworks

Engage with wider developer community

Embrace change and modernization

Page 15: JSF 2.3: Integration with Front-End Frameworks

Integration Ideas

Let’s start with AngularJS + Bootstrap + TypeScript

Write new standard/core RenderKits that target AngularJS directives/filters

Use BootStrap for responsive web design

Page 16: JSF 2.3: Integration with Front-End Frameworks

Integration Ideas

Support JAX-RS annotations on managed beans

Implement SPA support for AngularJS (security features, URL resolution, resource loading)

Distribute JSF component libraries via Bower

Page 17: JSF 2.3: Integration with Front-End Frameworks

Let’s discuss!