44
Adaptive Templating in SPA(s) and/or other corporate environments

Adaptive templating in SPA(s) and/or other corporate environments

Embed Size (px)

DESCRIPTION

Presentation about how to apply in an adaptive-responsive way multiple javascript templates for different clients in a single page application.

Citation preview

Page 1: Adaptive templating in SPA(s) and/or other corporate environments

Adaptive Templatingin SPA(s) and/or other corporate environments

Page 2: Adaptive templating in SPA(s) and/or other corporate environments

P001

P002

Randy Daal “randynamic”

[email protected]

Volkert Paap

“paapster”

[email protected]

Page 3: Adaptive templating in SPA(s) and/or other corporate environments

This presentation is...• part (imaginary) case study!

• part lessons learned!

• part future-thinking

Page 4: Adaptive templating in SPA(s) and/or other corporate environments

• Based on something new @dutch bank!

• It’s a new core product introducing a new way of personal banking!

• It’s technically based on an adaptive-responsive SPA(s) app

Case studyunfortunately not yet

public as of May 2014 :-(

Page 5: Adaptive templating in SPA(s) and/or other corporate environments

Site goals of the client• Give end-users a personal (banking) environment!

• End-users will have access to their (bank) service everywhere!

• Experiment with new design to support multi device!

• Audience will be global and using a wide range of target devices

Page 6: Adaptive templating in SPA(s) and/or other corporate environments

What is responsive?

• Responsive web design is a design approach aimed at crafting sites to provide an optimal viewing experience - easy reading and navigation with a minimum of resizing, panning, and scrolling - across a wide range of devices...

Shorthand “RWD”

http://en.wikipedia.org/wiki/Responsive_web_design

Page 7: Adaptive templating in SPA(s) and/or other corporate environments

What is responsive?

Page 8: Adaptive templating in SPA(s) and/or other corporate environments

What is responsive?

Page 9: Adaptive templating in SPA(s) and/or other corporate environments

What is adaptive?

• Adaptive websites are designed to respond and adapt to different screen sizes, using responsive techniques, and to adapt to different User requirements based on different device capabilities.

Shorthand “AWD”

http://en.wikipedia.org/wiki/Adaptive_web_design

Page 10: Adaptive templating in SPA(s) and/or other corporate environments

What is adaptive?

Page 11: Adaptive templating in SPA(s) and/or other corporate environments

What is adaptive?

Page 12: Adaptive templating in SPA(s) and/or other corporate environments

Comparing RWD & AWD• Mostly CSS only!

• Slightly different in approach

Page 13: Adaptive templating in SPA(s) and/or other corporate environments
Page 14: Adaptive templating in SPA(s) and/or other corporate environments
Page 15: Adaptive templating in SPA(s) and/or other corporate environments

+ all the “normal” usual suspects

Mobile

Desktop

Page 16: Adaptive templating in SPA(s) and/or other corporate environments

=== (too) many combinations

Page 17: Adaptive templating in SPA(s) and/or other corporate environments

Imagine you have this

Page 18: Adaptive templating in SPA(s) and/or other corporate environments

And you need to support this

Page 19: Adaptive templating in SPA(s) and/or other corporate environments

Really? Is this all the space?

Page 20: Adaptive templating in SPA(s) and/or other corporate environments

An example of a case study

1

2

Page 21: Adaptive templating in SPA(s) and/or other corporate environments

An example of the case study2 31

Page 22: Adaptive templating in SPA(s) and/or other corporate environments

With a couple of extra requirements

Page 23: Adaptive templating in SPA(s) and/or other corporate environments

With a couple of extra requirements

Page 24: Adaptive templating in SPA(s) and/or other corporate environments

With a couple of extra requirements

Page 25: Adaptive templating in SPA(s) and/or other corporate environments

Where do RWD meets AWD?• At the point where you can optimise the most for the client!

• Where UX wants to have an optimised user experience

• Do you really want to send HTML/CSS/JS to the client which is not used?

Page 26: Adaptive templating in SPA(s) and/or other corporate environments

You can’t get there from here• Development of only single HTML-views makes it

difficult near-impossible to then think adaptive

Page 27: Adaptive templating in SPA(s) and/or other corporate environments

How

Page 28: Adaptive templating in SPA(s) and/or other corporate environments

Something about JS template languages

• JS TPL help in many ways

• There are plenty languages to choose from (TPL chooser)

• It started with Mustache based on Ctemplate & ET

http://garann.github.io/template-chooser/http://www.jsdb.io/application-tools/templating/?sort=trending

Shorthand “JS TPL”

http://en.wikipedia.org/wiki/Mustache_(template_system)

Page 29: Adaptive templating in SPA(s) and/or other corporate environments

Why do we benefit from JS TPL• Separation of concerns

• Logic-less

• DRY

• Run on client- and server side

• TPL can be precompiled to JS

• Fast

• Can be fed with different types of data

Page 30: Adaptive templating in SPA(s) and/or other corporate environments

How does JS TPL work

Page 31: Adaptive templating in SPA(s) and/or other corporate environments

Having more JS TPL, for different devices and the

advisor

Page 32: Adaptive templating in SPA(s) and/or other corporate environments

• You’ve got (the perfect) conditions, to make your life easy

The best My favourite ideal conditions

Page 33: Adaptive templating in SPA(s) and/or other corporate environments

The SPA architecture concept

Page 34: Adaptive templating in SPA(s) and/or other corporate environments

Lessons learned• Not everybody is ready for it

• UX is overwhelmed with the amount of possibilities

• Developers….

• Component based building becomes almost a requirment

• But it’s great to use!

Page 35: Adaptive templating in SPA(s) and/or other corporate environments

Future thinking• It’s just great and very useful

• The possibilities are endless

• But we need to be very careful, because overkill is created easily

Page 36: Adaptive templating in SPA(s) and/or other corporate environments

The solution in code

Page 37: Adaptive templating in SPA(s) and/or other corporate environments

The page

Page 38: Adaptive templating in SPA(s) and/or other corporate environments

Bootstrap

Page 39: Adaptive templating in SPA(s) and/or other corporate environments

The component

https://github.com/FrontMen/curl-adaptive-handlebars

Page 40: Adaptive templating in SPA(s) and/or other corporate environments

The advisor

Page 41: Adaptive templating in SPA(s) and/or other corporate environments

The templates

Page 42: Adaptive templating in SPA(s) and/or other corporate environments
Page 43: Adaptive templating in SPA(s) and/or other corporate environments

Questions?