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

Angular Evolution

Angular Evolution

Let’s understand about AngularJS and Angular, see some important points behind of all Angular ecosystem evolution that goes beyond of just a “JS Framework”, check the goals of Angular team had to make and improve the new version of this ecosystem.

Rodolfo Dias

March 18, 2017
Tweet

More Decks by Rodolfo Dias

Other Decks in Programming

Transcript

  1. EvOlUTioN 3VOLUT1ON? "It’s a process where it has continuous and

    progressive modification, changing the element state." Dicio
  2. EvOlUTioN 3VOLUT1ON? "Evolution is change in the heritable characteristics of

    biological populations over successive generations. Evolutionary processes give rise to biodiversity at every level of biological organization, including the levels of species, individual organisms, and molecules." wikipedia
  3. "Adaptation is the process that makes organisms better suited to

    their habitat. Also, the term adaptation may refer to a trait that is important for an organism's survival." wikipedia AD4PTAT10N
  4. The Angular purpose is to be an application platform which

    is easy to learn and meets all the needs established. ANGUL4R EVOLUTION…
  5. EvOlUTioN - Performance - Learning Curve - Web Components friendly

    - Support for native mobile - iOS and Android MAIN GOALS TO 3VOLUT1ON
  6. EvOlUTioN - Performance - Learning Curve - Web Components friendly

    - Support for native mobile - iOS and Android
 - Server side rendering MAIN GOALS TO 3VOLUT1ON
  7. EvOlUTioN - Performance - Learning Curve - Web Components friendly

    - Support for native mobile - iOS and Android
 - Server side rendering - Angular migration MORE… MAIN GOALS TO 3VOLUT1ON
  8. EvOlUTioN - Performance - Learning Curve - Web Components friendly

    - Support for native mobile - iOS and Android
 - Server side rendering - Angular migration MORE… MAIN GOALS TO 3VOLUT1ON
  9. - START USE PURE ES SYNTAX - IMPROVE STACK TRACES

    - LESS “ANGULARJS WAY" HOW TO IMPROVE IT?
  10. DIRECTIVE -> COMPONENT & DIRECTIVE SERVICE & FACTORY -> INJECTABLE

    FILTER -> PIPE WHAT CHANGES WITH THOSE CHOICES??
  11. DIRECTIVE -> COMPONENT & DIRECTIVE SERVICE & FACTORY -> INJECTABLE

    FILTER -> PIPE APP -> MODULE/COMPONENT MORE… WHAT CHANGES WITH THOSE CHOICES??
  12. DIRECTIVE -> COMPONENT angular .module(‘app.myElement') .directive('myElement', myElement); function myElement() {

    var directive = { templateUrl: '/my-element.html', controller: myElementController, restrict: 'E' }; return directive; } function myElementController() { /* */ } 1.4.X
  13. DIRECTIVE -> COMPONENT import { myComponentController } from './my-component.controller'; export

    const myComponent: angular.IComponentOptions = { bindings: { ... }, controller: myComponentController, template: `<section id="my-component">...</section>` } 1.5.X + TS
  14. DIRECTIVE -> COMPONENT import { myComponent } from ‘./my-component.component'; export

    const myComponentModule = angular .module('app.myComponent', []) .component('myComponent', myComponent) .name; 1.5.X + TS
  15. DIRECTIVE -> COMPONENT import { Component } from '@angular/core'; @Component({

    selector: 'my-element', template: `<h1>My Element</h1>`, styles: ['./my-element.css'] }) export class MyElementComponent { constructor() { } }
  16. DIRECTIVE -> COMPONENT import { Component } from '@angular/core'; @Component({

    selector: 'my-element', template: `<h1>My Element</h1>`, styles: ['./my-element.css'] }) export class MyElementComponent { constructor() { } } <my-element></my-element>
  17. DIRECTIVE -> DIRECTIVE angular .module('app.myDirective') .directive('myDirective', myDirective); function myDirective() {

    var directive = { link: link, restrict: 'A' }; return directive; function link(scope, element, attrs) { /* */ } } 1.4.X
  18. DIRECTIVE -> DIRECTIVE import { Directive, ElementRef, Input } from

    '@angular/core'; @Directive({ selector: '[myDirective]'}) export class myDirective { constructor(private el: ElementRef <any>) { } @Input('myDirective') myDirective: string; }
  19. DIRECTIVE -> DIRECTIVE import { Directive, ElementRef, Input } from

    '@angular/core'; @Directive({ selector: '[myDirective]'}) export class myDirective { constructor(private el: ElementRef <any>) { } @Input('myDirective') myDirective: string; } <div *myDirective=“Angular Meetup Berlin”>...</div>
  20. SERVICE & FACTORY -> INJECTABLE export class myService { static

    $inject = ['$http']; constructor( private $http ) { } } 1.5.X + TS
  21. SERVICE & FACTORY -> INJECTABLE import { myService } from

    './my-service.service' angular .module('app') .service('myService', myService) .name; 1.5.X + TS
  22. SERVICE & FACTORY -> INJECTABLE import { Injectable } from

    '@angular/core'; import { Http } from '@angular/http'; @Injectable() export class MyService { constructor( private http : Http ) { } }
  23. import { Pipe, PipeTransform } from '@angular/core'; @Pipe({name: 'myCustomPipe'}) export

    class MyCustomPipe implements PipeTransform { transform(value: string): any { return { // something } } } FILTER -> PIPE
  24. APP -> MODULE/COMPONENT import { NgModule } from ‘@angular/core'; import

    { BrowserModule } from '@angular/platform-browser'; import { AppComponent } from ‘./app.component'; import { appHeader } from ‘./app-header.component'; import { appMain } from ‘./app-main.component’; import { myService } from './my-service.service'; @NgModule({ imports: [BrowserModule, appHeader, appMain], providers: [myService], declarations: [AppComponent], entryComponents: [AppComponent] }) export class AppModule { ngDoBootstrap() {} }
  25. APP -> MODULE/COMPONENT import { Component } from '@angular/core'; import

    { myDirective } from './my-directive.directive'; @Component({ selector: 'my-app', directives: [myDirective], template: ` <app-header></app-header> <app-main></app-main> ` }) export class AppComponent { constructor() { } }
  26. APP -> MODULE/COMPONENT import { Component } from '@angular/core'; import

    { myDirective } from './my-directive.directive'; @Component({ selector: 'my-app', directives: [myDirective], template: ` <app-header></app-header> <app-main></app-main> ` }) export class AppComponent { constructor() { } } <my-app></my-app>
  27. EvOlUTioN MAINS GOALS TO 3VOLUT1ON - Performance - Learning Curve

    - Web Component friendly - Support for native mobile - iOS and Android
 - Server side rendering - Angular 2 migration MORE…