SlideShare a Scribd company logo
1 of 25
AngularJS
Maurice de Beijer
 Maurice de Beijer
 The Problem Solver

 Microsoft Integration MVP

Who am I?

 Freelance developer
 DevelopMentor instructor
 Twitter:

@mauricedb

 Blog:

http://msmvps.com/blogs/TheProblemSolver/

 Web:

http://www.TheProblemSolver.nl

 E-mail:

maurice.de.beijer@gmail.com
 What is AngularJS?

Objectives

 Getting started
 Directives
 Routing
 Services
 AngularJS is an MVC framework for browser based apps
 Open source and originally developed at Google

 The clean architecture has attracted a large following quickly

What is
AngularJS?

 Version 1.0 was released in June 2012
 Currently at 1.2.0-rc-3

 The goal is building CRUD style business applications
 Not as suitable for games etc

 Use declarative programming for UI and imperative
programming for the logic

 The application is wired together in a declarative way

 Supports modern desktop and mobile browsers
 Internet Explorer version 8 and above
 Model View Controller architecture

 A well known and proven architecture

 Declarative two way data binding

 Automatically synchronizes values between Model and View

 Dynamic templates

Key features

 Makes it very easy to update the user interface

 Dependency injections

 Code dependencies are automatically injected where needed

 Extends HTML with directives

 Lots of powerful standard directives or create your own

 Build with testing in mind

 Makes it much easier to unit test different parts
Extending
HTML
Extending
HTML
 Visual Studio 2012

 Several ways to get IntelliSense

 Visual Studio 2013

Tooling

 Understands directives and provides IntelliSense

 WebStorm

 Including support for Live Edit

 Batarang

 Chrome plugin

 Karma Test Runner
 Automatic bootstrapping

Bootstrapping

 Add a reference to AngularJS
 Add the ngApp attribute

 Manual bootstrapping is also possible

 Gives you more control
 For example when using AMD/RequireJS
Model

The MVC of
AngularJS
Controller

View
Model

Model

 The business data
 Exposed to the view through the $scope

Controller

View
Model

 The user interface layer

View

Controller

 Data binds to the model
 Calls functions on the controller

 Use declarative directives for reusable code

View
Model

Controller

Controller

 Glues the view and the model together
 Provides additional functionality
 Uses additional services for reusable logic

View
Model

Services

View

 Services are reusable pieces of business logic

Services

 Separation results in reuse and testability

Controller

 Created as singleton objects

 Inject by AngularJS using dependency injection

 Services are created as part of a module

 One module can take a dependency on another module

 Modules are groupings of related functionality
 Also used to bootstrap the application
Model

Controller

$scope

 The glue between the Model and View
 Don’t use as the Model!

View
 Many general purpose services provided by AngularJS
 $http

 Used for XMLHttpRequest handling

 $location

Standard
Services

 Provide information about the current URL

 $q
 A promise/deferred module for asynchronous requests

 $routeProvider
 Configure routes in an SPA

 $log
 Logging service

 Many more
 AngularJS uses dependency injection to decouple modules

Dependency
injection

 Dependencies are automatically injected by the framework

 Based on the parameter name
 JavaScript is often minified in production

 Need to provide AngularJS with some extra hints
 Directives allow you to enhance HTML with new capabilities
 Start using HTML as a domain specific language

 AngularJS comes with a long list of standard directives

Standard
directives











ngApp
ngBind
ngModel
ngRepeat
ngClick
ngEnable/ngDisable
ngHide/ngShow
ngView
…
 Turn HTML into your Domain Specific Language

Custom
directives

 Use templates to embed complete blocks

 Can use either attributes, elements, CSS classes or comments
 Directives let you interact with the DOM
 The place for jQuery code
 Used to create SPA style application

 The page can change without using the server

 The ngView is often used to render a template

Routing

 HTML templates loaded when needed
 Can also be pre loaded as script with type="text/ng-template"

 The $routeProvider service is used to configure the route
 The $location service can be used to navigate
 Using an anchor tag is also possible

 The $routeParams service can be used to retrieve parameters
 Properties named in the route URL template
 The basic service for doing all HTTP requests
 The building block for all AJAX requests

 Can be used as a function
 $http(config)

$http service

 Provides a number of shortcut methods





$http.post(url, config)
$http.get(url, config)
$http.put(url, config)
$http.delete(url, config)

 Uses the promises API as the result
 Provided by the $q service
 Creates a service for working with RESTful services
 Much easier than using the $http object

$resource

 Standard functions are already preconfigured
 Only the common HTTP PUT is missing

 Requires a dependency on ngResource
 Located in angular-resource.js
 The $httpBackend is the service that is responsible

Unit testing
AJAX code

 Use the XMLHttpRequest object

 There is a second version in the ngMock module

 Used for unit testing code that does HTTP requests

 Can be configured to fake HTTP requests
 Or verify that HTTP calls where made
 AngularJS is a complete framework for client side applications
 Based on the standard MVC design pattern

Summary

 Two way data binding makes it easy to build data entry forms
 Dependency injection makes it easy to separate modules
 Build with testing in mind
The code

 Check http://msmvps.com/blogs/theproblemsolver/

More Related Content

What's hot

What's hot (20)

Angular 8
Angular 8 Angular 8
Angular 8
 
Angular
AngularAngular
Angular
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
 
Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectIntroduction to angular with a simple but complete project
Introduction to angular with a simple but complete project
 
Angular Seminar-js
Angular Seminar-jsAngular Seminar-js
Angular Seminar-js
 
Expressjs
ExpressjsExpressjs
Expressjs
 
jQuery
jQueryjQuery
jQuery
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 
ReactJS presentation
ReactJS presentationReactJS presentation
ReactJS presentation
 
The New JavaScript: ES6
The New JavaScript: ES6The New JavaScript: ES6
The New JavaScript: ES6
 
Angular overview
Angular overviewAngular overview
Angular overview
 
Reactjs
Reactjs Reactjs
Reactjs
 
Angular Data Binding
Angular Data BindingAngular Data Binding
Angular Data Binding
 
React vs Angular
React vs Angular React vs Angular
React vs Angular
 
Angular 6 - The Complete Guide
Angular 6 - The Complete GuideAngular 6 - The Complete Guide
Angular 6 - The Complete Guide
 
Angular Directives
Angular DirectivesAngular Directives
Angular Directives
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
Web api
Web apiWeb api
Web api
 
Javascript basics
Javascript basicsJavascript basics
Javascript basics
 
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptxUnit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
 

Viewers also liked

Angular js
Angular jsAngular js
Angular jsMindtree
 
Advantages of angular js for development
Advantages of angular js for developmentAdvantages of angular js for development
Advantages of angular js for developmentVedRaj2015
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js TutorialsKalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js TutorialsKalp Corporate
 
Angular js tutorial slides
Angular js tutorial slidesAngular js tutorial slides
Angular js tutorial slidessamhelman
 
Why angular js Framework
Why angular js Framework Why angular js Framework
Why angular js Framework Sakthi Bro
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedAngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedStéphane Bégaudeau
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular jsAayush Shrestha
 
AngularJS Architecture
AngularJS ArchitectureAngularJS Architecture
AngularJS ArchitectureEyal Vardi
 

Viewers also liked (14)

AngularJS Basics with Example
AngularJS Basics with ExampleAngularJS Basics with Example
AngularJS Basics with Example
 
AngularJS Framework
AngularJS FrameworkAngularJS Framework
AngularJS Framework
 
AngularJS Best Practices
AngularJS Best PracticesAngularJS Best Practices
AngularJS Best Practices
 
Angular js
Angular jsAngular js
Angular js
 
Advantages of angular js for development
Advantages of angular js for developmentAdvantages of angular js for development
Advantages of angular js for development
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js TutorialsKalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js Tutorials
 
The AngularJS way
The AngularJS wayThe AngularJS way
The AngularJS way
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Angular js tutorial slides
Angular js tutorial slidesAngular js tutorial slides
Angular js tutorial slides
 
Angular JS
Angular JSAngular JS
Angular JS
 
Why angular js Framework
Why angular js Framework Why angular js Framework
Why angular js Framework
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedAngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get started
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
 
AngularJS Architecture
AngularJS ArchitectureAngularJS Architecture
AngularJS Architecture
 

Similar to AngularJS

AngularJS = Browser applications on steroids
AngularJS = Browser applications on steroidsAngularJS = Browser applications on steroids
AngularJS = Browser applications on steroidsMaurice De Beijer [MVP]
 
Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to AngularjsGaurav Agrawal
 
Introduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarIntroduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarAppfinz Technologies
 
AngularJS: Overview & Key Features
AngularJS: Overview & Key FeaturesAngularJS: Overview & Key Features
AngularJS: Overview & Key FeaturesMohamad Al Asmar
 
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJSAngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJSmurtazahaveliwala
 
Angular patterns
Angular patternsAngular patterns
Angular patternsPremkumar M
 
End to-End SPA Development Using ASP.NET and AngularJS
End to-End SPA Development Using ASP.NET and AngularJSEnd to-End SPA Development Using ASP.NET and AngularJS
End to-End SPA Development Using ASP.NET and AngularJSGil Fink
 
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
AngularJs Superheroic JavaScript MVW Framework Services by Miracle StudiosAngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
AngularJs Superheroic JavaScript MVW Framework Services by Miracle StudiosLearnimtactics
 
AngularJs Workshop SDP December 28th 2014
AngularJs Workshop SDP December 28th 2014AngularJs Workshop SDP December 28th 2014
AngularJs Workshop SDP December 28th 2014Ran Wahle
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSShyjal Raazi
 
Valentine with Angular js - Introduction
Valentine with Angular js - IntroductionValentine with Angular js - Introduction
Valentine with Angular js - IntroductionSenthil Kumar
 
angularJs Workshop
angularJs WorkshopangularJs Workshop
angularJs WorkshopRan Wahle
 

Similar to AngularJS (20)

AngularJS = Browser applications on steroids
AngularJS = Browser applications on steroidsAngularJS = Browser applications on steroids
AngularJS = Browser applications on steroids
 
Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
 
Introduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarIntroduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumar
 
AngularJS: Overview & Key Features
AngularJS: Overview & Key FeaturesAngularJS: Overview & Key Features
AngularJS: Overview & Key Features
 
ASp.net Mvc 5
ASp.net Mvc 5ASp.net Mvc 5
ASp.net Mvc 5
 
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJSAngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
 
Angular patterns
Angular patternsAngular patterns
Angular patterns
 
Mvc
MvcMvc
Mvc
 
End to-End SPA Development Using ASP.NET and AngularJS
End to-End SPA Development Using ASP.NET and AngularJSEnd to-End SPA Development Using ASP.NET and AngularJS
End to-End SPA Development Using ASP.NET and AngularJS
 
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
AngularJs Superheroic JavaScript MVW Framework Services by Miracle StudiosAngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
 
Getting started with angular js
Getting started with angular jsGetting started with angular js
Getting started with angular js
 
Getting started with angular js
Getting started with angular jsGetting started with angular js
Getting started with angular js
 
AngularJs Workshop SDP December 28th 2014
AngularJs Workshop SDP December 28th 2014AngularJs Workshop SDP December 28th 2014
AngularJs Workshop SDP December 28th 2014
 
AngularJS By Vipin
AngularJS By VipinAngularJS By Vipin
AngularJS By Vipin
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Angular js
Angular jsAngular js
Angular js
 
Valentine with Angular js - Introduction
Valentine with Angular js - IntroductionValentine with Angular js - Introduction
Valentine with Angular js - Introduction
 
Training On Angular Js
Training On Angular JsTraining On Angular Js
Training On Angular Js
 
MVC 4
MVC 4MVC 4
MVC 4
 
angularJs Workshop
angularJs WorkshopangularJs Workshop
angularJs Workshop
 

More from Maurice De Beijer [MVP]

Practice TypeScript Techniques Building React Server Components App
Practice TypeScript Techniques Building React Server Components AppPractice TypeScript Techniques Building React Server Components App
Practice TypeScript Techniques Building React Server Components AppMaurice De Beijer [MVP]
 
A foolproof Way to Estimate a Software Project
A foolproof Way to Estimate a Software ProjectA foolproof Way to Estimate a Software Project
A foolproof Way to Estimate a Software ProjectMaurice De Beijer [MVP]
 
Surati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Surati Tech Talks 2022 / Build reliable Svelte applications using CypressSurati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Surati Tech Talks 2022 / Build reliable Svelte applications using CypressMaurice De Beijer [MVP]
 
Build reliable Svelte applications using Cypress
Build reliable Svelte applications using CypressBuild reliable Svelte applications using Cypress
Build reliable Svelte applications using CypressMaurice De Beijer [MVP]
 
Building Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureBuilding Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureMaurice De Beijer [MVP]
 
Concurrent Rendering Adventures in React 18
Concurrent Rendering Adventures in React 18Concurrent Rendering Adventures in React 18
Concurrent Rendering Adventures in React 18Maurice De Beijer [MVP]
 
Building reliable applications with React, C#, and Azure
Building reliable applications with React, C#, and AzureBuilding reliable applications with React, C#, and Azure
Building reliable applications with React, C#, and AzureMaurice De Beijer [MVP]
 
Building large and scalable mission critical applications with React
Building large and scalable mission critical applications with ReactBuilding large and scalable mission critical applications with React
Building large and scalable mission critical applications with ReactMaurice De Beijer [MVP]
 
Building Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureBuilding Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureMaurice De Beijer [MVP]
 
Building reliable web applications using Cypress
Building reliable web applications using CypressBuilding reliable web applications using Cypress
Building reliable web applications using CypressMaurice De Beijer [MVP]
 
Getting started with React Suspense and concurrent rendering
Getting started with React Suspense and concurrent renderingGetting started with React Suspense and concurrent rendering
Getting started with React Suspense and concurrent renderingMaurice De Beijer [MVP]
 
React suspense, not just for Alfred Hitchcock
React suspense, not just for Alfred HitchcockReact suspense, not just for Alfred Hitchcock
React suspense, not just for Alfred HitchcockMaurice De Beijer [MVP]
 
From zero to hero with the Reactive extensions for JavaScript
From zero to hero with the Reactive extensions for JavaScriptFrom zero to hero with the Reactive extensions for JavaScript
From zero to hero with the Reactive extensions for JavaScriptMaurice De Beijer [MVP]
 
From zero to hero with the reactive extensions for JavaScript
From zero to hero with the reactive extensions for JavaScriptFrom zero to hero with the reactive extensions for JavaScript
From zero to hero with the reactive extensions for JavaScriptMaurice De Beijer [MVP]
 
Create flexible React applications using GraphQL apis
Create flexible React applications using GraphQL apisCreate flexible React applications using GraphQL apis
Create flexible React applications using GraphQL apisMaurice De Beijer [MVP]
 

More from Maurice De Beijer [MVP] (20)

Practice TypeScript Techniques Building React Server Components App
Practice TypeScript Techniques Building React Server Components AppPractice TypeScript Techniques Building React Server Components App
Practice TypeScript Techniques Building React Server Components App
 
A foolproof Way to Estimate a Software Project
A foolproof Way to Estimate a Software ProjectA foolproof Way to Estimate a Software Project
A foolproof Way to Estimate a Software Project
 
Surati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Surati Tech Talks 2022 / Build reliable Svelte applications using CypressSurati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Surati Tech Talks 2022 / Build reliable Svelte applications using Cypress
 
Build reliable Svelte applications using Cypress
Build reliable Svelte applications using CypressBuild reliable Svelte applications using Cypress
Build reliable Svelte applications using Cypress
 
Building Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureBuilding Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & Azure
 
Concurrent Rendering Adventures in React 18
Concurrent Rendering Adventures in React 18Concurrent Rendering Adventures in React 18
Concurrent Rendering Adventures in React 18
 
Building reliable applications with React, C#, and Azure
Building reliable applications with React, C#, and AzureBuilding reliable applications with React, C#, and Azure
Building reliable applications with React, C#, and Azure
 
Building large and scalable mission critical applications with React
Building large and scalable mission critical applications with ReactBuilding large and scalable mission critical applications with React
Building large and scalable mission critical applications with React
 
Building Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureBuilding Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & Azure
 
Why I am hooked on the future of React
Why I am hooked on the future of ReactWhy I am hooked on the future of React
Why I am hooked on the future of React
 
Building reliable web applications using Cypress
Building reliable web applications using CypressBuilding reliable web applications using Cypress
Building reliable web applications using Cypress
 
Getting started with React Suspense and concurrent rendering
Getting started with React Suspense and concurrent renderingGetting started with React Suspense and concurrent rendering
Getting started with React Suspense and concurrent rendering
 
React suspense, not just for Alfred Hitchcock
React suspense, not just for Alfred HitchcockReact suspense, not just for Alfred Hitchcock
React suspense, not just for Alfred Hitchcock
 
From zero to hero with the Reactive extensions for JavaScript
From zero to hero with the Reactive extensions for JavaScriptFrom zero to hero with the Reactive extensions for JavaScript
From zero to hero with the Reactive extensions for JavaScript
 
Why I am hooked on the future of React
Why I am hooked on the future of ReactWhy I am hooked on the future of React
Why I am hooked on the future of React
 
The new React
The new React The new React
The new React
 
From zero to hero with the reactive extensions for JavaScript
From zero to hero with the reactive extensions for JavaScriptFrom zero to hero with the reactive extensions for JavaScript
From zero to hero with the reactive extensions for JavaScript
 
Why I am hooked on the future of React
Why I am hooked on the future of ReactWhy I am hooked on the future of React
Why I am hooked on the future of React
 
I am hooked on React
I am hooked on ReactI am hooked on React
I am hooked on React
 
Create flexible React applications using GraphQL apis
Create flexible React applications using GraphQL apisCreate flexible React applications using GraphQL apis
Create flexible React applications using GraphQL apis
 

Recently uploaded

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
 
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
 
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
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Recently uploaded (20)

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
 
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...
 
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...
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
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 ...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

AngularJS

  • 2.  Maurice de Beijer  The Problem Solver  Microsoft Integration MVP Who am I?  Freelance developer  DevelopMentor instructor  Twitter: @mauricedb  Blog: http://msmvps.com/blogs/TheProblemSolver/  Web: http://www.TheProblemSolver.nl  E-mail: maurice.de.beijer@gmail.com
  • 3.  What is AngularJS? Objectives  Getting started  Directives  Routing  Services
  • 4.  AngularJS is an MVC framework for browser based apps  Open source and originally developed at Google  The clean architecture has attracted a large following quickly What is AngularJS?  Version 1.0 was released in June 2012  Currently at 1.2.0-rc-3  The goal is building CRUD style business applications  Not as suitable for games etc  Use declarative programming for UI and imperative programming for the logic  The application is wired together in a declarative way  Supports modern desktop and mobile browsers  Internet Explorer version 8 and above
  • 5.  Model View Controller architecture  A well known and proven architecture  Declarative two way data binding  Automatically synchronizes values between Model and View  Dynamic templates Key features  Makes it very easy to update the user interface  Dependency injections  Code dependencies are automatically injected where needed  Extends HTML with directives  Lots of powerful standard directives or create your own  Build with testing in mind  Makes it much easier to unit test different parts
  • 8.  Visual Studio 2012  Several ways to get IntelliSense  Visual Studio 2013 Tooling  Understands directives and provides IntelliSense  WebStorm  Including support for Live Edit  Batarang  Chrome plugin  Karma Test Runner
  • 9.  Automatic bootstrapping Bootstrapping  Add a reference to AngularJS  Add the ngApp attribute  Manual bootstrapping is also possible  Gives you more control  For example when using AMD/RequireJS
  • 11. Model Model  The business data  Exposed to the view through the $scope Controller View
  • 12. Model  The user interface layer View Controller  Data binds to the model  Calls functions on the controller  Use declarative directives for reusable code View
  • 13. Model Controller Controller  Glues the view and the model together  Provides additional functionality  Uses additional services for reusable logic View
  • 14. Model Services View  Services are reusable pieces of business logic Services  Separation results in reuse and testability Controller  Created as singleton objects  Inject by AngularJS using dependency injection  Services are created as part of a module  One module can take a dependency on another module  Modules are groupings of related functionality  Also used to bootstrap the application
  • 15. Model Controller $scope  The glue between the Model and View  Don’t use as the Model! View
  • 16.  Many general purpose services provided by AngularJS  $http  Used for XMLHttpRequest handling  $location Standard Services  Provide information about the current URL  $q  A promise/deferred module for asynchronous requests  $routeProvider  Configure routes in an SPA  $log  Logging service  Many more
  • 17.  AngularJS uses dependency injection to decouple modules Dependency injection  Dependencies are automatically injected by the framework  Based on the parameter name  JavaScript is often minified in production  Need to provide AngularJS with some extra hints
  • 18.  Directives allow you to enhance HTML with new capabilities  Start using HTML as a domain specific language  AngularJS comes with a long list of standard directives Standard directives          ngApp ngBind ngModel ngRepeat ngClick ngEnable/ngDisable ngHide/ngShow ngView …
  • 19.  Turn HTML into your Domain Specific Language Custom directives  Use templates to embed complete blocks  Can use either attributes, elements, CSS classes or comments  Directives let you interact with the DOM  The place for jQuery code
  • 20.  Used to create SPA style application  The page can change without using the server  The ngView is often used to render a template Routing  HTML templates loaded when needed  Can also be pre loaded as script with type="text/ng-template"  The $routeProvider service is used to configure the route  The $location service can be used to navigate  Using an anchor tag is also possible  The $routeParams service can be used to retrieve parameters  Properties named in the route URL template
  • 21.  The basic service for doing all HTTP requests  The building block for all AJAX requests  Can be used as a function  $http(config) $http service  Provides a number of shortcut methods     $http.post(url, config) $http.get(url, config) $http.put(url, config) $http.delete(url, config)  Uses the promises API as the result  Provided by the $q service
  • 22.  Creates a service for working with RESTful services  Much easier than using the $http object $resource  Standard functions are already preconfigured  Only the common HTTP PUT is missing  Requires a dependency on ngResource  Located in angular-resource.js
  • 23.  The $httpBackend is the service that is responsible Unit testing AJAX code  Use the XMLHttpRequest object  There is a second version in the ngMock module  Used for unit testing code that does HTTP requests  Can be configured to fake HTTP requests  Or verify that HTTP calls where made
  • 24.  AngularJS is a complete framework for client side applications  Based on the standard MVC design pattern Summary  Two way data binding makes it easy to build data entry forms  Dependency injection makes it easy to separate modules  Build with testing in mind
  • 25. The code  Check http://msmvps.com/blogs/theproblemsolver/