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 (20)

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 Directives
Angular DirectivesAngular Directives
Angular Directives
 
Angular js PPT
Angular js PPTAngular js PPT
Angular js PPT
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Angular Data Binding
Angular Data BindingAngular Data Binding
Angular Data Binding
 
AngularJS for Beginners
AngularJS for BeginnersAngularJS for Beginners
AngularJS for Beginners
 
Angular Pipes Workshop
Angular Pipes WorkshopAngular Pipes Workshop
Angular Pipes Workshop
 
Spring Core
Spring CoreSpring Core
Spring Core
 
jQuery
jQueryjQuery
jQuery
 
Jquery
JqueryJquery
Jquery
 
Web api
Web apiWeb api
Web api
 
AngularJS
AngularJS AngularJS
AngularJS
 
Angular modules in depth
Angular modules in depthAngular modules in depth
Angular modules in depth
 
Angular - Chapter 3 - Components
Angular - Chapter 3 - ComponentsAngular - Chapter 3 - Components
Angular - Chapter 3 - Components
 
Angular interview questions
Angular interview questionsAngular interview questions
Angular interview questions
 
Angular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP ServicesAngular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP Services
 
Angular Observables & RxJS Introduction
Angular Observables & RxJS IntroductionAngular Observables & RxJS Introduction
Angular Observables & RxJS Introduction
 
Angular tutorial
Angular tutorialAngular tutorial
Angular tutorial
 
Modern JS with ES6
Modern JS with ES6Modern JS with ES6
Modern JS with ES6
 
Angular & RXJS: examples and use cases
Angular & RXJS: examples and use casesAngular & RXJS: examples and use cases
Angular & RXJS: examples and use cases
 

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

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 

Recently uploaded (20)

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 

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/