Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How to to choose your next JavaScript Web Frame...

How to to choose your next JavaScript Web Framework?

Emmanuel DEMEY

January 26, 2018

Transcript

72 slides
  1. AGENDA • Component approach ◦ What is a component ?

    ◦ Webcomponents, Polymer. • Popular Frameworks/Librairies ◦ Angular ◦ React ◦ Vue.js • Patterns ◦ Flux, Redux • JS Mobile ◦ Hybrid / Natives / PWA Applications
  2. API • Component parameters ◦ @Input() • Component state ◦

    private myState: boolean; • Templating ◦ Directives: *ngIf, *ngFor, [ngClass] • Component Lifecycle ◦ ngOnChanges ◦ ngOnInit ◦ ngOnDestroy ◦ etc... ◦ @Injectable() ◦ @Pipe() • Elements ◦ @NgModule() ◦ @Component() export class MyComponent {}
  3. DEPENDENCY INJECTION • More powerful than AngularJS • Providers ◦

    Global configuration : @NgModule ◦ Local configuration : @Component • Dependency Injection ◦ With constructor parameters in a class ◦ @Injectable inside a Service
  4. JSX

  5. JSX

  6. VIRTUAL DOM PATCH Set <h1> to “Marcel” <h1> Docker </h1>

    Virtual DOM Before <h1> Marcel </h1> Virtual DOM After DIFF 1 <h1> Docker </h1> Real DOM Before <h1> Marcel </h1> Real DOM After APPLY 2
  7. API • Create a component ◦ createClass ◦ extends Component

    ◦ pure function • Component parameter ◦ props • Component state ◦ state • Templating ◦ JSX • Component Lifecycle ◦ componentWillMount ◦ componentDidMount ◦ etc...
  8. API • Create a component ◦ Vue.component() • Component parameters

    ◦ props: [] • Component state ◦ data: () => {} • Templating ◦ Directives: v-bind, v-on... • Component Lifecycle ◦ beforeCreate ◦ mounted ◦ beforeDestroy ◦ etc...
  9. COMPLEX COMPONENT-ORIENTED ARCHITECTURE C C C C C C C

    state state state state state state state

More Decks by Emmanuel DEMEY

Other Decks in Programming