SlideShare una empresa de Scribd logo
1 de 39
Descargar para leer sin conexión
#vdt15 @carlobonamico
Angular 1.x reloaded:
improve your app now! and get ready for 2.0
Carlo Bonamico
NIS s.r.l. / JUG Genova
carlo.bonamico@nispro.it
#vdt15 @carlobonamico
Waiting for Angular 2.0
● As development proceeds and details emerge, growing excitement
for what the new release will bring:
– full support for Web Components
● which often require custom integration directives in AngularJS 1.x
– full support for ES6
● particularly module system
– better performance
– better tooling support
● smart autocompletion, development-time validation
– first-class mobile support
● By the way, go watch Misko and Rado Kirov ng-conf Day 2 keynote
– videos for all other talks also available
● https://www.youtube.com/watch?v=-dMBcqwvYA0&index=21&list=PLOETEcp3DkCoNnlhE-7fov
YvqwVPrRiY7
https://angular.io 
#vdt15 @carlobonamico
Yes, but... The questions we are all asking
● Do I start learning/using 2.0 now? or when?
● Will I be forced to use ES6 or Typescript?
● Will I have to rewrite some/most/all of my 1.x code?
● By the way, what the *** is this new syntax?
[disabled]=”comp.disabled” (click)=”comp.enable()”
● How about a migration path?
● Do I have to wait until 2016 to get 2.0 advantages in my app?
#vdt15 @carlobonamico
Some (preliminary) answers
● Do I start learning/using 2.0 now? or when?
learning, now! using... not until beta/RC
● Will I be forced to use ES6 or Typescript?
NO! although you will get benefits it you do
● Will I have to rewrite some/most/all of my 1.x code?
definitely NOT ALL – more about this later
● By the way, what the *** is this new syntax?
[disabled]=”comp.disabled” (click)=”comp.enable()”
better semantics! Web Components!
● How about a migration path?
● Do I have to wait until 2016 to get 2.0 advantages?
NO! see next slides...
● So... – and start getting ready!
Disclaimer: 
1) Info up­to­date 
in April 2015.
2) May change: 
additions possible
major API changes 
look unlikely
 
3) I am not in the 
Angular team.
All mistakes &
misinterpretations
 are mine :­)
#vdt15 @carlobonamico
You can improve your 1.x app now,
AND make adoption of 2.0 easier
● Use new (and 2.x friendly) constructs
– controllerAs
– new bindToController directive syntax
● Follow 2.0 Design Patterns now
– components all the way down
● Use “dual mode” libraries supporting both versions
– angular new router
– i18n
– more to follow...
● Take advantage of ES6 / TypeScript
This talk is
shares our experience
in adopting these approaches
in real-world projects
#vdt15 @carlobonamico
What's new in 1.3/1.4?
● Apparently, small things
– but they do enable big changes in the way we develop Angular apps
● Besides, both releases achieve a significant performance increase
– 1.3 improves DOM manipulation
● 4.3 times faster with 73% less garbage
– 1.3 optimizes change detection
● 3.5 times faster digest with 87% less garbage
– 1.4 brings even more tuning
– you do not need to change your code :-)
● So move to 1.3 NOW!
– and to 1.4 in a few weeks (it's RC0 as of today)
#vdt15 @carlobonamico
Angular 1.x reloaded – 1: controllerAs
● Avoid injecting $scope in the controller
● Put the controller instance IN the scope
● HTML
<div ng­controller=”ComposerController as msgComposer”>
{{msgComposer.message.subject}}
<button ng­click=”msgComposer.send()”>
</div>
● JS
function ComposerController(MailService)  //no $scope!
{
this.message = { subject : “Hello World” };
this.send = function () { MailService.send(this.message); };
}
angular.module(“mailApp”).controller(“ComposerCtrl”, ComposerController)
Examples for a fictional
gmail-like webmail
#vdt15 @carlobonamico
Advantages
● More readable code
– particularly in complex views
● Even easier to test
● Use the $scope only if need access to its APIs
– e.g. $watch()
● http://toddmotto.com/digging-into-angulars-controller-as-syntax/
– less dependencies on the framework
● and consequently on the framework version
● Why is this important?
– no explicit scope in 2.0 → becomes integrated with Dep. Injection
– @Component syntax similar to controllerAs
#vdt15 @carlobonamico
Angular 1.x reloaded - 2: Use ES6 / TypeScript
● ES6: the future of the web
– both class support and better functional programming constructs
● Standard module system
– including good support for both sync and async loading
● TypeScript adds types (both explicit and inferred)
– more development-time checks
● Good news is that they are optional!
– so that use them only where they do provide benefits
– incrementally add them
● small overhead in workflow, better tooling
#vdt15 @carlobonamico
Example of ControllerAs: ES5
● In HTML
<div ng­controller=”ComposerController as msgComposer”>
{{msgComposer.message.subject}}
<button ng­click=”msgComposer.send()”>
</div>
● JS
function ComposerController(MailService)  //no $scope!
{
this.message = { subject : “Hello World” };
this.send = function () { MailService.send(this.message); };
}
angular.module(“mailApp”).controller(“ComposerCtrl”, ComposerController)
#vdt15 @carlobonamico
Example of ControllerAs: ES6
● In HTML
<div ng­controller=”ComposerController as msgComposer”>
{{msgComposer.message.subject}}
<button ng­click=”msgComposer.send()”>
</div>
● ES6
class ComposerController  
{
constructor(MailService){
this.mailService = MailService;
this.message = { subject : “Hello World” };
}
send() { this.mailService.send(this.message); };
}
angular.module(“mailApp”).controller(“ComposerCtrl”, ComposerController)
#vdt15 @carlobonamico
Example of ControllerAs: TypeScript
● In HTML
<div ng­controller=”ComposerController as msgComposer”>
{{msgComposer.message.subject}}
<button ng­click=”msgComposer.send()”>
</div>
● TS
class ComposerController  
{  
   message:MailMessage; 
constructor(private mailService:MailService){ //auto­assign to property
this.message = { subject : “Hello World” };
}
send() { this.mailService.send(this.message); };
}
angular.module(“mailApp”).controller(“ComposerCtrl”, ComposerController)
#vdt15 @carlobonamico
Example of Angular 2.0 Component
● In composer.html
<div>
{{message.subject}}
<button (click)=”send()”>
</div>
● TS
@Component({ selector: "message­composer"}, inject: ...)
@Template({url: "composer.html"})
class ComposerController  
{  
   message: MailMessage; 
constructor(private mailService:MailService){
this.message = { subject : “Hello World” };
}
send() { this.mailService.send(this.message); };
}
angular.module(“mailApp”).controller(“ComposerCtrl”, ComposerController)
● http://blog.ionic.io/angular-2-series-components/
@Metadata
Can also be written in
(slightly more verbose)
ES5 syntax
#vdt15 @carlobonamico
What about AtScript? ES6 – TypeScript roadmap
● At ng-conf 2015, Microsoft & Angular Team announced that
AtScript features (particularly annotations and runtime types)
are being merged into TypeScript 1.5
● http://blogs.msdn.com/b/typescript/archive/2015/03/05/angular-2-0-built-on-typescript.a
spx
Now - at TypeScript 2.0 release
– at runtime, both languages share the current ES5 object model
TS
ES6
ES5 TSES6 ES5
#vdt15 @carlobonamico
But tell me more about the migration path...
● There will be one! “1.x will evolve until migration is trivial”
– Main theme of Angular 1.5: paving the way to the upgrade
● In the meantime: good old Software Engineering principles still apply!
– Separation of Concerns (particularly UI - logic)
– Clarity of intent and code readability
– Favor composition over inheritance
– Modularity
– Test, test, test!
● unit (Jasmine) vs e2e (protractor – cucumber) - http://martinfowler.com/bliki/TestPyramid.html
● As always, apps following these principles will adapt more easily to
both requirements changes and framework changes
– and it will be easier to evolve them incrementally
– and validating each step → see Continuous Delivery
#vdt15 @carlobonamico
Composition and Separation of Concerns: from this
Image courtesy of Todd Motto's very interesting tutorial
https://www.thinkful.com/learn/angularjs-tutorial-build-a-gmail-clone
    WebMailController
#vdt15 @carlobonamico
Composition and Separation of Concerns: to this
   WebMailController
MessageListController
FolderList
Controller MsgAction
Controller
Controllers
should be as small
as possible
should be “slim”,
manage link to UI,
and delegate
to Services
MessageListService
MailSenderService
● Angular 2.0 will have much better and more powerful DI,
● but actual Service code will not change much
#vdt15 @carlobonamico
Angular 1.x reloaded – 3: DataBinding
● 1.3 adds support for one-time binding with {{ ::obj.field }}
– better performance with immutable data
– reduces the need for custom directives
<li 
 ng­repeat=”item in hugeListOfNonChangingItems”>
{{ ::item.name }}</li>
● Limitations of 1.x binding: what is name in
<tag search=”name”> 
– a string constant? and expression? do I need curly braces?
– is it an attribute or a method?
● Implicit semantics! it depends on the DDO...
– not self-describing
1.x Binding Syntax Binding Type
{{obj.field}} model-to-view
{{::obj.field }} model-to-view,
one-time
ng­model=”obj.field” bidirectional
ng­click=”add()” event method
#vdt15 @carlobonamico
Angular 2.0: New binding syntax?
no, new binding semantics!
● Angular 1.x binds to HTML attributes
– parsed and processed by the $compile service
● Angular 2.0 binds to DOM properties – HTML seen as serialized DOM
[text]=”composer.message.subject”   means bind → text property value to variable 
(click)=”composer.send()”   means attach listener to → click event
● Advantages
– no more ad-hoc directives
use standard dom properties
– works with any Web Component
<tab [title]=”message.subject” (click)=”collapse()” > 
– unambiguous and self-describing
● expression format specified by the caller, not by the component
– more readable, clearer flow of data within the page
● once your eyes get accustomed to the parentheses :-)
ng­hide=””   → [hidden]=”” 
ng­click=””   → (click)=””
or canonical syntax
ng­hide=”” →bind­hidden=””
ng­click=”” →on­click=””
#vdt15 @carlobonamico
Is this all?
● Data binding syntax is just the tip of the iceberg...
● So what's the single most important thing that you can do now
to get ready for 2.0?
{{ iceberg.tip }}
Modules DI
Routing
components
#vdt15 @carlobonamico
Move to component-based development now
● From this
     ng­controller=”WebMailController”
ng­controller=”MessageListController”
MessageList.html
Ng­controller
=
”FolderList
Controller” MsgAction
Controller
#vdt15 @carlobonamico
Move to component-based development now
● To this
     ng­controller=”WebMailController”
<message­list><folder­list>
<message­actions>
<message­details>
<message­search­box>
#vdt15 @carlobonamico
With component-based directives
● Angular 2.0 will be both component-based and component-
friendly
– the default construct will be a component
– controllers and directives become components with different roles
● Three different roles
Role Angular 1.x Angular 2.0
Element restrict: “E”, scope: { … }
can use transclusion
@Component
can use shadow-dom
Decorator restrict: “A”, link: function
(element)
@Decorator
constructor(element)
Template/Viewport e.g. ng-repeat
ng-if
e.g. *for
*if
#vdt15 @carlobonamico
Angular 1.x reloaded – 4: better component support
with bindToController
used in HTML
<message­composer 
message=”ctrl.newMessage” 
autosave=”true” 
on­draft­save=”mainCtrl.save()”>
</message­composer>
Template
Subject: <input 
ng­model=”compCtrl.message.subject”>
Content: <input 
ng­model=”compCtrl.message.content”>
<button ng­click=”compCtrl.save()”>
Save</button>
  <button ng­click=”compCtrl.send()”>
      Send</button>
app.directive('messageComposer', 
function () {
  return {
    scope: {},
    bindToController: {
      message: '=',
      autosave: '@',
      onDraftSave: '&'
      onSend: '&'
    }
    templateUrl: … ,
    controller: 'ComposerCtrl as compCtrl', };
});
class ComposerCtrl {
  message = {...};
  constructor(){
   this.autosave = true;
  }
  save (){
    //do stuff
    this.onDraftSave(this.message);
  }
}
#vdt15 @carlobonamico
But if everything is a component,
● How do they share state?
● Do they?
● How do they interact?
#vdt15 @carlobonamico
Example: message list with expanded current
message and navigation
● Within FolderController of <message­folder­content>
<message­list>
<message­details>
<< >><navigation­controls>
<message­details>
#vdt15 @carlobonamico
Connecting components: defining an API
● A component has
– inputs: bindable properties
● and component methods in 2.0
– outputs: event methods
● A bit like a function with input parameters and output callbacks
● In our example
Component Inputs Outputs
<message­list> list
<message­details> message, collapse() reply(), forward()
<navigation­controls> next(), prev()
#vdt15 @carlobonamico
Connecting components: HTML
● HTML
<message­folder­content name=”inbox”>
</message­folder­content> 
● templates/message-folder-content.html
 <message­list
          list=”folder.messages”>
    <display­message 
     message = “folder.currentMessage”>
 </message­list>
 <navigation­controls   
           next=”folder.next()” 
           prev=”...” >
● In <message­folder­content> 
controller
class FolderController{
   constructor(MessageLoaderService){
    this.messages = 
MessageLoaderService.loadMessagesByFolder(t
his.name);
    this.counter = 0;
    this.currentMessage = 
this.messages[counter];
   }
   next(){
    this.counter = ++;
    this.currentMessage = 
this.messages[counter];
   }
   reply(message) { … }
}
#vdt15 @carlobonamico
Connecting components: binding and data flow
● Within <message­folder­content name=”inbox”>
<message­list list=”folder.messages”>
<< >><navigation­controls prev=””>
<message­details 
message=”folder.current”>
Direct Acyclic Graph!
i.e. a Good Thing
#vdt15 @carlobonamico
Connecting components: state and data flow
● In 1.x state is often hidden
– many components can change shared state in any direction
● thanks to two-way DataBinding
● Two way DataBinding is extremely powerful
– we got hooked into Angular because of this
● Turns out, however, that
– two-way binding works best at the local level
– too implicit in complex / composite views
#vdt15 @carlobonamico
What about two-way DataBinding?
● So a bit like you refactor global variables into encapsulated state with explicit
parameter passing, in 2.x, component state can be shared through data
binding only with child components
<message­details message=”currentMessage”>
– binding lets a child component read its parent state, not write to it
– child components need explicit event methods to communicate state change to
surrounding components
● e.g. next()
● Page structure and data flow becomes easier to follow
– particularly in complex apps
● But... forms likely to get ad-hoc support replicating two-way behaviour
­with different implementation
– http://victorsavkin.com/post/110170125256/change-detection-in-angular-2
#vdt15 @carlobonamico
Advantages
● Dependencies become more explicit
● State changes can be propagated even more efficiently
– model → view from top to bottom
– view → model explicitly, and bottom-up
● This means fast fast FAST! databinding
– single-pass change detection
● http://victorsavkin.com/post/114168430846/two-phases-of-angular-2-applications
– even more optimization if you give hints about when state changes
● immutable vs observable vs dirty-checked objects
● http://victorsavkin.com/post/110170125256/change-detection-in-angular-2
#vdt15 @carlobonamico
What else can I do?
#vdt15 @carlobonamico
Use Angular 1.4 new router
https://angular.github.io/router
● Component-based router
● Supports
– child and nested router
– lazy loading
– multiple views
● JS Route configuration
$router.config([
    {
      path: '/inbox',
      // Map components 
         to viewports 
      components: {
        //folder component 
          in main viewport
        'main': 'folder',
        'sidebar': 'folder­list'
      }
 ]);
<div 
ng­view
port
="side
bar">
<div ng­viewport="main">
#vdt15 @carlobonamico
The new router – lifecycle support
● Promise-enabled callbacks before and after navigation
– notify navigation requests
– can accept / reject them
● Simplifies many common use cases:
– asking confirmation before leaving view with unsaved data in forms
– redirecting to login page if not auhtenticated
– block navigation to routes not authorized for the user profile
● It will support mixed 1.x / 2.0 scenarios:
– 1.x views in 2.0 route definition and vice-versa
– key tool for incremental migration of large apps
● https://www.youtube.com/watch?v=vecg70fPDFw
#vdt15 @carlobonamico
Next Generation modules
● Learn about System.js
– backward- and forward- compatible
implementation of ES6 module system
– available now!
– https://github.com/systemjs/systemjs
● Example for Angular 1.x
– http://martinmicunda.com/2015/02/09/how-to-start-writing-apps-wit
h-es6-angular-1x-and-jspm/
● Example for Angular 2.0
– https://angular.io/docs/js/latest/quickstart.html
Webmail App
Logging Auth UI Widgets
Message 
List 
Reader
Message 
Composer
Contacts
#vdt15 @carlobonamico
Keep up-to-date
● Watch out for 1.5 release
– main theme adding support for easier migration
– keep an eye on http://angularjs.blogspot.it/ for roadmap updates
● Learn about Component-based approaches with 1.x
– https://www.airpair.com/javascript/posts/creating-container-components
-part-1-shadow-dom
(also part 2 & part 3)
● Start reading about 2.0
– http://blog.ionic.io/angular-2-series-introduction/
– http://blog.thoughtram.io/
– https://github.com/timjacobi/angular2-education
● Follow 2.x development
– http://victorsavkin.com/
#vdt15 @carlobonamico
More references
● StyleGuide
– https://github.com/johnpapa/angular­styleguide 
● SOLID Principles
– http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod
● Javascript by Yakov Fain
– http://enterprisewebbook.com/appendix_a_advancedjs.html
– https://www.youtube.com/watch?v=X1J0oMayvC0
● Axel Rauschmayer Speaking Javascript
– http://speakingjs.com/ 
● TypeScript
– http://www.typescriptlang.org/
● ES6
– http://www.2ality.com/2014/08/es6­today.html
#vdt15 @carlobonamico
Thank you!
● If you are interested,
– read my other presentations
● http://www.slideshare.net/carlo.bonamico/presentations
– ask us about Angular training / consulting
● http://www.nispro.it
● Follow us on Twitter
– @carlobonamico @nis_srl
● updates on AngularJS!
● and some Docker, Ansible, Continuous Delivery
● Contact us
– carlo.bonamico@gmail.com / carlo.bonamico@nispro.it
Special thanks to my teammates
Sonia Pini, Danilo Caruso
and Roberta Ficco for all
suggestions, ideas & feedback
on “reloading” Angular
and to Pascal Precht
for the timely & great feedback

Más contenido relacionado

La actualidad más candente

Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular applicationSuresh Patidar
 
Angularjs practical project experiences with javascript development in a bank
Angularjs practical project experiences with javascript development in a bankAngularjs practical project experiences with javascript development in a bank
Angularjs practical project experiences with javascript development in a bankDavid Amend
 
Developing high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web workerDeveloping high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web workerSuresh Patidar
 
Angular 2 : learn TypeScript already with Angular 1
Angular 2 : learn TypeScript already with Angular 1Angular 2 : learn TypeScript already with Angular 1
Angular 2 : learn TypeScript already with Angular 1David Amend
 
Getting your Hooks into Cordova
Getting your Hooks into CordovaGetting your Hooks into Cordova
Getting your Hooks into CordovaGavin Pickin
 
[D2대학생세미나] frontend개발자가 들려주는 개발 이야기
[D2대학생세미나] frontend개발자가 들려주는 개발 이야기[D2대학생세미나] frontend개발자가 들려주는 개발 이야기
[D2대학생세미나] frontend개발자가 들려주는 개발 이야기NAVER D2
 
Micronaut: A new way to build microservices
Micronaut: A new way to build microservicesMicronaut: A new way to build microservices
Micronaut: A new way to build microservicesLuram Archanjo
 
Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014Stéphane Bégaudeau
 
Modern ASP.NET Webskills
Modern ASP.NET WebskillsModern ASP.NET Webskills
Modern ASP.NET WebskillsCaleb Jenkins
 
Introduction to ASP.NET Core
Introduction to ASP.NET CoreIntroduction to ASP.NET Core
Introduction to ASP.NET CoreMiroslav Popovic
 
Building Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureBuilding Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureMaurice De Beijer [MVP]
 
Tutorial: Develop Mobile Applications with AngularJS
Tutorial: Develop Mobile Applications with AngularJSTutorial: Develop Mobile Applications with AngularJS
Tutorial: Develop Mobile Applications with AngularJSPhilipp Burgmer
 
Story about module management with angular.js
Story about module management with angular.jsStory about module management with angular.js
Story about module management with angular.jsDavid Amend
 
learn mvc project in 7 day
learn mvc project in 7 daylearn mvc project in 7 day
learn mvc project in 7 dayQuach Long
 
Ppt of java and java script
Ppt of java and java scriptPpt of java and java script
Ppt of java and java scriptkonkumuttisravan
 
Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Fwdays
 
Curious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonCurious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonHamed Hatami
 

La actualidad más candente (20)

Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular application
 
Angularjs practical project experiences with javascript development in a bank
Angularjs practical project experiences with javascript development in a bankAngularjs practical project experiences with javascript development in a bank
Angularjs practical project experiences with javascript development in a bank
 
Developing high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web workerDeveloping high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web worker
 
Angular 2 : learn TypeScript already with Angular 1
Angular 2 : learn TypeScript already with Angular 1Angular 2 : learn TypeScript already with Angular 1
Angular 2 : learn TypeScript already with Angular 1
 
Refactoring to a SPA
Refactoring to a SPARefactoring to a SPA
Refactoring to a SPA
 
Getting Your Hooks into Cordova
Getting Your Hooks into CordovaGetting Your Hooks into Cordova
Getting Your Hooks into Cordova
 
Getting your Hooks into Cordova
Getting your Hooks into CordovaGetting your Hooks into Cordova
Getting your Hooks into Cordova
 
[D2대학생세미나] frontend개발자가 들려주는 개발 이야기
[D2대학생세미나] frontend개발자가 들려주는 개발 이야기[D2대학생세미나] frontend개발자가 들려주는 개발 이야기
[D2대학생세미나] frontend개발자가 들려주는 개발 이야기
 
Micronaut: A new way to build microservices
Micronaut: A new way to build microservicesMicronaut: A new way to build microservices
Micronaut: A new way to build microservices
 
Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014
 
Modern ASP.NET Webskills
Modern ASP.NET WebskillsModern ASP.NET Webskills
Modern ASP.NET Webskills
 
Introduction to ASP.NET Core
Introduction to ASP.NET CoreIntroduction to ASP.NET Core
Introduction to ASP.NET Core
 
Building Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureBuilding Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & Azure
 
Handle the error
Handle the errorHandle the error
Handle the error
 
Tutorial: Develop Mobile Applications with AngularJS
Tutorial: Develop Mobile Applications with AngularJSTutorial: Develop Mobile Applications with AngularJS
Tutorial: Develop Mobile Applications with AngularJS
 
Story about module management with angular.js
Story about module management with angular.jsStory about module management with angular.js
Story about module management with angular.js
 
learn mvc project in 7 day
learn mvc project in 7 daylearn mvc project in 7 day
learn mvc project in 7 day
 
Ppt of java and java script
Ppt of java and java scriptPpt of java and java script
Ppt of java and java script
 
Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"
 
Curious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonCurious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks Comparison
 

Similar a Angular 1.x reloaded: improve your app now! and get ready for 2.0

Real World AngularJS recipes: beyond TodoMVC - Carlo Bonamico, Sonia Pini - C...
Real World AngularJS recipes: beyond TodoMVC - Carlo Bonamico, Sonia Pini - C...Real World AngularJS recipes: beyond TodoMVC - Carlo Bonamico, Sonia Pini - C...
Real World AngularJS recipes: beyond TodoMVC - Carlo Bonamico, Sonia Pini - C...Codemotion
 
Angular JS 2_0 BCS CTO_in_Res V3
Angular JS 2_0 BCS CTO_in_Res V3Angular JS 2_0 BCS CTO_in_Res V3
Angular JS 2_0 BCS CTO_in_Res V3Bruce Pentreath
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendVlad Fedosov
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JSFestUA
 
AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)Alex Ross
 
Angular.ppt
Angular.pptAngular.ppt
Angular.pptMytrux1
 
Front end microservices: architectures and solution
Front end microservices: architectures and solutionFront end microservices: architectures and solution
Front end microservices: architectures and solutionMikhail Kuznetcov
 
AngularConf2016 - A leap of faith !?
AngularConf2016 - A leap of faith !?AngularConf2016 - A leap of faith !?
AngularConf2016 - A leap of faith !?Alessandro Giorgetti
 
Angular 2: What's New?
Angular 2: What's New?Angular 2: What's New?
Angular 2: What's New?jbandi
 
Angular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraAngular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraLINAGORA
 
Foster - Getting started with Angular
Foster - Getting started with AngularFoster - Getting started with Angular
Foster - Getting started with AngularMukundSonaiya1
 
Rapid Application Development with MEAN Stack
Rapid Application Development with MEAN StackRapid Application Development with MEAN Stack
Rapid Application Development with MEAN StackAvinash Kaza
 
Workshop About Software Engineering Skills 2019
Workshop About Software Engineering Skills 2019Workshop About Software Engineering Skills 2019
Workshop About Software Engineering Skills 2019PhuocNT (Fresher.VN)
 
KharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address themKharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address themVlad Fedosov
 
Moving from CruiseControl.NET to Jenkins in the PVS-Studio development team
Moving from CruiseControl.NET to Jenkins in the PVS-Studio development teamMoving from CruiseControl.NET to Jenkins in the PVS-Studio development team
Moving from CruiseControl.NET to Jenkins in the PVS-Studio development teamSofia Fateeva
 

Similar a Angular 1.x reloaded: improve your app now! and get ready for 2.0 (20)

Real World AngularJS recipes: beyond TodoMVC - Carlo Bonamico, Sonia Pini - C...
Real World AngularJS recipes: beyond TodoMVC - Carlo Bonamico, Sonia Pini - C...Real World AngularJS recipes: beyond TodoMVC - Carlo Bonamico, Sonia Pini - C...
Real World AngularJS recipes: beyond TodoMVC - Carlo Bonamico, Sonia Pini - C...
 
Angular JS 2_0 BCS CTO_in_Res V3
Angular JS 2_0 BCS CTO_in_Res V3Angular JS 2_0 BCS CTO_in_Res V3
Angular JS 2_0 BCS CTO_in_Res V3
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
 
AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)
 
Angular.ppt
Angular.pptAngular.ppt
Angular.ppt
 
Front end microservices: architectures and solution
Front end microservices: architectures and solutionFront end microservices: architectures and solution
Front end microservices: architectures and solution
 
El viaje de Angular1 a Angular2
El viaje de Angular1 a Angular2El viaje de Angular1 a Angular2
El viaje de Angular1 a Angular2
 
THE FUTURE OF ANGULAR JS
THE FUTURE OF ANGULAR JSTHE FUTURE OF ANGULAR JS
THE FUTURE OF ANGULAR JS
 
AngularConf2016 - A leap of faith !?
AngularConf2016 - A leap of faith !?AngularConf2016 - A leap of faith !?
AngularConf2016 - A leap of faith !?
 
Angular 2: What's New?
Angular 2: What's New?Angular 2: What's New?
Angular 2: What's New?
 
Angular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraAngular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - Linagora
 
Angular 2
Angular 2Angular 2
Angular 2
 
Foster - Getting started with Angular
Foster - Getting started with AngularFoster - Getting started with Angular
Foster - Getting started with Angular
 
Rapid Application Development with MEAN Stack
Rapid Application Development with MEAN StackRapid Application Development with MEAN Stack
Rapid Application Development with MEAN Stack
 
Workshop About Software Engineering Skills 2019
Workshop About Software Engineering Skills 2019Workshop About Software Engineering Skills 2019
Workshop About Software Engineering Skills 2019
 
KharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address themKharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address them
 
Angular
AngularAngular
Angular
 
Angular js 2.0 beta
Angular js 2.0 betaAngular js 2.0 beta
Angular js 2.0 beta
 
Moving from CruiseControl.NET to Jenkins in the PVS-Studio development team
Moving from CruiseControl.NET to Jenkins in the PVS-Studio development teamMoving from CruiseControl.NET to Jenkins in the PVS-Studio development team
Moving from CruiseControl.NET to Jenkins in the PVS-Studio development team
 

Más de Carlo Bonamico

Build Your Own Angular Component Library
Build Your Own Angular Component LibraryBuild Your Own Angular Component Library
Build Your Own Angular Component LibraryCarlo Bonamico
 
Angular Rebooted: Components Everywhere
Angular Rebooted: Components EverywhereAngular Rebooted: Components Everywhere
Angular Rebooted: Components EverywhereCarlo Bonamico
 
Continuous Security: Zap security bugs now Codemotion-2015
Continuous Security: Zap security bugs now Codemotion-2015Continuous Security: Zap security bugs now Codemotion-2015
Continuous Security: Zap security bugs now Codemotion-2015Carlo Bonamico
 
AngularJS Security: defend your Single Page Application
AngularJS Security: defend your Single Page Application AngularJS Security: defend your Single Page Application
AngularJS Security: defend your Single Page Application Carlo Bonamico
 
Web Application Security Reloaded for the HTML5 era
Web Application Security Reloaded for the HTML5 eraWeb Application Security Reloaded for the HTML5 era
Web Application Security Reloaded for the HTML5 eraCarlo Bonamico
 
Mobile HTML5 websites and Hybrid Apps with AngularJS
Mobile HTML5 websites and Hybrid Apps with AngularJSMobile HTML5 websites and Hybrid Apps with AngularJS
Mobile HTML5 websites and Hybrid Apps with AngularJSCarlo Bonamico
 
AngularJS: How to code today with tomorrow tools - Codemotion Milan 2013
AngularJS: How to code today with tomorrow tools - Codemotion Milan 2013AngularJS: How to code today with tomorrow tools - Codemotion Milan 2013
AngularJS: How to code today with tomorrow tools - Codemotion Milan 2013Carlo Bonamico
 
Infrastructure as Data with Ansible for easier Continuous Delivery
Infrastructure as Data with Ansible for easier Continuous DeliveryInfrastructure as Data with Ansible for easier Continuous Delivery
Infrastructure as Data with Ansible for easier Continuous DeliveryCarlo Bonamico
 
Is my Web Application secure? OWASP Top Ten Security Risks and Beyond...
Is my Web Application secure? OWASP Top Ten Security Risks and Beyond...Is my Web Application secure? OWASP Top Ten Security Risks and Beyond...
Is my Web Application secure? OWASP Top Ten Security Risks and Beyond...Carlo Bonamico
 
Maven 2 in the real world
Maven 2 in the real worldMaven 2 in the real world
Maven 2 in the real worldCarlo Bonamico
 
Nasa World Wind For Java (by Fabrizio Giudici)
Nasa World Wind For Java (by Fabrizio Giudici)Nasa World Wind For Java (by Fabrizio Giudici)
Nasa World Wind For Java (by Fabrizio Giudici)Carlo Bonamico
 
Continuous Integration With Hudson (and Jenkins)
Continuous Integration With Hudson (and Jenkins)Continuous Integration With Hudson (and Jenkins)
Continuous Integration With Hudson (and Jenkins)Carlo Bonamico
 

Más de Carlo Bonamico (13)

Build Your Own Angular Component Library
Build Your Own Angular Component LibraryBuild Your Own Angular Component Library
Build Your Own Angular Component Library
 
Angular Rebooted: Components Everywhere
Angular Rebooted: Components EverywhereAngular Rebooted: Components Everywhere
Angular Rebooted: Components Everywhere
 
Continuous Security: Zap security bugs now Codemotion-2015
Continuous Security: Zap security bugs now Codemotion-2015Continuous Security: Zap security bugs now Codemotion-2015
Continuous Security: Zap security bugs now Codemotion-2015
 
AngularJS Security: defend your Single Page Application
AngularJS Security: defend your Single Page Application AngularJS Security: defend your Single Page Application
AngularJS Security: defend your Single Page Application
 
Web Application Security Reloaded for the HTML5 era
Web Application Security Reloaded for the HTML5 eraWeb Application Security Reloaded for the HTML5 era
Web Application Security Reloaded for the HTML5 era
 
Mobile HTML5 websites and Hybrid Apps with AngularJS
Mobile HTML5 websites and Hybrid Apps with AngularJSMobile HTML5 websites and Hybrid Apps with AngularJS
Mobile HTML5 websites and Hybrid Apps with AngularJS
 
AngularJS: How to code today with tomorrow tools - Codemotion Milan 2013
AngularJS: How to code today with tomorrow tools - Codemotion Milan 2013AngularJS: How to code today with tomorrow tools - Codemotion Milan 2013
AngularJS: How to code today with tomorrow tools - Codemotion Milan 2013
 
Infrastructure as Data with Ansible for easier Continuous Delivery
Infrastructure as Data with Ansible for easier Continuous DeliveryInfrastructure as Data with Ansible for easier Continuous Delivery
Infrastructure as Data with Ansible for easier Continuous Delivery
 
Is my Web Application secure? OWASP Top Ten Security Risks and Beyond...
Is my Web Application secure? OWASP Top Ten Security Risks and Beyond...Is my Web Application secure? OWASP Top Ten Security Risks and Beyond...
Is my Web Application secure? OWASP Top Ten Security Risks and Beyond...
 
Maven 2 in the real world
Maven 2 in the real worldMaven 2 in the real world
Maven 2 in the real world
 
Nasa World Wind For Java (by Fabrizio Giudici)
Nasa World Wind For Java (by Fabrizio Giudici)Nasa World Wind For Java (by Fabrizio Giudici)
Nasa World Wind For Java (by Fabrizio Giudici)
 
Continuous Integration With Hudson (and Jenkins)
Continuous Integration With Hudson (and Jenkins)Continuous Integration With Hudson (and Jenkins)
Continuous Integration With Hudson (and Jenkins)
 
Build Automation Tips
Build Automation TipsBuild Automation Tips
Build Automation Tips
 

Último

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 

Último (20)

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 

Angular 1.x reloaded: improve your app now! and get ready for 2.0

  • 1. #vdt15 @carlobonamico Angular 1.x reloaded: improve your app now! and get ready for 2.0 Carlo Bonamico NIS s.r.l. / JUG Genova carlo.bonamico@nispro.it
  • 2. #vdt15 @carlobonamico Waiting for Angular 2.0 ● As development proceeds and details emerge, growing excitement for what the new release will bring: – full support for Web Components ● which often require custom integration directives in AngularJS 1.x – full support for ES6 ● particularly module system – better performance – better tooling support ● smart autocompletion, development-time validation – first-class mobile support ● By the way, go watch Misko and Rado Kirov ng-conf Day 2 keynote – videos for all other talks also available ● https://www.youtube.com/watch?v=-dMBcqwvYA0&index=21&list=PLOETEcp3DkCoNnlhE-7fov YvqwVPrRiY7 https://angular.io 
  • 3. #vdt15 @carlobonamico Yes, but... The questions we are all asking ● Do I start learning/using 2.0 now? or when? ● Will I be forced to use ES6 or Typescript? ● Will I have to rewrite some/most/all of my 1.x code? ● By the way, what the *** is this new syntax? [disabled]=”comp.disabled” (click)=”comp.enable()” ● How about a migration path? ● Do I have to wait until 2016 to get 2.0 advantages in my app?
  • 4. #vdt15 @carlobonamico Some (preliminary) answers ● Do I start learning/using 2.0 now? or when? learning, now! using... not until beta/RC ● Will I be forced to use ES6 or Typescript? NO! although you will get benefits it you do ● Will I have to rewrite some/most/all of my 1.x code? definitely NOT ALL – more about this later ● By the way, what the *** is this new syntax? [disabled]=”comp.disabled” (click)=”comp.enable()” better semantics! Web Components! ● How about a migration path? ● Do I have to wait until 2016 to get 2.0 advantages? NO! see next slides... ● So... – and start getting ready! Disclaimer:  1) Info up­to­date  in April 2015. 2) May change:  additions possible major API changes  look unlikely   3) I am not in the  Angular team. All mistakes & misinterpretations  are mine :­)
  • 5. #vdt15 @carlobonamico You can improve your 1.x app now, AND make adoption of 2.0 easier ● Use new (and 2.x friendly) constructs – controllerAs – new bindToController directive syntax ● Follow 2.0 Design Patterns now – components all the way down ● Use “dual mode” libraries supporting both versions – angular new router – i18n – more to follow... ● Take advantage of ES6 / TypeScript This talk is shares our experience in adopting these approaches in real-world projects
  • 6. #vdt15 @carlobonamico What's new in 1.3/1.4? ● Apparently, small things – but they do enable big changes in the way we develop Angular apps ● Besides, both releases achieve a significant performance increase – 1.3 improves DOM manipulation ● 4.3 times faster with 73% less garbage – 1.3 optimizes change detection ● 3.5 times faster digest with 87% less garbage – 1.4 brings even more tuning – you do not need to change your code :-) ● So move to 1.3 NOW! – and to 1.4 in a few weeks (it's RC0 as of today)
  • 7. #vdt15 @carlobonamico Angular 1.x reloaded – 1: controllerAs ● Avoid injecting $scope in the controller ● Put the controller instance IN the scope ● HTML <div ng­controller=”ComposerController as msgComposer”> {{msgComposer.message.subject}} <button ng­click=”msgComposer.send()”> </div> ● JS function ComposerController(MailService)  //no $scope! { this.message = { subject : “Hello World” }; this.send = function () { MailService.send(this.message); }; } angular.module(“mailApp”).controller(“ComposerCtrl”, ComposerController) Examples for a fictional gmail-like webmail
  • 8. #vdt15 @carlobonamico Advantages ● More readable code – particularly in complex views ● Even easier to test ● Use the $scope only if need access to its APIs – e.g. $watch() ● http://toddmotto.com/digging-into-angulars-controller-as-syntax/ – less dependencies on the framework ● and consequently on the framework version ● Why is this important? – no explicit scope in 2.0 → becomes integrated with Dep. Injection – @Component syntax similar to controllerAs
  • 9. #vdt15 @carlobonamico Angular 1.x reloaded - 2: Use ES6 / TypeScript ● ES6: the future of the web – both class support and better functional programming constructs ● Standard module system – including good support for both sync and async loading ● TypeScript adds types (both explicit and inferred) – more development-time checks ● Good news is that they are optional! – so that use them only where they do provide benefits – incrementally add them ● small overhead in workflow, better tooling
  • 10. #vdt15 @carlobonamico Example of ControllerAs: ES5 ● In HTML <div ng­controller=”ComposerController as msgComposer”> {{msgComposer.message.subject}} <button ng­click=”msgComposer.send()”> </div> ● JS function ComposerController(MailService)  //no $scope! { this.message = { subject : “Hello World” }; this.send = function () { MailService.send(this.message); }; } angular.module(“mailApp”).controller(“ComposerCtrl”, ComposerController)
  • 11. #vdt15 @carlobonamico Example of ControllerAs: ES6 ● In HTML <div ng­controller=”ComposerController as msgComposer”> {{msgComposer.message.subject}} <button ng­click=”msgComposer.send()”> </div> ● ES6 class ComposerController   { constructor(MailService){ this.mailService = MailService; this.message = { subject : “Hello World” }; } send() { this.mailService.send(this.message); }; } angular.module(“mailApp”).controller(“ComposerCtrl”, ComposerController)
  • 12. #vdt15 @carlobonamico Example of ControllerAs: TypeScript ● In HTML <div ng­controller=”ComposerController as msgComposer”> {{msgComposer.message.subject}} <button ng­click=”msgComposer.send()”> </div> ● TS class ComposerController   {      message:MailMessage;  constructor(private mailService:MailService){ //auto­assign to property this.message = { subject : “Hello World” }; } send() { this.mailService.send(this.message); }; } angular.module(“mailApp”).controller(“ComposerCtrl”, ComposerController)
  • 13. #vdt15 @carlobonamico Example of Angular 2.0 Component ● In composer.html <div> {{message.subject}} <button (click)=”send()”> </div> ● TS @Component({ selector: "message­composer"}, inject: ...) @Template({url: "composer.html"}) class ComposerController   {      message: MailMessage;  constructor(private mailService:MailService){ this.message = { subject : “Hello World” }; } send() { this.mailService.send(this.message); }; } angular.module(“mailApp”).controller(“ComposerCtrl”, ComposerController) ● http://blog.ionic.io/angular-2-series-components/ @Metadata Can also be written in (slightly more verbose) ES5 syntax
  • 14. #vdt15 @carlobonamico What about AtScript? ES6 – TypeScript roadmap ● At ng-conf 2015, Microsoft & Angular Team announced that AtScript features (particularly annotations and runtime types) are being merged into TypeScript 1.5 ● http://blogs.msdn.com/b/typescript/archive/2015/03/05/angular-2-0-built-on-typescript.a spx Now - at TypeScript 2.0 release – at runtime, both languages share the current ES5 object model TS ES6 ES5 TSES6 ES5
  • 15. #vdt15 @carlobonamico But tell me more about the migration path... ● There will be one! “1.x will evolve until migration is trivial” – Main theme of Angular 1.5: paving the way to the upgrade ● In the meantime: good old Software Engineering principles still apply! – Separation of Concerns (particularly UI - logic) – Clarity of intent and code readability – Favor composition over inheritance – Modularity – Test, test, test! ● unit (Jasmine) vs e2e (protractor – cucumber) - http://martinfowler.com/bliki/TestPyramid.html ● As always, apps following these principles will adapt more easily to both requirements changes and framework changes – and it will be easier to evolve them incrementally – and validating each step → see Continuous Delivery
  • 16. #vdt15 @carlobonamico Composition and Separation of Concerns: from this Image courtesy of Todd Motto's very interesting tutorial https://www.thinkful.com/learn/angularjs-tutorial-build-a-gmail-clone     WebMailController
  • 17. #vdt15 @carlobonamico Composition and Separation of Concerns: to this    WebMailController MessageListController FolderList Controller MsgAction Controller Controllers should be as small as possible should be “slim”, manage link to UI, and delegate to Services MessageListService MailSenderService ● Angular 2.0 will have much better and more powerful DI, ● but actual Service code will not change much
  • 18. #vdt15 @carlobonamico Angular 1.x reloaded – 3: DataBinding ● 1.3 adds support for one-time binding with {{ ::obj.field }} – better performance with immutable data – reduces the need for custom directives <li   ng­repeat=”item in hugeListOfNonChangingItems”> {{ ::item.name }}</li> ● Limitations of 1.x binding: what is name in <tag search=”name”>  – a string constant? and expression? do I need curly braces? – is it an attribute or a method? ● Implicit semantics! it depends on the DDO... – not self-describing 1.x Binding Syntax Binding Type {{obj.field}} model-to-view {{::obj.field }} model-to-view, one-time ng­model=”obj.field” bidirectional ng­click=”add()” event method
  • 19. #vdt15 @carlobonamico Angular 2.0: New binding syntax? no, new binding semantics! ● Angular 1.x binds to HTML attributes – parsed and processed by the $compile service ● Angular 2.0 binds to DOM properties – HTML seen as serialized DOM [text]=”composer.message.subject”   means bind → text property value to variable  (click)=”composer.send()”   means attach listener to → click event ● Advantages – no more ad-hoc directives use standard dom properties – works with any Web Component <tab [title]=”message.subject” (click)=”collapse()” >  – unambiguous and self-describing ● expression format specified by the caller, not by the component – more readable, clearer flow of data within the page ● once your eyes get accustomed to the parentheses :-) ng­hide=””   → [hidden]=””  ng­click=””   → (click)=”” or canonical syntax ng­hide=”” →bind­hidden=”” ng­click=”” →on­click=””
  • 20. #vdt15 @carlobonamico Is this all? ● Data binding syntax is just the tip of the iceberg... ● So what's the single most important thing that you can do now to get ready for 2.0? {{ iceberg.tip }} Modules DI Routing components
  • 21. #vdt15 @carlobonamico Move to component-based development now ● From this      ng­controller=”WebMailController” ng­controller=”MessageListController” MessageList.html Ng­controller = ”FolderList Controller” MsgAction Controller
  • 22. #vdt15 @carlobonamico Move to component-based development now ● To this      ng­controller=”WebMailController” <message­list><folder­list> <message­actions> <message­details> <message­search­box>
  • 23. #vdt15 @carlobonamico With component-based directives ● Angular 2.0 will be both component-based and component- friendly – the default construct will be a component – controllers and directives become components with different roles ● Three different roles Role Angular 1.x Angular 2.0 Element restrict: “E”, scope: { … } can use transclusion @Component can use shadow-dom Decorator restrict: “A”, link: function (element) @Decorator constructor(element) Template/Viewport e.g. ng-repeat ng-if e.g. *for *if
  • 24. #vdt15 @carlobonamico Angular 1.x reloaded – 4: better component support with bindToController used in HTML <message­composer  message=”ctrl.newMessage”  autosave=”true”  on­draft­save=”mainCtrl.save()”> </message­composer> Template Subject: <input  ng­model=”compCtrl.message.subject”> Content: <input  ng­model=”compCtrl.message.content”> <button ng­click=”compCtrl.save()”> Save</button>   <button ng­click=”compCtrl.send()”>       Send</button> app.directive('messageComposer',  function () {   return {     scope: {},     bindToController: {       message: '=',       autosave: '@',       onDraftSave: '&'       onSend: '&'     }     templateUrl: … ,     controller: 'ComposerCtrl as compCtrl', }; }); class ComposerCtrl {   message = {...};   constructor(){    this.autosave = true;   }   save (){     //do stuff     this.onDraftSave(this.message);   } }
  • 25. #vdt15 @carlobonamico But if everything is a component, ● How do they share state? ● Do they? ● How do they interact?
  • 26. #vdt15 @carlobonamico Example: message list with expanded current message and navigation ● Within FolderController of <message­folder­content> <message­list> <message­details> << >><navigation­controls> <message­details>
  • 27. #vdt15 @carlobonamico Connecting components: defining an API ● A component has – inputs: bindable properties ● and component methods in 2.0 – outputs: event methods ● A bit like a function with input parameters and output callbacks ● In our example Component Inputs Outputs <message­list> list <message­details> message, collapse() reply(), forward() <navigation­controls> next(), prev()
  • 28. #vdt15 @carlobonamico Connecting components: HTML ● HTML <message­folder­content name=”inbox”> </message­folder­content>  ● templates/message-folder-content.html  <message­list           list=”folder.messages”>     <display­message       message = “folder.currentMessage”>  </message­list>  <navigation­controls               next=”folder.next()”             prev=”...” > ● In <message­folder­content>  controller class FolderController{    constructor(MessageLoaderService){     this.messages =  MessageLoaderService.loadMessagesByFolder(t his.name);     this.counter = 0;     this.currentMessage =  this.messages[counter];    }    next(){     this.counter = ++;     this.currentMessage =  this.messages[counter];    }    reply(message) { … } }
  • 29. #vdt15 @carlobonamico Connecting components: binding and data flow ● Within <message­folder­content name=”inbox”> <message­list list=”folder.messages”> << >><navigation­controls prev=””> <message­details  message=”folder.current”> Direct Acyclic Graph! i.e. a Good Thing
  • 30. #vdt15 @carlobonamico Connecting components: state and data flow ● In 1.x state is often hidden – many components can change shared state in any direction ● thanks to two-way DataBinding ● Two way DataBinding is extremely powerful – we got hooked into Angular because of this ● Turns out, however, that – two-way binding works best at the local level – too implicit in complex / composite views
  • 31. #vdt15 @carlobonamico What about two-way DataBinding? ● So a bit like you refactor global variables into encapsulated state with explicit parameter passing, in 2.x, component state can be shared through data binding only with child components <message­details message=”currentMessage”> – binding lets a child component read its parent state, not write to it – child components need explicit event methods to communicate state change to surrounding components ● e.g. next() ● Page structure and data flow becomes easier to follow – particularly in complex apps ● But... forms likely to get ad-hoc support replicating two-way behaviour ­with different implementation – http://victorsavkin.com/post/110170125256/change-detection-in-angular-2
  • 32. #vdt15 @carlobonamico Advantages ● Dependencies become more explicit ● State changes can be propagated even more efficiently – model → view from top to bottom – view → model explicitly, and bottom-up ● This means fast fast FAST! databinding – single-pass change detection ● http://victorsavkin.com/post/114168430846/two-phases-of-angular-2-applications – even more optimization if you give hints about when state changes ● immutable vs observable vs dirty-checked objects ● http://victorsavkin.com/post/110170125256/change-detection-in-angular-2
  • 34. #vdt15 @carlobonamico Use Angular 1.4 new router https://angular.github.io/router ● Component-based router ● Supports – child and nested router – lazy loading – multiple views ● JS Route configuration $router.config([     {       path: '/inbox',       // Map components           to viewports        components: {         //folder component            in main viewport         'main': 'folder',         'sidebar': 'folder­list'       }  ]); <div  ng­view port ="side bar"> <div ng­viewport="main">
  • 35. #vdt15 @carlobonamico The new router – lifecycle support ● Promise-enabled callbacks before and after navigation – notify navigation requests – can accept / reject them ● Simplifies many common use cases: – asking confirmation before leaving view with unsaved data in forms – redirecting to login page if not auhtenticated – block navigation to routes not authorized for the user profile ● It will support mixed 1.x / 2.0 scenarios: – 1.x views in 2.0 route definition and vice-versa – key tool for incremental migration of large apps ● https://www.youtube.com/watch?v=vecg70fPDFw
  • 36. #vdt15 @carlobonamico Next Generation modules ● Learn about System.js – backward- and forward- compatible implementation of ES6 module system – available now! – https://github.com/systemjs/systemjs ● Example for Angular 1.x – http://martinmicunda.com/2015/02/09/how-to-start-writing-apps-wit h-es6-angular-1x-and-jspm/ ● Example for Angular 2.0 – https://angular.io/docs/js/latest/quickstart.html Webmail App Logging Auth UI Widgets Message  List  Reader Message  Composer Contacts
  • 37. #vdt15 @carlobonamico Keep up-to-date ● Watch out for 1.5 release – main theme adding support for easier migration – keep an eye on http://angularjs.blogspot.it/ for roadmap updates ● Learn about Component-based approaches with 1.x – https://www.airpair.com/javascript/posts/creating-container-components -part-1-shadow-dom (also part 2 & part 3) ● Start reading about 2.0 – http://blog.ionic.io/angular-2-series-introduction/ – http://blog.thoughtram.io/ – https://github.com/timjacobi/angular2-education ● Follow 2.x development – http://victorsavkin.com/
  • 38. #vdt15 @carlobonamico More references ● StyleGuide – https://github.com/johnpapa/angular­styleguide  ● SOLID Principles – http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod ● Javascript by Yakov Fain – http://enterprisewebbook.com/appendix_a_advancedjs.html – https://www.youtube.com/watch?v=X1J0oMayvC0 ● Axel Rauschmayer Speaking Javascript – http://speakingjs.com/  ● TypeScript – http://www.typescriptlang.org/ ● ES6 – http://www.2ality.com/2014/08/es6­today.html
  • 39. #vdt15 @carlobonamico Thank you! ● If you are interested, – read my other presentations ● http://www.slideshare.net/carlo.bonamico/presentations – ask us about Angular training / consulting ● http://www.nispro.it ● Follow us on Twitter – @carlobonamico @nis_srl ● updates on AngularJS! ● and some Docker, Ansible, Continuous Delivery ● Contact us – carlo.bonamico@gmail.com / carlo.bonamico@nispro.it Special thanks to my teammates Sonia Pini, Danilo Caruso and Roberta Ficco for all suggestions, ideas & feedback on “reloading” Angular and to Pascal Precht for the timely & great feedback