SlideShare une entreprise Scribd logo
1  sur  48
Télécharger pour lire hors ligne
Angular Rebooted:
Components Everywhere
Carlo Bonamico -Sonia Pini
MILAN 25-26 NOVEMBER 2016
sonia.pini@nispro.it
carlo.bonamico@nispro.it - NIS s.r.l. - a DGS company
carlo.bonamico@gmail.com – Genova Java User Group
Twitter: @carlobonamico @nis_srl
Abstract
Attracted by AngularJS power and simplicity, you have chosen it for your next project.
Getting started with DataBinding, Scopes and Controllers was relatively quick and
easy...
But what do you need to effectively bring a complex application to Production?
We discuss
● the new Component API,
● lifecycle callbacks - $onChanges
● selecting different ways for components to collaborate
● choosing between Two-Way Binding and One-Way Data Flow,
● "smart" vs "dumb" components,
We ‘ll share recipes from our real world experience so that you can productively &
reliably build a complex application out of reusable Components.
We all love AngularJs
● Simple & Powerful
○ Two way data binding is legendary
○ Dependency Injection is awesome
○ Routing is very flexible
○ D.R.Y and reusable code made easy
○ Components/Directives FTW
○ Modular and component-driven
…
○ Testable code
We all love AngularJs
Real world apps are not easy
Bringing a complex application to production
requires more than quickly bind form fields:
● decoupling unrelated parts
● preventing fragility in the face of changes
● keeping collaboration effective as team grows
● avoiding performance issues
Angular gives us good tools
- but we need to use them in the right way
Avoiding bad practices
Often, as the application starts to grow, we see
● single large controller and HTML file per view
○ thousands of lines each
● significant repetition across views
○ same HTML fragments in many files
● “Spaghetti Binding”
○ creates dependencies between unrelated parts
Code becomes hard to navigate / risky to change
We need Software Engineering for the Frontend, too
“Spaghetti Binding” vs Components
What is a Component?
● Self-contained set of UI and logic
○ encapsulates a specific behaviour
○ provides an explicit API
● Since Angular 1.5, special kind of Directive with
○ UI in a template
○ Logic in a controller
○ some metadata (inputs, outputs, …)
● Makes it easier/cheaper to do a good design
○ pushing the community towards best practices
● In Angular 2, the main application construct
Most of the concepts that we present apply to both
Angular 1.5 & Angular 2.0
although syntax is different
Example App: NG Component Mail
Full Source in https://github.com/carlobonamico/angular-component-based
Thinking in Components
<message-list>
<folder-list
> <nav-actions>
<message-viewer>
<search-panel>
<folder-list
>
<message-actions>
Design the Component API
Define input and output properties
● Keep naming conventions consistent
● Follow Clean Code guidelines
<component>
inputs
outputs
<folder-list> API and behavior
input → folder array, title, allowCreate
output → selected folder
encapsulated state and
behaviour →
current folder, select with click,
sorting, filtering
● = → two-way binding
● < → one-way binding
● @ → input string
● ? → optional
<folder-list> - Declaring Inputs
Template
Component
Controller
Passing Inputs to <folder-list>
FolderList Component
Why didn’t we use “=”?
The “=” qualifier means that the binding is two-way
● the <folder-list> component could even replace
the folder array with another one
○ while it’s role is just to display it
● and this change could also immediately affect
various other parts of the page which reference
the folder array in their {{}} expressions and
$watch-es
Guideline: default to “<” for component inputs
● one-way change propagation
Two-way bindings pros and cons
● Very effective collaboration “in the small”
○ like when all people in a room can talk to each
other to solve a problem
○ ng-model for bi-directional updates between
form inputs and model
○ a validation expression can reference several
model variables
● creates chaos “in the large”
○ think all people in the building talking to any
one else
How to handle <folder-list> Output?
Passing the selected folder to the MailController
which updates the message list - ideas?
● Option 1
■ $scope.$parent.currentFolder = selectedFolder
○ avoid! it makes the component non-reusable
● Option 2 - two-way binding
■ binding selectedFolder : “=”
■ <folder-list selected-folder=”mailCtrl.currentFolder”>
■ in the parent, $watch(‘currentFolder’, function(){
loadMessages(currentFolder)})
Making Outputs explicit with Events
Option 3 - The component
● detects when a significant user action takes place
● updates its internal state
○ e.g. track the selected folder
● updates its view
○ display the element in bold / red
● sends an event to notify the parent component
○ including relevant data (e.g. folder id / name)
● lets the parent component decide what to do then
○ e.g. retrieving a new message list
Sending the event in <folder-list>
● We declare an output binding with “&”
● Angular injects an emitter function in the controller
● We call it passing an Event Object including
relevant data
MailController
<folder-list>
component
Using the component output
Specify an expression to be executed in the parent
scope when the event is received
Parent Component Controller
FolderListController
mail-view HTML
Advantages
Stonger Encapsulation (isolated scope + explicit
binding)
● changing the component internal implementation
has less impact on the rest of the application
● more decoupling, less regressions
Reusability (with parametrization)
● same component used in different contexts
○ <message-list> can display either folder
messages and search results
Advantages
Better Collaboration
● less conflicts when team grows
● easier to test for regressions
More Clarity and Readability
● I can effectively use a component knowing only
its API (the bindings section)
● the link to other component is very clear and
explict in the HTML
Components all the way down
What happens if we consistently apply this pattern
across the entire application?
The application becomes...
A tree of collaborating Components
<mail-view>
<folder-list> <message-list>
<nav-actions><common-star>
<message-view>
<common-star>
Types of Components
<mail-view>
<folder-list> <message-list>
<nav-actions><common-star>
<message-view>
<common-star>
more
application - specific
more generic/reusable
Types of Components
<mail-view>
<folder-list> <message-list>
<nav-actions><common-star>
<message-view>
<common-star>
“Smart” components
“Dumb” components
Services /
$http
Components: Smart vs Dumb
● Also called stateful
● Provides data - e.g. from http
REST clients
● May receive initial data via
route resolves
● Has knowledge of the
current state
● Is informed by stateless
components when
something needs to change
● Also called stateless
● Like a pure JavaScript
function
● It receives data via property
binding
● it focuses on rendering and
interaction without
managing business logic
● It requests state changes
through explicit events
Data Flow “down”: property binding
Component pass a subset of their model to children
<mail-view>
<folder-list> <message-list>
<nav-actions><common-star>
<message-view>
<common-star>
folders
messages
currentMessage
Data Flow “up”: events & callbacks
Component pass relevant events/changes to parent
<mail-view>
<folder-list> <message-list>
<nav-actions><common-star>
<message-view>
<common-star>
onSelected()
onCurrentMsg()
onStar()
onReply()
onNext()
Component Interaction
Complex behaviour achieved through collaboration
<mail-view>
<folder-list> <message-list> <message-view>
onSelected()
Component Interaction
Complex behaviour achieved through collaboration
<mail-view>
<folder-list> <message-list> <message-view>
messages
Component Interaction
Complex behaviour achieved through collaboration
<mail-view>
<folder-list> <message-list> <message-view>
onSelected()
onCurrentMsg()messages
currentMessage
Advantages
If a component passes data to its children, that it
knows well, the risk of unintended side effects is low
If a component notifies its parent, the change can
potentially affect unrelated / not yet developed parts
● more explicit and controlled
● parent component can mediate and orchestrate
how the child interacts with the rest
Also, the tree is very good for performance
Component means Composable
What is the right size of a component?
Component means Composable
There is no “right answer”, but...
● if a component becomes too big, split it into
collaborating child components
Basic Design Principles
●Low Coupling - avoid unneeded dependencies
●High Cohesion - Single Responsibility Principle
(SOLID Principle)
− separate things that change for different
reasons or at different times
In short: don’t put your socks in the fridge...
Single Responsibility applied
If you need to do 2 things, make 3 components
● A, B
● C that does A + B
Example
● <upload-attachment> does file browsing and calls
the UploadService HTTP client
● <attachment-list> displays the currently attached
messages
● <mail-attachments> groups the first two
More Component goodies
● Since Angular 1.5.3, Components can declare
"lifecycle hooks"
● $onInit()
○ one-time initialization after interconnected
components have been bound
○ https://toddmotto.com/on-init-require-object-syntax-angular
-component
● $onDestroy()
○ deallocate resources when the component is
removed from the view
○ e.g. a websocket in a chat
Change notification
● $onChanges
○ Called when “<” / input bindings are updated
○ parameter: a changes object including
■ keys for each changed property
■ previousValue and currentValue
● Very effective for
○ compute derived values
■ compute unread messages count
○ apply filtering or sorting to data
■ display various sets of messages according to a choice
http://blog.thoughtram.io/angularjs/2016/03/29/exploring-angular-1.5-lifecycle-hooks.html
$onChanges: filtering message list
Test a Component Controller
Pass inputs to the controller and test its behaviour
ngMock module has been updated with the
$componentController method
Test a Component
we can compile the element and test
● that it renders what we expected
● that it correctly reacts to user events
What happens in Angular 2?
Components in Angular 2
Syntax, some costructs change, but
Component-based Architecture is even stronger
● no more stand-alone controllers
● even application home, first-level views become
components
○ component-based routing
● component metadata + Typescript allow for
○ better tooling support
○ completion, validation
○ more explicit API definition
<folder-list> in Angular2
Components
are
the future of web apps
References on Components
Angular 1.5 Components reference
https://docs.angularjs.org/guide/component
Exploring Angular 1.5 Components
https://toddmotto.com/exploring-the-angular-1-5-component-meth
od/
Refactoring an 1.5 application to Components
https://teropa.info/blog/2015/10/18/refactoring-angular-apps-to-co
mponents.html
Components in Angular 2
https://angular.io/docs/ts/latest/cookbook/component-communicat
ion.html
Thank you!
● Other presentations
− http://www.slideshare.net/carlo.bonamico/presentations
● Follow us on Twitter
− @carlobonamico @nis_srl
● updates on AngularJS!
● and some Security, Ansible, Continuous Delivery
● Contact us
− carlo.bonamico@gmail.com / carlo.bonamico@nispro.it
− Sonia.pini@nispro.it
● Our company
− http://www.nispro.it

Contenu connexe

Tendances

ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.Ni
 
Code Camp 06 Model View Presenter Architecture
Code Camp 06   Model View Presenter ArchitectureCode Camp 06   Model View Presenter Architecture
Code Camp 06 Model View Presenter Architecturebitburner93
 
Design pattern in android
Design pattern in androidDesign pattern in android
Design pattern in androidJay Kumarr
 
Ppt of Basic MVC Structure
Ppt of Basic MVC StructurePpt of Basic MVC Structure
Ppt of Basic MVC StructureDipika Wadhvani
 
MVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,MobileMVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,Mobilenaral
 
Model view controller (mvc)
Model view controller (mvc)Model view controller (mvc)
Model view controller (mvc)M Ahsan Khan
 
Ios development 2
Ios development 2Ios development 2
Ios development 2elnaqah
 
Advanced java lab swing mvc awt
Advanced java lab swing mvc awtAdvanced java lab swing mvc awt
Advanced java lab swing mvc awtvishal choudhary
 
Model View Presenter
Model View Presenter Model View Presenter
Model View Presenter rendra toro
 
Clean architecture: Android
Clean architecture: AndroidClean architecture: Android
Clean architecture: Androidintive
 
MVC Seminar Presantation
MVC Seminar PresantationMVC Seminar Presantation
MVC Seminar PresantationAbhishek Yadav
 
Caliburn.micro
Caliburn.microCaliburn.micro
Caliburn.microbwullems
 
Just a View: An Introduction To Model-View-Controller Pattern
Just a View:  An Introduction To Model-View-Controller PatternJust a View:  An Introduction To Model-View-Controller Pattern
Just a View: An Introduction To Model-View-Controller PatternAaron Nordyke
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC PresentationVolkan Uzun
 
Model View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In AspnetModel View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In Aspnetrainynovember12
 

Tendances (20)

ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.
 
Code Camp 06 Model View Presenter Architecture
Code Camp 06   Model View Presenter ArchitectureCode Camp 06   Model View Presenter Architecture
Code Camp 06 Model View Presenter Architecture
 
JAX 08 - Agile RCP
JAX 08 - Agile RCPJAX 08 - Agile RCP
JAX 08 - Agile RCP
 
Why Use MVC?
Why Use MVC?Why Use MVC?
Why Use MVC?
 
Design pattern in android
Design pattern in androidDesign pattern in android
Design pattern in android
 
Ppt of Basic MVC Structure
Ppt of Basic MVC StructurePpt of Basic MVC Structure
Ppt of Basic MVC Structure
 
MVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,MobileMVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,Mobile
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
Model view controller (mvc)
Model view controller (mvc)Model view controller (mvc)
Model view controller (mvc)
 
Ios development 2
Ios development 2Ios development 2
Ios development 2
 
Advanced java lab swing mvc awt
Advanced java lab swing mvc awtAdvanced java lab swing mvc awt
Advanced java lab swing mvc awt
 
MVC architecture
MVC architectureMVC architecture
MVC architecture
 
Model View Presenter
Model View Presenter Model View Presenter
Model View Presenter
 
Clean architecture: Android
Clean architecture: AndroidClean architecture: Android
Clean architecture: Android
 
MVC Seminar Presantation
MVC Seminar PresantationMVC Seminar Presantation
MVC Seminar Presantation
 
Caliburn.micro
Caliburn.microCaliburn.micro
Caliburn.micro
 
Just a View: An Introduction To Model-View-Controller Pattern
Just a View:  An Introduction To Model-View-Controller PatternJust a View:  An Introduction To Model-View-Controller Pattern
Just a View: An Introduction To Model-View-Controller Pattern
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
 
Model View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In AspnetModel View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In Aspnet
 
What is MVC?
What is MVC?What is MVC?
What is MVC?
 

En vedette

Progressive Web Apps: trick or real magic? - Maurizio Mangione - Codemotion M...
Progressive Web Apps: trick or real magic? - Maurizio Mangione - Codemotion M...Progressive Web Apps: trick or real magic? - Maurizio Mangione - Codemotion M...
Progressive Web Apps: trick or real magic? - Maurizio Mangione - Codemotion M...Codemotion
 
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016Codemotion
 
Un anno di Front End Meetup! Gioie, dolori e festeggiamenti! - Giacomo Zinett...
Un anno di Front End Meetup! Gioie, dolori e festeggiamenti! - Giacomo Zinett...Un anno di Front End Meetup! Gioie, dolori e festeggiamenti! - Giacomo Zinett...
Un anno di Front End Meetup! Gioie, dolori e festeggiamenti! - Giacomo Zinett...Codemotion
 
Promises are so passé - Tim Perry - Codemotion Milan 2016
Promises are so passé - Tim Perry - Codemotion Milan 2016Promises are so passé - Tim Perry - Codemotion Milan 2016
Promises are so passé - Tim Perry - Codemotion Milan 2016Codemotion
 
Human vs Bot: Giocare a Sasso-Carta-Forbici - Matteo Valoriani, Antimo Musone...
Human vs Bot: Giocare a Sasso-Carta-Forbici - Matteo Valoriani, Antimo Musone...Human vs Bot: Giocare a Sasso-Carta-Forbici - Matteo Valoriani, Antimo Musone...
Human vs Bot: Giocare a Sasso-Carta-Forbici - Matteo Valoriani, Antimo Musone...Codemotion
 
From a developer to a teamleader — an unexpected journey - Vitaly Sharovatov ...
From a developer to a teamleader — an unexpected journey - Vitaly Sharovatov ...From a developer to a teamleader — an unexpected journey - Vitaly Sharovatov ...
From a developer to a teamleader — an unexpected journey - Vitaly Sharovatov ...Codemotion
 
Wearable Botnets and Happy Hacked Drivers - Andrea Pompili - Codemotion Milan...
Wearable Botnets and Happy Hacked Drivers - Andrea Pompili - Codemotion Milan...Wearable Botnets and Happy Hacked Drivers - Andrea Pompili - Codemotion Milan...
Wearable Botnets and Happy Hacked Drivers - Andrea Pompili - Codemotion Milan...Codemotion
 
Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...
Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...
Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...Codemotion
 
Public speaking 4 geeks - Lorenzo Barbieri - Codemotion Milan 2016
Public speaking 4 geeks - Lorenzo Barbieri - Codemotion Milan 2016Public speaking 4 geeks - Lorenzo Barbieri - Codemotion Milan 2016
Public speaking 4 geeks - Lorenzo Barbieri - Codemotion Milan 2016Codemotion
 
Scaling applications using AngularJS and TypeScript - Simona Cotin - Codemoti...
Scaling applications using AngularJS and TypeScript - Simona Cotin - Codemoti...Scaling applications using AngularJS and TypeScript - Simona Cotin - Codemoti...
Scaling applications using AngularJS and TypeScript - Simona Cotin - Codemoti...Codemotion
 
Coding Culture - Sven Peters - Codemotion Milan 2016
Coding Culture - Sven Peters - Codemotion Milan 2016Coding Culture - Sven Peters - Codemotion Milan 2016
Coding Culture - Sven Peters - Codemotion Milan 2016Codemotion
 
We started with RoR, C++, C#, nodeJS and... at the end we chose GO - Maurizio...
We started with RoR, C++, C#, nodeJS and... at the end we chose GO - Maurizio...We started with RoR, C++, C#, nodeJS and... at the end we chose GO - Maurizio...
We started with RoR, C++, C#, nodeJS and... at the end we chose GO - Maurizio...Codemotion
 
Getting developers hooked on your API - Nicolas Garnier - Codemotion Amsterda...
Getting developers hooked on your API - Nicolas Garnier - Codemotion Amsterda...Getting developers hooked on your API - Nicolas Garnier - Codemotion Amsterda...
Getting developers hooked on your API - Nicolas Garnier - Codemotion Amsterda...Codemotion
 
Graph databases and the Panama Papers - Stefan Armbruster - Codemotion Milan ...
Graph databases and the Panama Papers - Stefan Armbruster - Codemotion Milan ...Graph databases and the Panama Papers - Stefan Armbruster - Codemotion Milan ...
Graph databases and the Panama Papers - Stefan Armbruster - Codemotion Milan ...Codemotion
 
Reactive Thinking in iOS Development - Pedro Piñera Buendía - Codemotion Amst...
Reactive Thinking in iOS Development - Pedro Piñera Buendía - Codemotion Amst...Reactive Thinking in iOS Development - Pedro Piñera Buendía - Codemotion Amst...
Reactive Thinking in iOS Development - Pedro Piñera Buendía - Codemotion Amst...Codemotion
 
Impostor syndrome and individual competence - Jessica Rose - Codemotion Amste...
Impostor syndrome and individual competence - Jessica Rose - Codemotion Amste...Impostor syndrome and individual competence - Jessica Rose - Codemotion Amste...
Impostor syndrome and individual competence - Jessica Rose - Codemotion Amste...Codemotion
 
UGIdotNET Meetup - Andrea Saltarello - Codemotion Milan 2016
UGIdotNET Meetup - Andrea Saltarello - Codemotion Milan 2016UGIdotNET Meetup - Andrea Saltarello - Codemotion Milan 2016
UGIdotNET Meetup - Andrea Saltarello - Codemotion Milan 2016Codemotion
 
Build Apps for Apple Watch - Francesco Novelli - Codemotion Milan 2016
Build Apps for Apple Watch - Francesco Novelli - Codemotion Milan 2016Build Apps for Apple Watch - Francesco Novelli - Codemotion Milan 2016
Build Apps for Apple Watch - Francesco Novelli - Codemotion Milan 2016Codemotion
 
Outthink: machines coping with humans. A journey into the cognitive world - E...
Outthink: machines coping with humans. A journey into the cognitive world - E...Outthink: machines coping with humans. A journey into the cognitive world - E...
Outthink: machines coping with humans. A journey into the cognitive world - E...Codemotion
 
Living on the Edge (Service): Bundling Microservices to Optimize Consumption ...
Living on the Edge (Service): Bundling Microservices to Optimize Consumption ...Living on the Edge (Service): Bundling Microservices to Optimize Consumption ...
Living on the Edge (Service): Bundling Microservices to Optimize Consumption ...Codemotion
 

En vedette (20)

Progressive Web Apps: trick or real magic? - Maurizio Mangione - Codemotion M...
Progressive Web Apps: trick or real magic? - Maurizio Mangione - Codemotion M...Progressive Web Apps: trick or real magic? - Maurizio Mangione - Codemotion M...
Progressive Web Apps: trick or real magic? - Maurizio Mangione - Codemotion M...
 
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
 
Un anno di Front End Meetup! Gioie, dolori e festeggiamenti! - Giacomo Zinett...
Un anno di Front End Meetup! Gioie, dolori e festeggiamenti! - Giacomo Zinett...Un anno di Front End Meetup! Gioie, dolori e festeggiamenti! - Giacomo Zinett...
Un anno di Front End Meetup! Gioie, dolori e festeggiamenti! - Giacomo Zinett...
 
Promises are so passé - Tim Perry - Codemotion Milan 2016
Promises are so passé - Tim Perry - Codemotion Milan 2016Promises are so passé - Tim Perry - Codemotion Milan 2016
Promises are so passé - Tim Perry - Codemotion Milan 2016
 
Human vs Bot: Giocare a Sasso-Carta-Forbici - Matteo Valoriani, Antimo Musone...
Human vs Bot: Giocare a Sasso-Carta-Forbici - Matteo Valoriani, Antimo Musone...Human vs Bot: Giocare a Sasso-Carta-Forbici - Matteo Valoriani, Antimo Musone...
Human vs Bot: Giocare a Sasso-Carta-Forbici - Matteo Valoriani, Antimo Musone...
 
From a developer to a teamleader — an unexpected journey - Vitaly Sharovatov ...
From a developer to a teamleader — an unexpected journey - Vitaly Sharovatov ...From a developer to a teamleader — an unexpected journey - Vitaly Sharovatov ...
From a developer to a teamleader — an unexpected journey - Vitaly Sharovatov ...
 
Wearable Botnets and Happy Hacked Drivers - Andrea Pompili - Codemotion Milan...
Wearable Botnets and Happy Hacked Drivers - Andrea Pompili - Codemotion Milan...Wearable Botnets and Happy Hacked Drivers - Andrea Pompili - Codemotion Milan...
Wearable Botnets and Happy Hacked Drivers - Andrea Pompili - Codemotion Milan...
 
Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...
Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...
Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...
 
Public speaking 4 geeks - Lorenzo Barbieri - Codemotion Milan 2016
Public speaking 4 geeks - Lorenzo Barbieri - Codemotion Milan 2016Public speaking 4 geeks - Lorenzo Barbieri - Codemotion Milan 2016
Public speaking 4 geeks - Lorenzo Barbieri - Codemotion Milan 2016
 
Scaling applications using AngularJS and TypeScript - Simona Cotin - Codemoti...
Scaling applications using AngularJS and TypeScript - Simona Cotin - Codemoti...Scaling applications using AngularJS and TypeScript - Simona Cotin - Codemoti...
Scaling applications using AngularJS and TypeScript - Simona Cotin - Codemoti...
 
Coding Culture - Sven Peters - Codemotion Milan 2016
Coding Culture - Sven Peters - Codemotion Milan 2016Coding Culture - Sven Peters - Codemotion Milan 2016
Coding Culture - Sven Peters - Codemotion Milan 2016
 
We started with RoR, C++, C#, nodeJS and... at the end we chose GO - Maurizio...
We started with RoR, C++, C#, nodeJS and... at the end we chose GO - Maurizio...We started with RoR, C++, C#, nodeJS and... at the end we chose GO - Maurizio...
We started with RoR, C++, C#, nodeJS and... at the end we chose GO - Maurizio...
 
Getting developers hooked on your API - Nicolas Garnier - Codemotion Amsterda...
Getting developers hooked on your API - Nicolas Garnier - Codemotion Amsterda...Getting developers hooked on your API - Nicolas Garnier - Codemotion Amsterda...
Getting developers hooked on your API - Nicolas Garnier - Codemotion Amsterda...
 
Graph databases and the Panama Papers - Stefan Armbruster - Codemotion Milan ...
Graph databases and the Panama Papers - Stefan Armbruster - Codemotion Milan ...Graph databases and the Panama Papers - Stefan Armbruster - Codemotion Milan ...
Graph databases and the Panama Papers - Stefan Armbruster - Codemotion Milan ...
 
Reactive Thinking in iOS Development - Pedro Piñera Buendía - Codemotion Amst...
Reactive Thinking in iOS Development - Pedro Piñera Buendía - Codemotion Amst...Reactive Thinking in iOS Development - Pedro Piñera Buendía - Codemotion Amst...
Reactive Thinking in iOS Development - Pedro Piñera Buendía - Codemotion Amst...
 
Impostor syndrome and individual competence - Jessica Rose - Codemotion Amste...
Impostor syndrome and individual competence - Jessica Rose - Codemotion Amste...Impostor syndrome and individual competence - Jessica Rose - Codemotion Amste...
Impostor syndrome and individual competence - Jessica Rose - Codemotion Amste...
 
UGIdotNET Meetup - Andrea Saltarello - Codemotion Milan 2016
UGIdotNET Meetup - Andrea Saltarello - Codemotion Milan 2016UGIdotNET Meetup - Andrea Saltarello - Codemotion Milan 2016
UGIdotNET Meetup - Andrea Saltarello - Codemotion Milan 2016
 
Build Apps for Apple Watch - Francesco Novelli - Codemotion Milan 2016
Build Apps for Apple Watch - Francesco Novelli - Codemotion Milan 2016Build Apps for Apple Watch - Francesco Novelli - Codemotion Milan 2016
Build Apps for Apple Watch - Francesco Novelli - Codemotion Milan 2016
 
Outthink: machines coping with humans. A journey into the cognitive world - E...
Outthink: machines coping with humans. A journey into the cognitive world - E...Outthink: machines coping with humans. A journey into the cognitive world - E...
Outthink: machines coping with humans. A journey into the cognitive world - E...
 
Living on the Edge (Service): Bundling Microservices to Optimize Consumption ...
Living on the Edge (Service): Bundling Microservices to Optimize Consumption ...Living on the Edge (Service): Bundling Microservices to Optimize Consumption ...
Living on the Edge (Service): Bundling Microservices to Optimize Consumption ...
 

Similaire à Angular Rebooted: Components Everywhere - Carlo Bonamico, Sonia Pini - Codemotion Milan 2016

Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...
Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...
Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...Codemotion
 
Build Your Own Angular Component Library
Build Your Own Angular Component LibraryBuild Your Own Angular Component Library
Build Your Own Angular Component LibraryCarlo Bonamico
 
Nicholas Gustilo "Clean Android: building great mobile apps"
Nicholas Gustilo "Clean Android: building great mobile apps"Nicholas Gustilo "Clean Android: building great mobile apps"
Nicholas Gustilo "Clean Android: building great mobile apps"IT Event
 
Think components. March 2017
Think components. March 2017Think components. March 2017
Think components. March 2017Ivan Babak
 
AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)Alex Ross
 
Fighting legacy with hexagonal architecture and frameworkless php
Fighting legacy with hexagonal architecture and frameworkless phpFighting legacy with hexagonal architecture and frameworkless php
Fighting legacy with hexagonal architecture and frameworkless phpFabio Pellegrini
 
Top 7 Angular Best Practices to Organize Your Angular App
Top 7 Angular Best Practices to Organize Your Angular AppTop 7 Angular Best Practices to Organize Your Angular App
Top 7 Angular Best Practices to Organize Your Angular AppKaty Slemon
 
Single Responsibility Principle
Single Responsibility PrincipleSingle Responsibility Principle
Single Responsibility PrincipleBADR
 
Angular 1.x reloaded: improve your app now! and get ready for 2.0
Angular 1.x reloaded:  improve your app now! and get ready for 2.0Angular 1.x reloaded:  improve your app now! and get ready for 2.0
Angular 1.x reloaded: improve your app now! and get ready for 2.0Carlo Bonamico
 
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...Luis Valencia
 
Angular interview questions
Angular interview questionsAngular interview questions
Angular interview questionsGoa App
 
DOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in cDOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in cfloraaluoch3
 
Angular2 with type script
Angular2 with type scriptAngular2 with type script
Angular2 with type scriptRavi Mone
 
Foster - Getting started with Angular
Foster - Getting started with AngularFoster - Getting started with Angular
Foster - Getting started with AngularMukundSonaiya1
 
Angular js 1.3 presentation for fed nov 2014
Angular js 1.3 presentation for fed   nov 2014Angular js 1.3 presentation for fed   nov 2014
Angular js 1.3 presentation for fed nov 2014Sarah Hudson
 
Data Sharing Between Child and Parent Components in AngularJS
Data Sharing Between Child and Parent Components in AngularJSData Sharing Between Child and Parent Components in AngularJS
Data Sharing Between Child and Parent Components in AngularJSFibonalabs
 

Similaire à Angular Rebooted: Components Everywhere - Carlo Bonamico, Sonia Pini - Codemotion Milan 2016 (20)

Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...
Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...
Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...
 
Build Your Own Angular Component Library
Build Your Own Angular Component LibraryBuild Your Own Angular Component Library
Build Your Own Angular Component Library
 
Nicholas Gustilo "Clean Android: building great mobile apps"
Nicholas Gustilo "Clean Android: building great mobile apps"Nicholas Gustilo "Clean Android: building great mobile apps"
Nicholas Gustilo "Clean Android: building great mobile apps"
 
Think components. March 2017
Think components. March 2017Think components. March 2017
Think components. March 2017
 
AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)
 
Fighting legacy with hexagonal architecture and frameworkless php
Fighting legacy with hexagonal architecture and frameworkless phpFighting legacy with hexagonal architecture and frameworkless php
Fighting legacy with hexagonal architecture and frameworkless php
 
How Does Angular Work?
How Does Angular Work?How Does Angular Work?
How Does Angular Work?
 
Top 7 Angular Best Practices to Organize Your Angular App
Top 7 Angular Best Practices to Organize Your Angular AppTop 7 Angular Best Practices to Organize Your Angular App
Top 7 Angular Best Practices to Organize Your Angular App
 
Creating a SPA blog withAngular and Cloud Firestore
Creating a SPA blog withAngular and Cloud FirestoreCreating a SPA blog withAngular and Cloud Firestore
Creating a SPA blog withAngular and Cloud Firestore
 
Single Responsibility Principle
Single Responsibility PrincipleSingle Responsibility Principle
Single Responsibility Principle
 
Angular 1.x reloaded: improve your app now! and get ready for 2.0
Angular 1.x reloaded:  improve your app now! and get ready for 2.0Angular 1.x reloaded:  improve your app now! and get ready for 2.0
Angular 1.x reloaded: improve your app now! and get ready for 2.0
 
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
 
Angular interview questions
Angular interview questionsAngular interview questions
Angular interview questions
 
DOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in cDOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in c
 
Angular2 with type script
Angular2 with type scriptAngular2 with type script
Angular2 with type script
 
DDD with Behat
DDD with BehatDDD with Behat
DDD with Behat
 
Foster - Getting started with Angular
Foster - Getting started with AngularFoster - Getting started with Angular
Foster - Getting started with Angular
 
Angular js 1.3 presentation for fed nov 2014
Angular js 1.3 presentation for fed   nov 2014Angular js 1.3 presentation for fed   nov 2014
Angular js 1.3 presentation for fed nov 2014
 
Data Sharing Between Child and Parent Components in AngularJS
Data Sharing Between Child and Parent Components in AngularJSData Sharing Between Child and Parent Components in AngularJS
Data Sharing Between Child and Parent Components in AngularJS
 
AngularJS best practices
AngularJS best practicesAngularJS best practices
AngularJS best practices
 

Plus de Codemotion

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Codemotion
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyCodemotion
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaCodemotion
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserCodemotion
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Codemotion
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Codemotion
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Codemotion
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 - Codemotion
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Codemotion
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Codemotion
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Codemotion
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Codemotion
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Codemotion
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Codemotion
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Codemotion
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...Codemotion
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Codemotion
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Codemotion
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Codemotion
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Codemotion
 

Plus de Codemotion (20)

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending story
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storia
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard Altwasser
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
 

Dernier

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Dernier (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

Angular Rebooted: Components Everywhere - Carlo Bonamico, Sonia Pini - Codemotion Milan 2016

  • 1. Angular Rebooted: Components Everywhere Carlo Bonamico -Sonia Pini MILAN 25-26 NOVEMBER 2016 sonia.pini@nispro.it carlo.bonamico@nispro.it - NIS s.r.l. - a DGS company carlo.bonamico@gmail.com – Genova Java User Group Twitter: @carlobonamico @nis_srl
  • 2. Abstract Attracted by AngularJS power and simplicity, you have chosen it for your next project. Getting started with DataBinding, Scopes and Controllers was relatively quick and easy... But what do you need to effectively bring a complex application to Production? We discuss ● the new Component API, ● lifecycle callbacks - $onChanges ● selecting different ways for components to collaborate ● choosing between Two-Way Binding and One-Way Data Flow, ● "smart" vs "dumb" components, We ‘ll share recipes from our real world experience so that you can productively & reliably build a complex application out of reusable Components.
  • 3. We all love AngularJs ● Simple & Powerful ○ Two way data binding is legendary ○ Dependency Injection is awesome ○ Routing is very flexible ○ D.R.Y and reusable code made easy ○ Components/Directives FTW ○ Modular and component-driven … ○ Testable code We all love AngularJs
  • 4. Real world apps are not easy Bringing a complex application to production requires more than quickly bind form fields: ● decoupling unrelated parts ● preventing fragility in the face of changes ● keeping collaboration effective as team grows ● avoiding performance issues Angular gives us good tools - but we need to use them in the right way
  • 5. Avoiding bad practices Often, as the application starts to grow, we see ● single large controller and HTML file per view ○ thousands of lines each ● significant repetition across views ○ same HTML fragments in many files ● “Spaghetti Binding” ○ creates dependencies between unrelated parts Code becomes hard to navigate / risky to change We need Software Engineering for the Frontend, too
  • 7. What is a Component? ● Self-contained set of UI and logic ○ encapsulates a specific behaviour ○ provides an explicit API ● Since Angular 1.5, special kind of Directive with ○ UI in a template ○ Logic in a controller ○ some metadata (inputs, outputs, …) ● Makes it easier/cheaper to do a good design ○ pushing the community towards best practices ● In Angular 2, the main application construct
  • 8. Most of the concepts that we present apply to both Angular 1.5 & Angular 2.0 although syntax is different
  • 9. Example App: NG Component Mail Full Source in https://github.com/carlobonamico/angular-component-based
  • 10. Thinking in Components <message-list> <folder-list > <nav-actions> <message-viewer> <search-panel> <folder-list > <message-actions>
  • 11. Design the Component API Define input and output properties ● Keep naming conventions consistent ● Follow Clean Code guidelines <component> inputs outputs
  • 12. <folder-list> API and behavior input → folder array, title, allowCreate output → selected folder encapsulated state and behaviour → current folder, select with click, sorting, filtering
  • 13. ● = → two-way binding ● < → one-way binding ● @ → input string ● ? → optional <folder-list> - Declaring Inputs
  • 15. Passing Inputs to <folder-list> FolderList Component
  • 16. Why didn’t we use “=”? The “=” qualifier means that the binding is two-way ● the <folder-list> component could even replace the folder array with another one ○ while it’s role is just to display it ● and this change could also immediately affect various other parts of the page which reference the folder array in their {{}} expressions and $watch-es Guideline: default to “<” for component inputs ● one-way change propagation
  • 17. Two-way bindings pros and cons ● Very effective collaboration “in the small” ○ like when all people in a room can talk to each other to solve a problem ○ ng-model for bi-directional updates between form inputs and model ○ a validation expression can reference several model variables ● creates chaos “in the large” ○ think all people in the building talking to any one else
  • 18. How to handle <folder-list> Output? Passing the selected folder to the MailController which updates the message list - ideas? ● Option 1 ■ $scope.$parent.currentFolder = selectedFolder ○ avoid! it makes the component non-reusable ● Option 2 - two-way binding ■ binding selectedFolder : “=” ■ <folder-list selected-folder=”mailCtrl.currentFolder”> ■ in the parent, $watch(‘currentFolder’, function(){ loadMessages(currentFolder)})
  • 19. Making Outputs explicit with Events Option 3 - The component ● detects when a significant user action takes place ● updates its internal state ○ e.g. track the selected folder ● updates its view ○ display the element in bold / red ● sends an event to notify the parent component ○ including relevant data (e.g. folder id / name) ● lets the parent component decide what to do then ○ e.g. retrieving a new message list
  • 20. Sending the event in <folder-list> ● We declare an output binding with “&” ● Angular injects an emitter function in the controller ● We call it passing an Event Object including relevant data MailController <folder-list> component
  • 21. Using the component output Specify an expression to be executed in the parent scope when the event is received Parent Component Controller FolderListController mail-view HTML
  • 22. Advantages Stonger Encapsulation (isolated scope + explicit binding) ● changing the component internal implementation has less impact on the rest of the application ● more decoupling, less regressions Reusability (with parametrization) ● same component used in different contexts ○ <message-list> can display either folder messages and search results
  • 23. Advantages Better Collaboration ● less conflicts when team grows ● easier to test for regressions More Clarity and Readability ● I can effectively use a component knowing only its API (the bindings section) ● the link to other component is very clear and explict in the HTML
  • 24. Components all the way down What happens if we consistently apply this pattern across the entire application? The application becomes...
  • 25. A tree of collaborating Components <mail-view> <folder-list> <message-list> <nav-actions><common-star> <message-view> <common-star>
  • 26. Types of Components <mail-view> <folder-list> <message-list> <nav-actions><common-star> <message-view> <common-star> more application - specific more generic/reusable
  • 27. Types of Components <mail-view> <folder-list> <message-list> <nav-actions><common-star> <message-view> <common-star> “Smart” components “Dumb” components Services / $http
  • 28. Components: Smart vs Dumb ● Also called stateful ● Provides data - e.g. from http REST clients ● May receive initial data via route resolves ● Has knowledge of the current state ● Is informed by stateless components when something needs to change ● Also called stateless ● Like a pure JavaScript function ● It receives data via property binding ● it focuses on rendering and interaction without managing business logic ● It requests state changes through explicit events
  • 29. Data Flow “down”: property binding Component pass a subset of their model to children <mail-view> <folder-list> <message-list> <nav-actions><common-star> <message-view> <common-star> folders messages currentMessage
  • 30. Data Flow “up”: events & callbacks Component pass relevant events/changes to parent <mail-view> <folder-list> <message-list> <nav-actions><common-star> <message-view> <common-star> onSelected() onCurrentMsg() onStar() onReply() onNext()
  • 31. Component Interaction Complex behaviour achieved through collaboration <mail-view> <folder-list> <message-list> <message-view> onSelected()
  • 32. Component Interaction Complex behaviour achieved through collaboration <mail-view> <folder-list> <message-list> <message-view> messages
  • 33. Component Interaction Complex behaviour achieved through collaboration <mail-view> <folder-list> <message-list> <message-view> onSelected() onCurrentMsg()messages currentMessage
  • 34. Advantages If a component passes data to its children, that it knows well, the risk of unintended side effects is low If a component notifies its parent, the change can potentially affect unrelated / not yet developed parts ● more explicit and controlled ● parent component can mediate and orchestrate how the child interacts with the rest Also, the tree is very good for performance
  • 35. Component means Composable What is the right size of a component?
  • 36. Component means Composable There is no “right answer”, but... ● if a component becomes too big, split it into collaborating child components Basic Design Principles ●Low Coupling - avoid unneeded dependencies ●High Cohesion - Single Responsibility Principle (SOLID Principle) − separate things that change for different reasons or at different times In short: don’t put your socks in the fridge...
  • 37. Single Responsibility applied If you need to do 2 things, make 3 components ● A, B ● C that does A + B Example ● <upload-attachment> does file browsing and calls the UploadService HTTP client ● <attachment-list> displays the currently attached messages ● <mail-attachments> groups the first two
  • 38. More Component goodies ● Since Angular 1.5.3, Components can declare "lifecycle hooks" ● $onInit() ○ one-time initialization after interconnected components have been bound ○ https://toddmotto.com/on-init-require-object-syntax-angular -component ● $onDestroy() ○ deallocate resources when the component is removed from the view ○ e.g. a websocket in a chat
  • 39. Change notification ● $onChanges ○ Called when “<” / input bindings are updated ○ parameter: a changes object including ■ keys for each changed property ■ previousValue and currentValue ● Very effective for ○ compute derived values ■ compute unread messages count ○ apply filtering or sorting to data ■ display various sets of messages according to a choice http://blog.thoughtram.io/angularjs/2016/03/29/exploring-angular-1.5-lifecycle-hooks.html
  • 41. Test a Component Controller Pass inputs to the controller and test its behaviour ngMock module has been updated with the $componentController method
  • 42. Test a Component we can compile the element and test ● that it renders what we expected ● that it correctly reacts to user events
  • 43. What happens in Angular 2?
  • 44. Components in Angular 2 Syntax, some costructs change, but Component-based Architecture is even stronger ● no more stand-alone controllers ● even application home, first-level views become components ○ component-based routing ● component metadata + Typescript allow for ○ better tooling support ○ completion, validation ○ more explicit API definition
  • 47. References on Components Angular 1.5 Components reference https://docs.angularjs.org/guide/component Exploring Angular 1.5 Components https://toddmotto.com/exploring-the-angular-1-5-component-meth od/ Refactoring an 1.5 application to Components https://teropa.info/blog/2015/10/18/refactoring-angular-apps-to-co mponents.html Components in Angular 2 https://angular.io/docs/ts/latest/cookbook/component-communicat ion.html
  • 48. Thank you! ● Other presentations − http://www.slideshare.net/carlo.bonamico/presentations ● Follow us on Twitter − @carlobonamico @nis_srl ● updates on AngularJS! ● and some Security, Ansible, Continuous Delivery ● Contact us − carlo.bonamico@gmail.com / carlo.bonamico@nispro.it − Sonia.pini@nispro.it ● Our company − http://www.nispro.it