front-end architecture on multibrand

51
The Front-End architecture on Multibrand David Dias - Front-End architect April 2016 / Proximity BBDO Indian Ocean

Upload: david-dias

Post on 15-Apr-2017

92 views

Category:

Internet


4 download

TRANSCRIPT

Page 1: Front-End architecture on Multibrand

The Front-End architecture on Multibrand

David Dias - Front-End architect April 2016 / Proximity BBDO Indian Ocean

Page 2: Front-End architecture on Multibrand

front-end Architecture is important...

Page 3: Front-End architecture on Multibrand

... and it's not just about HTML and CSS.

Page 4: Front-End architecture on Multibrand

We faced daily a lot of challenges

Page 5: Front-End architecture on Multibrand

AccessibilitySEO

QualityPerformance

Maintainability*Browser compatibility

Page 6: Front-End architecture on Multibrand

»Martin Golding

« Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. »

Page 7: Front-End architecture on Multibrand

But in 2013, we faced a new challenge(at that time, lot of new tools come out into the front-end world)

Page 8: Front-End architecture on Multibrand

Build few projects with same code base?

Page 9: Front-End architecture on Multibrand
Page 10: Front-End architecture on Multibrand

We decide to use the best of the front-end technologies

Page 11: Front-End architecture on Multibrand

»

Page 12: Front-End architecture on Multibrand

»

Page 13: Front-End architecture on Multibrand

First, we needed to automate tasks

To work better, faster and maintain the code...

Page 14: Front-End architecture on Multibrand

201520132016

+

Page 15: Front-End architecture on Multibrand
Page 16: Front-End architecture on Multibrand

- Build fonts: convert icons in SVG to .ttf, .woff, .eot webfonts

- Build images: optimize all layout's images (performance)

- Dev reload: reload automatically the page after modifications

- Dev js: concatenate and minify all JavaScript files

- ...

Page 17: Front-End architecture on Multibrand

Extend the possibilities of simple HTML files

Page 18: Front-End architecture on Multibrand

PUG

Page 19: Front-End architecture on Multibrand
Page 20: Front-End architecture on Multibrand

PUG (jade)

HTML

Page 21: Front-End architecture on Multibrand

Dynamise our CSS files

Page 22: Front-End architecture on Multibrand
Page 23: Front-End architecture on Multibrand

CSS culture

• Strong nomenclature: c- (component), l- (layout), u- (utility)...

• CSS guidelines rules

• Based on OOCSS, SMACSS and BEM

Page 24: Front-End architecture on Multibrand

Modularize all the JS files

Page 25: Front-End architecture on Multibrand

201520142016

Page 26: Front-End architecture on Multibrand
Page 27: Front-End architecture on Multibrand

Bring NODE.js advantages to the browser

(Modularity, NPM import packages...)

Page 28: Front-End architecture on Multibrand
Page 29: Front-End architecture on Multibrand

A day with a FRONT-END

Page 30: Front-End architecture on Multibrand

specifications

wireframes

technical documentation

creatives (+ styleguide)

Page 31: Front-End architecture on Multibrand

creative analysis and feedbacks

creation component / page

styling and dynamise

regression testing

Page 32: Front-End architecture on Multibrand

How we see the futur? (next weeks)

Page 33: Front-End architecture on Multibrand

new RULES

Page 34: Front-End architecture on Multibrand

ECMAScript 6 A bright new future is coming...

Page 35: Front-End architecture on Multibrand
Page 36: Front-End architecture on Multibrand

more MODULARITY

Page 37: Front-End architecture on Multibrand

HTML (Pug) +

CSS (PostCSS) +

JS (React.js?)

= ONE component / ONE folder

Page 38: Front-End architecture on Multibrand
Page 39: Front-End architecture on Multibrand
Page 40: Front-End architecture on Multibrand

page.psdcomponent A.psd

component B.psd

component C.psd

component A.pug

component B.pug

component C.pug

+ css + js

+ css + js

+ css + js

styleguide

Score - Sitecore

Page 41: Front-End architecture on Multibrand

component A + component B.1 + component C

component A1 + component B + component C3

Article page

styleguide

Static page

Page 42: Front-End architecture on Multibrand
Page 43: Front-End architecture on Multibrand

more AUTOMATION

Page 44: Front-End architecture on Multibrand

Replace manual FTP update with

continuous integration

Page 45: Front-End architecture on Multibrand
Page 46: Front-End architecture on Multibrand

more TESTING / QUALITY

Page 47: Front-End architecture on Multibrand

JavaScript Unit Testing

Page 48: Front-End architecture on Multibrand
Page 49: Front-End architecture on Multibrand

Demos

Page 50: Front-End architecture on Multibrand

Questions?

Page 51: Front-End architecture on Multibrand

Thank you Obrigado

Merci