SlideShare a Scribd company logo
13/05/12 Jumping Bean
AngularJS – Teaching HTML New Tricks
By Mark Clarke
13/05/12 Jumping Bean
About Me
➔ Open source solutions integrator,
➔ Java developer,
➔ Drupal developer,
➔ Love Linux,
➔ Work at Jumping Bean
➔ Www.jumpingbean.co.za
➔ G+ - Jumping Bean
➔ Social Networks
➔ Twitter @mxc4
➔ G+ MClarke4@gmail.com
13/05/12 Jumping Bean
Typical Web Application
➔ Pre Web 2.0
➔ Template language and model merged server
side and sent to client
➔ Web 2.0
➔ jQuery – Dom manipulation,
➔ InnerHTML manipulation
➔ Model & view not separated
➔ Application logic mixed with presentation logic
13/05/12 Jumping Bean
What is AngularJS?
➔ A javascript MVC framework,
➔ Run entirely in browser,
➔ Decouple DOM manipulation from Application
logic,
➔ Built with testing in mind,
➔ Declarative approach for UI (HTML)
➔ Imperative approach for application logic
(Javascript)
13/05/12 Jumping Bean
What is MVC?
HTML =>
<= Javascript
<= Object literal
13/05/12 Jumping Bean
AngularJS MVC
➔ Declarative UI
➔ HTML,
➔ Angular directives,
➔ DSL to create new tags
➔ Expressions {{ }}
13/05/12 Jumping Bean
AngularJS MVC
➔
Javascript controller,
➔ Does not reference view
directly
➔ Dependency injection
➔ Explained later
13/05/12 Jumping Bean
➔ $scope is a container of your
model (application state),
➔
Single source of truth for
application state,
➔ Dependency injected by
framework into controller,
➔ $scope provide execution context
for expressions
AngularJS MVC
13/05/12 Jumping Bean
View Key Concepts
➔ Directives
➔ New tags, attributes or classes that define new
functionality
➔ Expressions
➔ Binding syntax - {{ }} refer to model elements and
updated automatically. Framework keeps UI and
model in sync
➔ Filters
➔ Format data for display
13/05/12 Jumping Bean
Controller Key Concepts
➔ AngularJS namespace $,
➔ Dependency injection
➔ Require services are provided by the framework
➔ $scope, $location, $window $hxr etc
➔ Can create own services for dependency injection,
➔ Set up model,
➔ Create event listener functions
13/05/12 Jumping Bean
Controller Key Concepts
➔ Naming convention
➔ Use camel case in javascript code,
declaring directives etc (ngRepeat)
➔ Use snake case in html (ng-repeat)
13/05/12 Jumping Bean
AngularJS - MVC
13/05/12 Jumping Bean
Demos
Enough theory time for some demos
➔ Demo 1
➔ Basic ng-App, no controller
➔ Demo 1a
➔ Some more built-in directives, form validation,show.hide
➔ Demo 2
➔
Controller and ng-repeat directive
➔ Demo 3
➔ Filter demo
➔ Demo 4
➔ Filter and orderBy
13/05/12 Jumping Bean
Demos
➔ Demo 5
➔ Dependency injection hxr service $http
13/05/12 Jumping Bean
How does this magic work?
➔ Life cycle of AngularJS app
➔ Startup/Bootstrapping of application
➔ Runtime processing of application
13/05/12 Jumping Bean
How it Works - Startup
➔ Loading page - Bootstrapping
➔ On DOMContentLoaded Event
➔ Find the root of the angular application (ng-app)
➔ DOM Compilation
➔ Compile: transverse DOM to find directives &
expressions
➔ Set up watches, add listeners/callbacks etc
➔ Link: Combine directives with $scope (model)
and produce view
13/05/12 Jumping Bean
How it Works - Startup
13/05/12 Jumping Bean
How it works - Runtime
➔ After dom compilation,normal browser
events fire and call back to AngularJS
➔ AngularJS has internal event loop,
➔ All callbacks wrapped in $apply call,
➔ $apply calls $digest which checks for
changes in model and fires update
events
13/05/12 Jumping Bean
How it works - Runtime
13/05/12 Jumping Bean
Demo
➔ Demo 6
➔ How to write your own directive
➔ DSL
13/05/12 Jumping Bean
Angular Application
Development
➔ Standard structure recommended for
application layout
➔ Angular-seed project provides base
structure
➔ Single page application with ngView
directive and partials
13/05/12 Jumping Bean
AngularJS is Extensable
➔ Can create own
➔ Filters
➔ Directives
➔ Services
➔ Useful for CRUD applications
➔ Can still use jQuery for DOM
manipulation
13/05/12 Jumping Bean
AngularJS Modules
➔ Modules are containers for angularjs
components
➔ Used to define services, factories,
directives and application configuration
Ad

More Related Content

What's hot (20)

Towards component based web UI with ReactJS
Towards component based web UI with ReactJSTowards component based web UI with ReactJS
Towards component based web UI with ReactJS
Oliver Häger
 
Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrivedStencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrived
Gil Fink
 
Concurrent Rendering Adventures in React 18
Concurrent Rendering Adventures in React 18Concurrent Rendering Adventures in React 18
Concurrent Rendering Adventures in React 18
Maurice De Beijer [MVP]
 
Modern JavaScript Talk
Modern JavaScript TalkModern JavaScript Talk
Modern JavaScript Talk
Derek Binkley
 
Codemotion Rome 2016 - Polymer
Codemotion Rome 2016 - PolymerCodemotion Rome 2016 - Polymer
Codemotion Rome 2016 - Polymer
Maurizio Mangione
 
Introduction to angular js july 6th 2014
Introduction to angular js   july 6th 2014Introduction to angular js   july 6th 2014
Introduction to angular js july 6th 2014
Simona Clapan
 
Bootstrapping your plugin
Bootstrapping your pluginBootstrapping your plugin
Bootstrapping your plugin
Marko Heijnen
 
ITB2016 Converting Legacy Apps into Modern MVC
ITB2016 Converting Legacy Apps into Modern MVCITB2016 Converting Legacy Apps into Modern MVC
ITB2016 Converting Legacy Apps into Modern MVC
Ortus Solutions, Corp
 
Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014
Stéphane Bégaudeau
 
High Productivity Web Development Workflow
High Productivity Web Development WorkflowHigh Productivity Web Development Workflow
High Productivity Web Development Workflow
Vũ Nguyễn
 
Om & React
Om & ReactOm & React
Om & React
Fredrik Dyrkell
 
ITB2016 ContentBox CMS for a perfect project fit
ITB2016   ContentBox CMS for a perfect project fitITB2016   ContentBox CMS for a perfect project fit
ITB2016 ContentBox CMS for a perfect project fit
Ortus Solutions, Corp
 
Word press plugin development
Word press plugin development Word press plugin development
Word press plugin development
Md Shahjahan Jewel
 
Beginner's Guide to Frontend Development: Comparing Angular, React, Ember, an...
Beginner's Guide to Frontend Development: Comparing Angular, React, Ember, an...Beginner's Guide to Frontend Development: Comparing Angular, React, Ember, an...
Beginner's Guide to Frontend Development: Comparing Angular, React, Ember, an...
Prasid Pathak
 
Write Once, Run Everywhere
Write Once, Run EverywhereWrite Once, Run Everywhere
Write Once, Run Everywhere
Mike North
 
Docker, Ansible and Symfony micro-kernel
Docker, Ansible and Symfony micro-kernelDocker, Ansible and Symfony micro-kernel
Docker, Ansible and Symfony micro-kernel
DrupalCamp Kyiv
 
Drush make - Install Drupal like a Pro
Drush make - Install Drupal like a ProDrush make - Install Drupal like a Pro
Drush make - Install Drupal like a Pro
rupl
 
Untangling4
Untangling4Untangling4
Untangling4
Derek Jacoby
 
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
DrupalCamp Kyiv
 
Why NodeJS
Why NodeJSWhy NodeJS
Why NodeJS
Riza Fahmi
 
Towards component based web UI with ReactJS
Towards component based web UI with ReactJSTowards component based web UI with ReactJS
Towards component based web UI with ReactJS
Oliver Häger
 
Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrivedStencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrived
Gil Fink
 
Concurrent Rendering Adventures in React 18
Concurrent Rendering Adventures in React 18Concurrent Rendering Adventures in React 18
Concurrent Rendering Adventures in React 18
Maurice De Beijer [MVP]
 
Modern JavaScript Talk
Modern JavaScript TalkModern JavaScript Talk
Modern JavaScript Talk
Derek Binkley
 
Codemotion Rome 2016 - Polymer
Codemotion Rome 2016 - PolymerCodemotion Rome 2016 - Polymer
Codemotion Rome 2016 - Polymer
Maurizio Mangione
 
Introduction to angular js july 6th 2014
Introduction to angular js   july 6th 2014Introduction to angular js   july 6th 2014
Introduction to angular js july 6th 2014
Simona Clapan
 
Bootstrapping your plugin
Bootstrapping your pluginBootstrapping your plugin
Bootstrapping your plugin
Marko Heijnen
 
ITB2016 Converting Legacy Apps into Modern MVC
ITB2016 Converting Legacy Apps into Modern MVCITB2016 Converting Legacy Apps into Modern MVC
ITB2016 Converting Legacy Apps into Modern MVC
Ortus Solutions, Corp
 
Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014
Stéphane Bégaudeau
 
High Productivity Web Development Workflow
High Productivity Web Development WorkflowHigh Productivity Web Development Workflow
High Productivity Web Development Workflow
Vũ Nguyễn
 
ITB2016 ContentBox CMS for a perfect project fit
ITB2016   ContentBox CMS for a perfect project fitITB2016   ContentBox CMS for a perfect project fit
ITB2016 ContentBox CMS for a perfect project fit
Ortus Solutions, Corp
 
Word press plugin development
Word press plugin development Word press plugin development
Word press plugin development
Md Shahjahan Jewel
 
Beginner's Guide to Frontend Development: Comparing Angular, React, Ember, an...
Beginner's Guide to Frontend Development: Comparing Angular, React, Ember, an...Beginner's Guide to Frontend Development: Comparing Angular, React, Ember, an...
Beginner's Guide to Frontend Development: Comparing Angular, React, Ember, an...
Prasid Pathak
 
Write Once, Run Everywhere
Write Once, Run EverywhereWrite Once, Run Everywhere
Write Once, Run Everywhere
Mike North
 
Docker, Ansible and Symfony micro-kernel
Docker, Ansible and Symfony micro-kernelDocker, Ansible and Symfony micro-kernel
Docker, Ansible and Symfony micro-kernel
DrupalCamp Kyiv
 
Drush make - Install Drupal like a Pro
Drush make - Install Drupal like a ProDrush make - Install Drupal like a Pro
Drush make - Install Drupal like a Pro
rupl
 
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
DrupalCamp Kyiv
 

Similar to Introduction to AngularJS (20)

AngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UXAngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UX
JWORKS powered by Ordina
 
Planbox Backbone MVC
Planbox Backbone MVCPlanbox Backbone MVC
Planbox Backbone MVC
Acquisio
 
Front-end optimisation & jQuery Internals
Front-end optimisation & jQuery InternalsFront-end optimisation & jQuery Internals
Front-end optimisation & jQuery Internals
Artur Cistov
 
Javascript Client & Server Architectures
Javascript Client & Server ArchitecturesJavascript Client & Server Architectures
Javascript Client & Server Architectures
Pedro Melo Pereira
 
Beginning AngularJS
Beginning AngularJSBeginning AngularJS
Beginning AngularJS
Troy Miles
 
Web Applications with AngularJS
Web Applications with AngularJSWeb Applications with AngularJS
Web Applications with AngularJS
Philipp Burgmer
 
Web components api + Vuejs
Web components api + VuejsWeb components api + Vuejs
Web components api + Vuejs
Mikhail Kuznetcov
 
Serenity BDD Workshop - 9th March 2016
Serenity BDD Workshop - 9th March 2016Serenity BDD Workshop - 9th March 2016
Serenity BDD Workshop - 9th March 2016
vodqasg
 
Angular js
Angular jsAngular js
Angular js
Mauro Servienti
 
Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Re...
Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Re...Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Re...
Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Re...
Jesse Cravens
 
Pain Driven Development by Alexandr Sugak
Pain Driven Development by Alexandr SugakPain Driven Development by Alexandr Sugak
Pain Driven Development by Alexandr Sugak
Sigma Software
 
Eclipse Buildship DemoCamp Hamburg (June 2015) with additional screenshots
Eclipse Buildship DemoCamp Hamburg (June 2015)  with additional screenshotsEclipse Buildship DemoCamp Hamburg (June 2015)  with additional screenshots
Eclipse Buildship DemoCamp Hamburg (June 2015) with additional screenshots
simonscholz
 
Graph ql subscriptions on the jvm
Graph ql subscriptions on the jvmGraph ql subscriptions on the jvm
Graph ql subscriptions on the jvm
Gerard Klijs
 
AngularJS Beginner Day One
AngularJS Beginner Day OneAngularJS Beginner Day One
AngularJS Beginner Day One
Troy Miles
 
Principles of MVC for Rails Developers
Principles of MVC for Rails DevelopersPrinciples of MVC for Rails Developers
Principles of MVC for Rails Developers
Edureka!
 
H2O World - Building a Smarter Application - Tom Kraljevic
H2O World - Building a Smarter Application - Tom KraljevicH2O World - Building a Smarter Application - Tom Kraljevic
H2O World - Building a Smarter Application - Tom Kraljevic
Sri Ambati
 
Introduction to Angular
Introduction to AngularIntroduction to Angular
Introduction to Angular
Geoffrey Goodman
 
Dragos Rusu - Angular JS - Overcoming Performance Issues - CodeCamp-10-may-2014
Dragos Rusu  - Angular JS - Overcoming Performance Issues - CodeCamp-10-may-2014Dragos Rusu  - Angular JS - Overcoming Performance Issues - CodeCamp-10-may-2014
Dragos Rusu - Angular JS - Overcoming Performance Issues - CodeCamp-10-may-2014
Codecamp Romania
 
AngularJS - Overcoming performance issues. Limits.
AngularJS - Overcoming performance issues. Limits.AngularJS - Overcoming performance issues. Limits.
AngularJS - Overcoming performance issues. Limits.
Dragos Mihai Rusu
 
AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)
Alex Ross
 
AngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UXAngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UX
JWORKS powered by Ordina
 
Planbox Backbone MVC
Planbox Backbone MVCPlanbox Backbone MVC
Planbox Backbone MVC
Acquisio
 
Front-end optimisation & jQuery Internals
Front-end optimisation & jQuery InternalsFront-end optimisation & jQuery Internals
Front-end optimisation & jQuery Internals
Artur Cistov
 
Javascript Client & Server Architectures
Javascript Client & Server ArchitecturesJavascript Client & Server Architectures
Javascript Client & Server Architectures
Pedro Melo Pereira
 
Beginning AngularJS
Beginning AngularJSBeginning AngularJS
Beginning AngularJS
Troy Miles
 
Web Applications with AngularJS
Web Applications with AngularJSWeb Applications with AngularJS
Web Applications with AngularJS
Philipp Burgmer
 
Serenity BDD Workshop - 9th March 2016
Serenity BDD Workshop - 9th March 2016Serenity BDD Workshop - 9th March 2016
Serenity BDD Workshop - 9th March 2016
vodqasg
 
Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Re...
Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Re...Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Re...
Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Re...
Jesse Cravens
 
Pain Driven Development by Alexandr Sugak
Pain Driven Development by Alexandr SugakPain Driven Development by Alexandr Sugak
Pain Driven Development by Alexandr Sugak
Sigma Software
 
Eclipse Buildship DemoCamp Hamburg (June 2015) with additional screenshots
Eclipse Buildship DemoCamp Hamburg (June 2015)  with additional screenshotsEclipse Buildship DemoCamp Hamburg (June 2015)  with additional screenshots
Eclipse Buildship DemoCamp Hamburg (June 2015) with additional screenshots
simonscholz
 
Graph ql subscriptions on the jvm
Graph ql subscriptions on the jvmGraph ql subscriptions on the jvm
Graph ql subscriptions on the jvm
Gerard Klijs
 
AngularJS Beginner Day One
AngularJS Beginner Day OneAngularJS Beginner Day One
AngularJS Beginner Day One
Troy Miles
 
Principles of MVC for Rails Developers
Principles of MVC for Rails DevelopersPrinciples of MVC for Rails Developers
Principles of MVC for Rails Developers
Edureka!
 
H2O World - Building a Smarter Application - Tom Kraljevic
H2O World - Building a Smarter Application - Tom KraljevicH2O World - Building a Smarter Application - Tom Kraljevic
H2O World - Building a Smarter Application - Tom Kraljevic
Sri Ambati
 
Dragos Rusu - Angular JS - Overcoming Performance Issues - CodeCamp-10-may-2014
Dragos Rusu  - Angular JS - Overcoming Performance Issues - CodeCamp-10-may-2014Dragos Rusu  - Angular JS - Overcoming Performance Issues - CodeCamp-10-may-2014
Dragos Rusu - Angular JS - Overcoming Performance Issues - CodeCamp-10-may-2014
Codecamp Romania
 
AngularJS - Overcoming performance issues. Limits.
AngularJS - Overcoming performance issues. Limits.AngularJS - Overcoming performance issues. Limits.
AngularJS - Overcoming performance issues. Limits.
Dragos Mihai Rusu
 
AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)
Alex Ross
 
Ad

More from Jumping Bean (15)

DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
Jumping Bean
 
Postgrtesql as a NoSQL Document Store - The JSON/JSONB data type
Postgrtesql as a NoSQL Document Store - The JSON/JSONB data typePostgrtesql as a NoSQL Document Store - The JSON/JSONB data type
Postgrtesql as a NoSQL Document Store - The JSON/JSONB data type
Jumping Bean
 
React - The JavaScript Library for User Interfaces
React - The JavaScript Library for User InterfacesReact - The JavaScript Library for User Interfaces
React - The JavaScript Library for User Interfaces
Jumping Bean
 
IPv6 How To Set Up a Linux IPv6 Lan
IPv6 How To Set Up  a Linux IPv6 LanIPv6 How To Set Up  a Linux IPv6 Lan
IPv6 How To Set Up a Linux IPv6 Lan
Jumping Bean
 
HTML 5 & The Modern Web
HTML 5 & The Modern WebHTML 5 & The Modern Web
HTML 5 & The Modern Web
Jumping Bean
 
Building games-with-libgdx
Building games-with-libgdxBuilding games-with-libgdx
Building games-with-libgdx
Jumping Bean
 
Linux Containers & Docker
Linux Containers & DockerLinux Containers & Docker
Linux Containers & Docker
Jumping Bean
 
Introduction to Web Sockets
Introduction to Web SocketsIntroduction to Web Sockets
Introduction to Web Sockets
Jumping Bean
 
Secrets of a linux ninja Software Freedom Day 2013 Johannesburg, South Africa
Secrets of a linux ninja  Software Freedom Day 2013 Johannesburg, South AfricaSecrets of a linux ninja  Software Freedom Day 2013 Johannesburg, South Africa
Secrets of a linux ninja Software Freedom Day 2013 Johannesburg, South Africa
Jumping Bean
 
M-Learning application development with open source
M-Learning application development with open sourceM-Learning application development with open source
M-Learning application development with open source
Jumping Bean
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
Jumping Bean
 
Glassfish An Introduction
Glassfish An IntroductionGlassfish An Introduction
Glassfish An Introduction
Jumping Bean
 
Java logging
Java loggingJava logging
Java logging
Jumping Bean
 
IPv6 - Jozi Linux User Group Presentation
IPv6  - Jozi Linux User Group PresentationIPv6  - Jozi Linux User Group Presentation
IPv6 - Jozi Linux User Group Presentation
Jumping Bean
 
SELinux Johannesburg Linux User Group (JoziJUg)
SELinux Johannesburg Linux User Group (JoziJUg)SELinux Johannesburg Linux User Group (JoziJUg)
SELinux Johannesburg Linux User Group (JoziJUg)
Jumping Bean
 
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
Jumping Bean
 
Postgrtesql as a NoSQL Document Store - The JSON/JSONB data type
Postgrtesql as a NoSQL Document Store - The JSON/JSONB data typePostgrtesql as a NoSQL Document Store - The JSON/JSONB data type
Postgrtesql as a NoSQL Document Store - The JSON/JSONB data type
Jumping Bean
 
React - The JavaScript Library for User Interfaces
React - The JavaScript Library for User InterfacesReact - The JavaScript Library for User Interfaces
React - The JavaScript Library for User Interfaces
Jumping Bean
 
IPv6 How To Set Up a Linux IPv6 Lan
IPv6 How To Set Up  a Linux IPv6 LanIPv6 How To Set Up  a Linux IPv6 Lan
IPv6 How To Set Up a Linux IPv6 Lan
Jumping Bean
 
HTML 5 & The Modern Web
HTML 5 & The Modern WebHTML 5 & The Modern Web
HTML 5 & The Modern Web
Jumping Bean
 
Building games-with-libgdx
Building games-with-libgdxBuilding games-with-libgdx
Building games-with-libgdx
Jumping Bean
 
Linux Containers & Docker
Linux Containers & DockerLinux Containers & Docker
Linux Containers & Docker
Jumping Bean
 
Introduction to Web Sockets
Introduction to Web SocketsIntroduction to Web Sockets
Introduction to Web Sockets
Jumping Bean
 
Secrets of a linux ninja Software Freedom Day 2013 Johannesburg, South Africa
Secrets of a linux ninja  Software Freedom Day 2013 Johannesburg, South AfricaSecrets of a linux ninja  Software Freedom Day 2013 Johannesburg, South Africa
Secrets of a linux ninja Software Freedom Day 2013 Johannesburg, South Africa
Jumping Bean
 
M-Learning application development with open source
M-Learning application development with open sourceM-Learning application development with open source
M-Learning application development with open source
Jumping Bean
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
Jumping Bean
 
Glassfish An Introduction
Glassfish An IntroductionGlassfish An Introduction
Glassfish An Introduction
Jumping Bean
 
IPv6 - Jozi Linux User Group Presentation
IPv6  - Jozi Linux User Group PresentationIPv6  - Jozi Linux User Group Presentation
IPv6 - Jozi Linux User Group Presentation
Jumping Bean
 
SELinux Johannesburg Linux User Group (JoziJUg)
SELinux Johannesburg Linux User Group (JoziJUg)SELinux Johannesburg Linux User Group (JoziJUg)
SELinux Johannesburg Linux User Group (JoziJUg)
Jumping Bean
 
Ad

Recently uploaded (20)

#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Social Media App Development Company-EmizenTech
Social Media App Development Company-EmizenTechSocial Media App Development Company-EmizenTech
Social Media App Development Company-EmizenTech
Steve Jonas
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Unlocking the Power of IVR: A Comprehensive Guide
Unlocking the Power of IVR: A Comprehensive GuideUnlocking the Power of IVR: A Comprehensive Guide
Unlocking the Power of IVR: A Comprehensive Guide
vikasascentbpo
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Top 10 IT Help Desk Outsourcing Services
Top 10 IT Help Desk Outsourcing ServicesTop 10 IT Help Desk Outsourcing Services
Top 10 IT Help Desk Outsourcing Services
Infrassist Technologies Pvt. Ltd.
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdfAre Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Telecoms Supermarket
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Build 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHSBuild 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHS
TECH EHS Solution
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Vaibhav Gupta BAML: AI work flows without Hallucinations
Vaibhav Gupta BAML: AI work flows without HallucinationsVaibhav Gupta BAML: AI work flows without Hallucinations
Vaibhav Gupta BAML: AI work flows without Hallucinations
john409870
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Social Media App Development Company-EmizenTech
Social Media App Development Company-EmizenTechSocial Media App Development Company-EmizenTech
Social Media App Development Company-EmizenTech
Steve Jonas
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Unlocking the Power of IVR: A Comprehensive Guide
Unlocking the Power of IVR: A Comprehensive GuideUnlocking the Power of IVR: A Comprehensive Guide
Unlocking the Power of IVR: A Comprehensive Guide
vikasascentbpo
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdfAre Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Telecoms Supermarket
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Build 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHSBuild 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHS
TECH EHS Solution
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Vaibhav Gupta BAML: AI work flows without Hallucinations
Vaibhav Gupta BAML: AI work flows without HallucinationsVaibhav Gupta BAML: AI work flows without Hallucinations
Vaibhav Gupta BAML: AI work flows without Hallucinations
john409870
 

Introduction to AngularJS

  • 1. 13/05/12 Jumping Bean AngularJS – Teaching HTML New Tricks By Mark Clarke
  • 2. 13/05/12 Jumping Bean About Me ➔ Open source solutions integrator, ➔ Java developer, ➔ Drupal developer, ➔ Love Linux, ➔ Work at Jumping Bean ➔ Www.jumpingbean.co.za ➔ G+ - Jumping Bean ➔ Social Networks ➔ Twitter @mxc4 ➔ G+ [email protected]
  • 3. 13/05/12 Jumping Bean Typical Web Application ➔ Pre Web 2.0 ➔ Template language and model merged server side and sent to client ➔ Web 2.0 ➔ jQuery – Dom manipulation, ➔ InnerHTML manipulation ➔ Model & view not separated ➔ Application logic mixed with presentation logic
  • 4. 13/05/12 Jumping Bean What is AngularJS? ➔ A javascript MVC framework, ➔ Run entirely in browser, ➔ Decouple DOM manipulation from Application logic, ➔ Built with testing in mind, ➔ Declarative approach for UI (HTML) ➔ Imperative approach for application logic (Javascript)
  • 5. 13/05/12 Jumping Bean What is MVC? HTML => <= Javascript <= Object literal
  • 6. 13/05/12 Jumping Bean AngularJS MVC ➔ Declarative UI ➔ HTML, ➔ Angular directives, ➔ DSL to create new tags ➔ Expressions {{ }}
  • 7. 13/05/12 Jumping Bean AngularJS MVC ➔ Javascript controller, ➔ Does not reference view directly ➔ Dependency injection ➔ Explained later
  • 8. 13/05/12 Jumping Bean ➔ $scope is a container of your model (application state), ➔ Single source of truth for application state, ➔ Dependency injected by framework into controller, ➔ $scope provide execution context for expressions AngularJS MVC
  • 9. 13/05/12 Jumping Bean View Key Concepts ➔ Directives ➔ New tags, attributes or classes that define new functionality ➔ Expressions ➔ Binding syntax - {{ }} refer to model elements and updated automatically. Framework keeps UI and model in sync ➔ Filters ➔ Format data for display
  • 10. 13/05/12 Jumping Bean Controller Key Concepts ➔ AngularJS namespace $, ➔ Dependency injection ➔ Require services are provided by the framework ➔ $scope, $location, $window $hxr etc ➔ Can create own services for dependency injection, ➔ Set up model, ➔ Create event listener functions
  • 11. 13/05/12 Jumping Bean Controller Key Concepts ➔ Naming convention ➔ Use camel case in javascript code, declaring directives etc (ngRepeat) ➔ Use snake case in html (ng-repeat)
  • 13. 13/05/12 Jumping Bean Demos Enough theory time for some demos ➔ Demo 1 ➔ Basic ng-App, no controller ➔ Demo 1a ➔ Some more built-in directives, form validation,show.hide ➔ Demo 2 ➔ Controller and ng-repeat directive ➔ Demo 3 ➔ Filter demo ➔ Demo 4 ➔ Filter and orderBy
  • 14. 13/05/12 Jumping Bean Demos ➔ Demo 5 ➔ Dependency injection hxr service $http
  • 15. 13/05/12 Jumping Bean How does this magic work? ➔ Life cycle of AngularJS app ➔ Startup/Bootstrapping of application ➔ Runtime processing of application
  • 16. 13/05/12 Jumping Bean How it Works - Startup ➔ Loading page - Bootstrapping ➔ On DOMContentLoaded Event ➔ Find the root of the angular application (ng-app) ➔ DOM Compilation ➔ Compile: transverse DOM to find directives & expressions ➔ Set up watches, add listeners/callbacks etc ➔ Link: Combine directives with $scope (model) and produce view
  • 17. 13/05/12 Jumping Bean How it Works - Startup
  • 18. 13/05/12 Jumping Bean How it works - Runtime ➔ After dom compilation,normal browser events fire and call back to AngularJS ➔ AngularJS has internal event loop, ➔ All callbacks wrapped in $apply call, ➔ $apply calls $digest which checks for changes in model and fires update events
  • 19. 13/05/12 Jumping Bean How it works - Runtime
  • 20. 13/05/12 Jumping Bean Demo ➔ Demo 6 ➔ How to write your own directive ➔ DSL
  • 21. 13/05/12 Jumping Bean Angular Application Development ➔ Standard structure recommended for application layout ➔ Angular-seed project provides base structure ➔ Single page application with ngView directive and partials
  • 22. 13/05/12 Jumping Bean AngularJS is Extensable ➔ Can create own ➔ Filters ➔ Directives ➔ Services ➔ Useful for CRUD applications ➔ Can still use jQuery for DOM manipulation
  • 23. 13/05/12 Jumping Bean AngularJS Modules ➔ Modules are containers for angularjs components ➔ Used to define services, factories, directives and application configuration