SlideShare a Scribd company logo
A n g u l a r J S S e s s i o n s 
INTRODUCTION
GOALS FOR TODAY 
What is AngularJS ? Conceptual overview 
2 
Why and when should I use it ? 
Testing aspects 
http://angularjs.org
CONCEPTUAL OVERVIEW 
AngularJS is a structural framework for dynamic 
3 
web applications.
CONCEPTUAL OVERVIEW 
4 
Like any abstraction, it comes at a cost of 
flexibility. Not every app is a good fit for Angular
CONCEPTUAL OVERVIEW 
5 
MVC done right
CONCEPTUAL OVERVIEW 
6 
A declarative user interface
CONCEPTUAL OVERVIEW 
7 
Data models are JavaScript objects 
SCOPES
CONCEPTUAL OVERVIEW 
8 
Behavior with directives. 
DOM manipulation where they belong! 
http://www.thoughtworks.com/radar/#/techniques/698 
This involves aggressively restricting all DOM access (which usually translates to all 
jQuery usage) to a thin 'segregation layer'. One pleasant side-effect of this approach is 
that everything outside of that segregated DOM layer can be tested rapidly in isolation 
from the browser using a lean JavaScript engine such as node.js.
CONCEPTUAL OVERVIEW 
9 
Flexibility with Filters
CONCEPTUAL OVERVIEW 
10 
Context aware communication
CONCEPTUAL OVERVIEW 
11 
You will write less code. 
Yes you will 
Registering callbacks Manipulating HTML DOM programmatically 
Marshaling data to and from the UI 
Writing tons of initialization code just to get started
CONCEPTUAL OVERVIEW 
Designers tend to love it. HTML stays declarative 
12
CONCEPTUAL OVERVIEW 
INVERSION OF CONTROL 
through 
DEPENDENCY INJECTION 
PLUS GOOD TESTING/MOCKING TOOLS 
TESTABILITY! 
13
CONCEPTUAL OVERVIEW 
14 
MODULE MODULE 
CONFIG FILTER DIRECTIVE FACTORY CONTROLLER 
ROUTES SERVICE 
PROVIDER 
VALUE
CONCEPTUAL OVERVIEW 
15 
SHOW TIME!
CONCEPTUAL OVERVIEW 
16 
DIRECTIVE 
DIRECTIVE 
"{{ name }}" is a binding expression!
CONCEPTUAL OVERVIEW 
TWO WAY DATA BINDING 
TEMPLATE 
VIEW 
COMPILE 
LINK 
MODEL 
17
CONCEPTUAL OVERVIEW 
18 
This example contains bad 
practices. It was created for 
educational purposes only! 
FILTER
CONCEPTUAL OVERVIEW 
19 
MOMODDUULELE 
CONFIG 
PROVIDERS 
ROUTES CONTROLLER 
DIRECTIVE FACTORY 
FILTER 
SERVICE
CONCEPTUAL OVERVIEW 
20
CONCEPTUAL OVERVIEW 
21 
Services Providers 
Directives 
Filters 
Config 
Controllers 
Factories
CONTROLLERS 
22
CONCEPTUAL OVERVIEW 
23 
Services Providers 
Directives 
Filters 
Controllers 
Factories Config
CONCEPTUAL OVERVIEW 
24 
Services Providers 
Directives 
Filters 
Controllers 
Factories Config
SERVICES/FACTORIES 
25
CONCEPTUAL OVERVIEW 
If you want your function to be called like a 
normal function, use factory. If you want your 
function to be instantiated with the new 
operator, use service. 
26
CONCEPTUAL OVERVIEW 
27 
Services Providers 
Directives 
Filters 
Controllers 
Factories Config
CONCEPTUAL OVERVIEW 
Features Factory Service Value Constant Provider 
28 
Can have dependencies yes yes no no yes 
Object available in config phase no no no yes yes 
Can create functions / primitives yes no yes yes yes
CONCEPTUAL OVERVIEW 
29 
Services Providers 
Directives 
Filters 
Controllers 
Factories Config
DIRECTIVES 
30
CONCEPTUAL OVERVIEW 
31 
Services Providers 
Directives 
Filters 
Controllers 
Factories Config
32
CONCEPTUAL OVERVIEW 
33 
Services Providers 
Directives 
Filters 
Controllers 
Factories Config
CONFIG FILE 
34
SOME BEST PRACTICES 
GOOD PRACTICES 
35
SOME BEST PRACTICES 
Controllers and Services should not 
reference the DOM 
36
SOME BEST PRACTICES 
Controllers should have view behavior 
37
SOME BEST PRACTICES 
Services should have reusable logic, independent 
of the view 
38
SOME BEST PRACTICES 
Scope should be read-only in the templates 
39
SOME BEST PRACTICES 
Be careful with simple examples. 
! 
Your architectures should reflect the system, 
not the frameworks you used in your system 
Uncle Bob - Screaming Architecture 
40
41 
ECOSYSTEM 
NG (core) ngAnimate 
ngRoute ngResource 
ngCookies 
ngTouch 
ngSanitize 
ngMock 
http://ngmodules.org/
REFERENCES 
▫︎ http://docs.angularjs.org/guide : Angular official documentation, it used to 
be very poor with very simples examples but is getting better in content 
although still using the same basics examples. 
42 
! 
!▫︎https://github.com/angular/angular.js/wiki : Very good “articles" to 
understand better what angular is doing under the hood, like managing scopes 
and directives. 
! 
!▫︎ http://www.thinkster.io/pick/GtaQ0oMGIl: "A Better Way to Learn AngularJS” 
: Very nice website that puts together a lot of good resources to learn AngularJs 
from scratch. 
! 
!▫︎http://www.youtube.com/angularjs: AngularJs official youtube channel where 
they share and live-stream their presentations. 
!
REFERENCES 
▫︎https://egghead.io/ : Videos with very simple explanation of the angular world 
such as directives, scope, controllers, very simple to start to understand what 
angular can do for you but no how it does it. 
! 
!▫︎http://joelhooks.com/ : Blog where you can find some very interesting articles 
about AngularJs such as "Modeling Data and State in Your AngularJs Application” 
! 
! ▫︎AngularJs (O'Reilly, Brad Green & Shyam Seshadri): Nice book to go deeper 
into the AngularJs concepts and what it has to offer. 
! 
43 
! ▫︎Javascript: the good parts (O'Reilly, Douglas Crockford)
THANK YOU 
Questions? 
! 
Renan Martins 
rmartins@thoughtworks.com 
! 
Tania Gonzales 
tgonzales@thoughtworks.com

More Related Content

What's hot

The Art of AngularJS - DeRailed 2014
The Art of AngularJS - DeRailed 2014The Art of AngularJS - DeRailed 2014
The Art of AngularJS - DeRailed 2014
Matt Raible
 
Why gradle
Why gradle Why gradle
Why gradle
Sercan Karaoglu
 
Introduction to Unit Tests and TDD
Introduction to Unit Tests and TDDIntroduction to Unit Tests and TDD
Introduction to Unit Tests and TDD
Betclic Everest Group Tech Team
 
Javascript Memory leaks and Performance & Angular
Javascript Memory leaks and Performance & AngularJavascript Memory leaks and Performance & Angular
Javascript Memory leaks and Performance & Angular
Erik Guzman
 
Introduction to Angular js 2.0
Introduction to Angular js 2.0Introduction to Angular js 2.0
Introduction to Angular js 2.0
Nagaraju Sangam
 
Angular js tutorial slides
Angular js tutorial slidesAngular js tutorial slides
Angular js tutorial slides
samhelman
 
React vs angular (mobile first battle)
React vs angular (mobile first battle)React vs angular (mobile first battle)
React vs angular (mobile first battle)
Michael Haberman
 
Intro to Service Worker API and its use cases
Intro to Service Worker API and its use casesIntro to Service Worker API and its use cases
Intro to Service Worker API and its use cases
satejsahu
 
Advanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JSAdvanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JS
Simon Guest
 
AngularJS Best Practices
AngularJS Best PracticesAngularJS Best Practices
AngularJS Best Practices
Narek Mamikonyan
 
AngularJS application architecture
AngularJS application architectureAngularJS application architecture
AngularJS application architecture
Gabriele Falace
 
Gettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJSGettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJS
Armin Vieweg
 
30 JavaScript optimization tips
30 JavaScript optimization tips30 JavaScript optimization tips
30 JavaScript optimization tips
Hovhannes Avoyan
 
Everything you need to know about HTML5 in 15 min
Everything you need to know about HTML5 in 15 minEverything you need to know about HTML5 in 15 min
Everything you need to know about HTML5 in 15 min
Edgar Parada
 
Why angular js Framework
Why angular js Framework Why angular js Framework
Why angular js Framework
Sakthi Bro
 
Angular based enterprise level frontend architecture
Angular based enterprise level frontend architectureAngular based enterprise level frontend architecture
Angular based enterprise level frontend architecture
Himanshu Tamrakar
 
Angularjs - lazy loading techniques
Angularjs - lazy loading techniques Angularjs - lazy loading techniques
Angularjs - lazy loading techniques
Nir Kaufman
 
Hanselman lipton asp_connections_ams304_mvc
Hanselman lipton asp_connections_ams304_mvcHanselman lipton asp_connections_ams304_mvc
Hanselman lipton asp_connections_ams304_mvc
denemedeniz
 
Angularjs
AngularjsAngularjs
Angularjs
Sabin Tamrakar
 
Angular js
Angular jsAngular js
Angular js
Dinusha Nandika
 

What's hot (20)

The Art of AngularJS - DeRailed 2014
The Art of AngularJS - DeRailed 2014The Art of AngularJS - DeRailed 2014
The Art of AngularJS - DeRailed 2014
 
Why gradle
Why gradle Why gradle
Why gradle
 
Introduction to Unit Tests and TDD
Introduction to Unit Tests and TDDIntroduction to Unit Tests and TDD
Introduction to Unit Tests and TDD
 
Javascript Memory leaks and Performance & Angular
Javascript Memory leaks and Performance & AngularJavascript Memory leaks and Performance & Angular
Javascript Memory leaks and Performance & Angular
 
Introduction to Angular js 2.0
Introduction to Angular js 2.0Introduction to Angular js 2.0
Introduction to Angular js 2.0
 
Angular js tutorial slides
Angular js tutorial slidesAngular js tutorial slides
Angular js tutorial slides
 
React vs angular (mobile first battle)
React vs angular (mobile first battle)React vs angular (mobile first battle)
React vs angular (mobile first battle)
 
Intro to Service Worker API and its use cases
Intro to Service Worker API and its use casesIntro to Service Worker API and its use cases
Intro to Service Worker API and its use cases
 
Advanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JSAdvanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JS
 
AngularJS Best Practices
AngularJS Best PracticesAngularJS Best Practices
AngularJS Best Practices
 
AngularJS application architecture
AngularJS application architectureAngularJS application architecture
AngularJS application architecture
 
Gettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJSGettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJS
 
30 JavaScript optimization tips
30 JavaScript optimization tips30 JavaScript optimization tips
30 JavaScript optimization tips
 
Everything you need to know about HTML5 in 15 min
Everything you need to know about HTML5 in 15 minEverything you need to know about HTML5 in 15 min
Everything you need to know about HTML5 in 15 min
 
Why angular js Framework
Why angular js Framework Why angular js Framework
Why angular js Framework
 
Angular based enterprise level frontend architecture
Angular based enterprise level frontend architectureAngular based enterprise level frontend architecture
Angular based enterprise level frontend architecture
 
Angularjs - lazy loading techniques
Angularjs - lazy loading techniques Angularjs - lazy loading techniques
Angularjs - lazy loading techniques
 
Hanselman lipton asp_connections_ams304_mvc
Hanselman lipton asp_connections_ams304_mvcHanselman lipton asp_connections_ams304_mvc
Hanselman lipton asp_connections_ams304_mvc
 
Angularjs
AngularjsAngularjs
Angularjs
 
Angular js
Angular jsAngular js
Angular js
 

Viewers also liked

An introduction to AngularJS
An introduction to AngularJSAn introduction to AngularJS
An introduction to AngularJS
Yogesh singh
 
AngularJS Introduction (Talk given on Aug 5 2013)
AngularJS Introduction (Talk given on Aug 5 2013)AngularJS Introduction (Talk given on Aug 5 2013)
AngularJS Introduction (Talk given on Aug 5 2013)
Abhishek Anand
 
AngularJS Introduction
AngularJS IntroductionAngularJS Introduction
AngularJS Introduction
Carlos Morales
 
JS Frameworks - Angular Vs Backbone
JS Frameworks - Angular Vs BackboneJS Frameworks - Angular Vs Backbone
JS Frameworks - Angular Vs Backbone
Gourav Jain, MCTS®
 
Hands On Intro to Node.js
Hands On Intro to Node.jsHands On Intro to Node.js
Hands On Intro to Node.js
Chris Cowan
 
How AngularJS Embraced Traditional Design Patterns
How AngularJS Embraced Traditional Design PatternsHow AngularJS Embraced Traditional Design Patterns
How AngularJS Embraced Traditional Design Patterns
Ran Mizrahi
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Jamal Sinclair O'Garro
 
Getting Started with Angular 2
Getting Started with Angular 2Getting Started with Angular 2
Getting Started with Angular 2
FITC
 

Viewers also liked (8)

An introduction to AngularJS
An introduction to AngularJSAn introduction to AngularJS
An introduction to AngularJS
 
AngularJS Introduction (Talk given on Aug 5 2013)
AngularJS Introduction (Talk given on Aug 5 2013)AngularJS Introduction (Talk given on Aug 5 2013)
AngularJS Introduction (Talk given on Aug 5 2013)
 
AngularJS Introduction
AngularJS IntroductionAngularJS Introduction
AngularJS Introduction
 
JS Frameworks - Angular Vs Backbone
JS Frameworks - Angular Vs BackboneJS Frameworks - Angular Vs Backbone
JS Frameworks - Angular Vs Backbone
 
Hands On Intro to Node.js
Hands On Intro to Node.jsHands On Intro to Node.js
Hands On Intro to Node.js
 
How AngularJS Embraced Traditional Design Patterns
How AngularJS Embraced Traditional Design PatternsHow AngularJS Embraced Traditional Design Patterns
How AngularJS Embraced Traditional Design Patterns
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Getting Started with Angular 2
Getting Started with Angular 2Getting Started with Angular 2
Getting Started with Angular 2
 

Similar to AngularJS introduction

Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
Abhishek Sur
 
AngularJS in practice
AngularJS in practiceAngularJS in practice
AngularJS in practice
Eugene Fidelin
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - Introduction
Sagar Acharya
 
Vue.js Use Cases
Vue.js Use CasesVue.js Use Cases
Vue.js Use Cases
GlobalLogic Ukraine
 
React vs Angular
React vs Angular React vs Angular
React vs Angular
Appinventiv
 
Introduction to MVC Web Framework with CodeIgniter
Introduction to MVC Web Framework with CodeIgniterIntroduction to MVC Web Framework with CodeIgniter
Introduction to MVC Web Framework with CodeIgniter
Pongsakorn U-chupala
 
AngularJS
AngularJSAngularJS
AngularJS
AngularJS AngularJS
Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
Gaurav Agrawal
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular application
Suresh Patidar
 
AngularJS By Vipin
AngularJS By VipinAngularJS By Vipin
AngularJS By Vipin
Vipin Mundayad
 
JavaScript - Kristiansand PHP
JavaScript - Kristiansand PHPJavaScript - Kristiansand PHP
JavaScript - Kristiansand PHP
holeedave
 
Overview of the AngularJS framework
Overview of the AngularJS framework Overview of the AngularJS framework
Overview of the AngularJS framework
Yakov Fain
 
Getting Started with AngularJS
Getting Started with AngularJSGetting Started with AngularJS
Getting Started with AngularJS
Edureka!
 
Angular js 1.3 basic tutorial
Angular js 1.3 basic tutorialAngular js 1.3 basic tutorial
Angular js 1.3 basic tutorial
Al-Mutaz Bellah Salahat
 
Angularjs interview questions and answers
Angularjs interview questions and answersAngularjs interview questions and answers
Angularjs interview questions and answers
Anil Singh
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelines
Qamar Abbas
 
Monorail Introduction
Monorail IntroductionMonorail Introduction
Monorail Introduction
Andrea Magnorsky
 
AzovDevMeetup 2016 | Angular 2: обзор | Александр Шевнин
AzovDevMeetup 2016 | Angular 2: обзор | Александр ШевнинAzovDevMeetup 2016 | Angular 2: обзор | Александр Шевнин
AzovDevMeetup 2016 | Angular 2: обзор | Александр Шевнин
JSC “Arcadia Inc”
 
Feature Development with jQuery
Feature Development with jQueryFeature Development with jQuery
Feature Development with jQuery
Michael Edwards
 

Similar to AngularJS introduction (20)

Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
 
AngularJS in practice
AngularJS in practiceAngularJS in practice
AngularJS in practice
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - Introduction
 
Vue.js Use Cases
Vue.js Use CasesVue.js Use Cases
Vue.js Use Cases
 
React vs Angular
React vs Angular React vs Angular
React vs Angular
 
Introduction to MVC Web Framework with CodeIgniter
Introduction to MVC Web Framework with CodeIgniterIntroduction to MVC Web Framework with CodeIgniter
Introduction to MVC Web Framework with CodeIgniter
 
AngularJS
AngularJSAngularJS
AngularJS
 
AngularJS
AngularJS AngularJS
AngularJS
 
Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular application
 
AngularJS By Vipin
AngularJS By VipinAngularJS By Vipin
AngularJS By Vipin
 
JavaScript - Kristiansand PHP
JavaScript - Kristiansand PHPJavaScript - Kristiansand PHP
JavaScript - Kristiansand PHP
 
Overview of the AngularJS framework
Overview of the AngularJS framework Overview of the AngularJS framework
Overview of the AngularJS framework
 
Getting Started with AngularJS
Getting Started with AngularJSGetting Started with AngularJS
Getting Started with AngularJS
 
Angular js 1.3 basic tutorial
Angular js 1.3 basic tutorialAngular js 1.3 basic tutorial
Angular js 1.3 basic tutorial
 
Angularjs interview questions and answers
Angularjs interview questions and answersAngularjs interview questions and answers
Angularjs interview questions and answers
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelines
 
Monorail Introduction
Monorail IntroductionMonorail Introduction
Monorail Introduction
 
AzovDevMeetup 2016 | Angular 2: обзор | Александр Шевнин
AzovDevMeetup 2016 | Angular 2: обзор | Александр ШевнинAzovDevMeetup 2016 | Angular 2: обзор | Александр Шевнин
AzovDevMeetup 2016 | Angular 2: обзор | Александр Шевнин
 
Feature Development with jQuery
Feature Development with jQueryFeature Development with jQuery
Feature Development with jQuery
 

Recently uploaded

Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 

Recently uploaded (20)

Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 

AngularJS introduction

  • 1. A n g u l a r J S S e s s i o n s INTRODUCTION
  • 2. GOALS FOR TODAY What is AngularJS ? Conceptual overview 2 Why and when should I use it ? Testing aspects http://angularjs.org
  • 3. CONCEPTUAL OVERVIEW AngularJS is a structural framework for dynamic 3 web applications.
  • 4. CONCEPTUAL OVERVIEW 4 Like any abstraction, it comes at a cost of flexibility. Not every app is a good fit for Angular
  • 5. CONCEPTUAL OVERVIEW 5 MVC done right
  • 6. CONCEPTUAL OVERVIEW 6 A declarative user interface
  • 7. CONCEPTUAL OVERVIEW 7 Data models are JavaScript objects SCOPES
  • 8. CONCEPTUAL OVERVIEW 8 Behavior with directives. DOM manipulation where they belong! http://www.thoughtworks.com/radar/#/techniques/698 This involves aggressively restricting all DOM access (which usually translates to all jQuery usage) to a thin 'segregation layer'. One pleasant side-effect of this approach is that everything outside of that segregated DOM layer can be tested rapidly in isolation from the browser using a lean JavaScript engine such as node.js.
  • 9. CONCEPTUAL OVERVIEW 9 Flexibility with Filters
  • 10. CONCEPTUAL OVERVIEW 10 Context aware communication
  • 11. CONCEPTUAL OVERVIEW 11 You will write less code. Yes you will Registering callbacks Manipulating HTML DOM programmatically Marshaling data to and from the UI Writing tons of initialization code just to get started
  • 12. CONCEPTUAL OVERVIEW Designers tend to love it. HTML stays declarative 12
  • 13. CONCEPTUAL OVERVIEW INVERSION OF CONTROL through DEPENDENCY INJECTION PLUS GOOD TESTING/MOCKING TOOLS TESTABILITY! 13
  • 14. CONCEPTUAL OVERVIEW 14 MODULE MODULE CONFIG FILTER DIRECTIVE FACTORY CONTROLLER ROUTES SERVICE PROVIDER VALUE
  • 16. CONCEPTUAL OVERVIEW 16 DIRECTIVE DIRECTIVE "{{ name }}" is a binding expression!
  • 17. CONCEPTUAL OVERVIEW TWO WAY DATA BINDING TEMPLATE VIEW COMPILE LINK MODEL 17
  • 18. CONCEPTUAL OVERVIEW 18 This example contains bad practices. It was created for educational purposes only! FILTER
  • 19. CONCEPTUAL OVERVIEW 19 MOMODDUULELE CONFIG PROVIDERS ROUTES CONTROLLER DIRECTIVE FACTORY FILTER SERVICE
  • 21. CONCEPTUAL OVERVIEW 21 Services Providers Directives Filters Config Controllers Factories
  • 23. CONCEPTUAL OVERVIEW 23 Services Providers Directives Filters Controllers Factories Config
  • 24. CONCEPTUAL OVERVIEW 24 Services Providers Directives Filters Controllers Factories Config
  • 26. CONCEPTUAL OVERVIEW If you want your function to be called like a normal function, use factory. If you want your function to be instantiated with the new operator, use service. 26
  • 27. CONCEPTUAL OVERVIEW 27 Services Providers Directives Filters Controllers Factories Config
  • 28. CONCEPTUAL OVERVIEW Features Factory Service Value Constant Provider 28 Can have dependencies yes yes no no yes Object available in config phase no no no yes yes Can create functions / primitives yes no yes yes yes
  • 29. CONCEPTUAL OVERVIEW 29 Services Providers Directives Filters Controllers Factories Config
  • 31. CONCEPTUAL OVERVIEW 31 Services Providers Directives Filters Controllers Factories Config
  • 32. 32
  • 33. CONCEPTUAL OVERVIEW 33 Services Providers Directives Filters Controllers Factories Config
  • 35. SOME BEST PRACTICES GOOD PRACTICES 35
  • 36. SOME BEST PRACTICES Controllers and Services should not reference the DOM 36
  • 37. SOME BEST PRACTICES Controllers should have view behavior 37
  • 38. SOME BEST PRACTICES Services should have reusable logic, independent of the view 38
  • 39. SOME BEST PRACTICES Scope should be read-only in the templates 39
  • 40. SOME BEST PRACTICES Be careful with simple examples. ! Your architectures should reflect the system, not the frameworks you used in your system Uncle Bob - Screaming Architecture 40
  • 41. 41 ECOSYSTEM NG (core) ngAnimate ngRoute ngResource ngCookies ngTouch ngSanitize ngMock http://ngmodules.org/
  • 42. REFERENCES ▫︎ http://docs.angularjs.org/guide : Angular official documentation, it used to be very poor with very simples examples but is getting better in content although still using the same basics examples. 42 ! !▫︎https://github.com/angular/angular.js/wiki : Very good “articles" to understand better what angular is doing under the hood, like managing scopes and directives. ! !▫︎ http://www.thinkster.io/pick/GtaQ0oMGIl: "A Better Way to Learn AngularJS” : Very nice website that puts together a lot of good resources to learn AngularJs from scratch. ! !▫︎http://www.youtube.com/angularjs: AngularJs official youtube channel where they share and live-stream their presentations. !
  • 43. REFERENCES ▫︎https://egghead.io/ : Videos with very simple explanation of the angular world such as directives, scope, controllers, very simple to start to understand what angular can do for you but no how it does it. ! !▫︎http://joelhooks.com/ : Blog where you can find some very interesting articles about AngularJs such as "Modeling Data and State in Your AngularJs Application” ! ! ▫︎AngularJs (O'Reilly, Brad Green & Shyam Seshadri): Nice book to go deeper into the AngularJs concepts and what it has to offer. ! 43 ! ▫︎Javascript: the good parts (O'Reilly, Douglas Crockford)
  • 44. THANK YOU Questions? ! Renan Martins rmartins@thoughtworks.com ! Tania Gonzales tgonzales@thoughtworks.com