SlideShare a Scribd company logo
1 of 22
Angular JS
Prototype Pattern 
• Every JS object has a prototype. The prototype is also an object. 
• All JS objects inherit their properties and methods from their prototype. 
Ex: 
new Object() – inherit from a prototype called Object. prototype 
new Date() – inherit from a prototype called Date. Prototype 
• Functions loaded into memory once 
• Variable/functions taken out of global namespace 
• Comprised of a constructor and a prototype 
• Override functions/properties 
Ex: Calculator.prototype.add = function( x, y){………………….};
Prototype Pattern Structure 
Constructor 
Method will be loaded only once
Namespace to avoid name collisions
Module Pattern 
• Variable/functions taken out of global namespace 
• Expose only public members while hiding private members 
• Functions may be duplicated across objects in memory 
• Not easy to extend.
Module Pattern Structure
Revealing Module Pattern 
• Similar to Module Pattern 
• “Cleaner” way to expose public members
Revealing Module Pattern Structure 
Lower Case : Bcoz don’t need to use new keyword 
Self Executing Function
Revealing prototype pattern 
• Combines Prototype + Revealing Module 
Pattern 
• Functions loaded in memory only once 
• Extensible
Revealing prototype pattern structure
Framework Vs Library 
• Library : A set of function to call. 
• Each function does some work, and returns the 
control back to you. 
• You are in charge 
• Framework : Has a behavior built in 
• We plugin into it, register our classes and the 
framework code is calling our code in a point in 
time 
• You are not in charge
Why AngularJS? 
• Modularity – application to grow / add features painlessly 
• Reusability – Reuse/ share components across projects 
• Readability 
• Embeddable – plug-in functionality 
• Learning curve – embrace web standards - HTML, CSS, JavaScript 
• Testable – Minimum effort 
• Extendable – add new/replace functionality to framework 
• Services – packed with collection of core services 
• Flexibility – Choose own folder structure / model data my way 
• Community 
• Open Source 
• Video Resources : Codeschool , egghead.io
Features 
• Directives 
• 2 Way data binding 
• Model-View-Controller 
• Modules 
• JQLite 
• Routes 
• Services
Modules 
• Container 
• To keep code clear 
• To keep code separated 
• To easily include all need parts 
angular.module(‘myApp’,[]);
Directives 
• Cool way to extend HTML – attributes, 
elements and comments 
• Ex: ngApp , ngModel, ngBind or {{}}, ngIf, 
ngRepeat,ng-src, ngController, ngClick, 
ngSubmit etc
Scope 
• Watch for changes to models 
• Apply changes to models 
• Hierarchical in a similar fashion to DOM 
elements 
• Glue between controller (imperative logic) and 
DOM (declarative logic)
Controllers 
• Imperative logic (a testable unit) 
• Creates a new scope 
• Use the controller method instead of global 
scope 
• Business logic for a single view 
• No DOM manipulation 
• Should not be stateful – use services for this 
• Should not maintain the lifetime of other 
components
Services 
• Participate in dependency injection 
• Swappable with mocks/stubs for testing 
• Must be registered with a module 
• Lazy instantiation 
• Data can reside in the scope hierarchy, 
functionality should reside in the service 
• Popular Angular services $http, $location, 
$window, $q, $log
Routing 
• Key to “SPA” functionality 
– The page can change without using the server 
• The ngView is often used to render a template 
– HTML templates loaded when needed 
– Can also be preloaded as script with type=“text/ng-template” 
• The $routeProvider service is used to configure 
the route 
• The $location service can be used to navigate
DEMO
AngularJS

More Related Content

What's hot

Angular basicschat
Angular basicschatAngular basicschat
Angular basicschatYu Jin
 
Drupal & AngularJS - DrupalCamp Spain 2014
Drupal & AngularJS - DrupalCamp Spain 2014Drupal & AngularJS - DrupalCamp Spain 2014
Drupal & AngularJS - DrupalCamp Spain 2014Juampy NR
 
Shootout! template engines on the jvm
Shootout! template engines on the jvmShootout! template engines on the jvm
Shootout! template engines on the jvmNLJUG
 
Javascript Myths and its Evolution
Javascript Myths and its  EvolutionJavascript Myths and its  Evolution
Javascript Myths and its EvolutionDeepu S Nath
 
Apache Cayenne: a Java ORM Alternative
Apache Cayenne: a Java ORM AlternativeApache Cayenne: a Java ORM Alternative
Apache Cayenne: a Java ORM AlternativeAndrus Adamchik
 
Angular 2 with typescript
Angular 2 with typescriptAngular 2 with typescript
Angular 2 with typescriptTayseer_Emam
 
NoSQL Database in .NET Apps
NoSQL Database in .NET AppsNoSQL Database in .NET Apps
NoSQL Database in .NET AppsShiju Varghese
 
Object oriented javascript
Object oriented javascriptObject oriented javascript
Object oriented javascriptGarrison Locke
 
NiFi - First approach
NiFi - First approachNiFi - First approach
NiFi - First approachMickael Cassy
 
Server-side React with Headless CMS – Exove
Server-side React with Headless CMS – ExoveServer-side React with Headless CMS – Exove
Server-side React with Headless CMS – ExoveExove
 
No Container: a Modern Java Stack with Bootique
No Container: a Modern Java Stack with BootiqueNo Container: a Modern Java Stack with Bootique
No Container: a Modern Java Stack with BootiqueAndrus Adamchik
 
State Management in Angular/React
State Management in Angular/ReactState Management in Angular/React
State Management in Angular/ReactDEV Cafe
 

What's hot (20)

Angular basicschat
Angular basicschatAngular basicschat
Angular basicschat
 
Drupal & AngularJS - DrupalCamp Spain 2014
Drupal & AngularJS - DrupalCamp Spain 2014Drupal & AngularJS - DrupalCamp Spain 2014
Drupal & AngularJS - DrupalCamp Spain 2014
 
Mini-Training: NancyFX
Mini-Training: NancyFXMini-Training: NancyFX
Mini-Training: NancyFX
 
Angular js
Angular jsAngular js
Angular js
 
Shootout! template engines on the jvm
Shootout! template engines on the jvmShootout! template engines on the jvm
Shootout! template engines on the jvm
 
Angular
AngularAngular
Angular
 
Javascript Myths and its Evolution
Javascript Myths and its  EvolutionJavascript Myths and its  Evolution
Javascript Myths and its Evolution
 
Ajax Zf
Ajax ZfAjax Zf
Ajax Zf
 
Node.js at Nutonian
Node.js at NutonianNode.js at Nutonian
Node.js at Nutonian
 
Apache Cayenne: a Java ORM Alternative
Apache Cayenne: a Java ORM AlternativeApache Cayenne: a Java ORM Alternative
Apache Cayenne: a Java ORM Alternative
 
Angular 2 with typescript
Angular 2 with typescriptAngular 2 with typescript
Angular 2 with typescript
 
Javascript for Wep Apps
Javascript for Wep AppsJavascript for Wep Apps
Javascript for Wep Apps
 
NoSQL Database in .NET Apps
NoSQL Database in .NET AppsNoSQL Database in .NET Apps
NoSQL Database in .NET Apps
 
Object oriented javascript
Object oriented javascriptObject oriented javascript
Object oriented javascript
 
NiFi - First approach
NiFi - First approachNiFi - First approach
NiFi - First approach
 
Web forms Overview Presentation
Web forms Overview PresentationWeb forms Overview Presentation
Web forms Overview Presentation
 
Server-side React with Headless CMS – Exove
Server-side React with Headless CMS – ExoveServer-side React with Headless CMS – Exove
Server-side React with Headless CMS – Exove
 
No Container: a Modern Java Stack with Bootique
No Container: a Modern Java Stack with BootiqueNo Container: a Modern Java Stack with Bootique
No Container: a Modern Java Stack with Bootique
 
State Management in Angular/React
State Management in Angular/ReactState Management in Angular/React
State Management in Angular/React
 
ASP.NET MVC overview
ASP.NET MVC overviewASP.NET MVC overview
ASP.NET MVC overview
 

Viewers also liked

Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01Arunangsu Sahu
 
AngularJS vs jQuery
AngularJS vs jQueryAngularJS vs jQuery
AngularJS vs jQueryPayPal
 
Angular js presentation at Datacom
Angular js presentation at DatacomAngular js presentation at Datacom
Angular js presentation at DatacomDavid Xi Peng Yang
 
A different thought AngularJS
A different thought AngularJSA different thought AngularJS
A different thought AngularJSAmit Thakkar
 
Requirements Bazaar powered by AngularJS and Polymer - Talk at Google Develop...
Requirements Bazaar powered by AngularJS and Polymer - Talk at Google Develop...Requirements Bazaar powered by AngularJS and Polymer - Talk at Google Develop...
Requirements Bazaar powered by AngularJS and Polymer - Talk at Google Develop...IstvanKoren
 
SharePoint Saturday Paris 2016 - AngularJS with the Microsoft Graph
SharePoint Saturday Paris 2016 - AngularJS with the Microsoft GraphSharePoint Saturday Paris 2016 - AngularJS with the Microsoft Graph
SharePoint Saturday Paris 2016 - AngularJS with the Microsoft GraphSébastien Levert
 
Single page application
Single page applicationSingle page application
Single page applicationArthur Fung
 
Let your website a ride of AngularJS
Let your website a ride of AngularJSLet your website a ride of AngularJS
Let your website a ride of AngularJSMike Taylor
 
AngularJS : Superheroic JavaScript MVW Framework
AngularJS : Superheroic JavaScript MVW FrameworkAngularJS : Superheroic JavaScript MVW Framework
AngularJS : Superheroic JavaScript MVW FrameworkEdureka!
 
AngularJS Directives
AngularJS DirectivesAngularJS Directives
AngularJS DirectivesEyal Vardi
 
Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...
Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...
Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...FalafelSoftware
 
Building AngularJS Custom Directives
Building AngularJS Custom DirectivesBuilding AngularJS Custom Directives
Building AngularJS Custom DirectivesDan Wahlin
 
Gettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJSGettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJSArmin Vieweg
 

Viewers also liked (20)

Intro to AngularJS
Intro to AngularJS Intro to AngularJS
Intro to AngularJS
 
Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01
 
AngularJS vs jQuery
AngularJS vs jQueryAngularJS vs jQuery
AngularJS vs jQuery
 
AngularJs
AngularJsAngularJs
AngularJs
 
Dive into AngularJS and directives
Dive into AngularJS and directivesDive into AngularJS and directives
Dive into AngularJS and directives
 
Angular js presentation at Datacom
Angular js presentation at DatacomAngular js presentation at Datacom
Angular js presentation at Datacom
 
A different thought AngularJS
A different thought AngularJSA different thought AngularJS
A different thought AngularJS
 
Requirements Bazaar powered by AngularJS and Polymer - Talk at Google Develop...
Requirements Bazaar powered by AngularJS and Polymer - Talk at Google Develop...Requirements Bazaar powered by AngularJS and Polymer - Talk at Google Develop...
Requirements Bazaar powered by AngularJS and Polymer - Talk at Google Develop...
 
AngularJS
AngularJSAngularJS
AngularJS
 
SharePoint Saturday Paris 2016 - AngularJS with the Microsoft Graph
SharePoint Saturday Paris 2016 - AngularJS with the Microsoft GraphSharePoint Saturday Paris 2016 - AngularJS with the Microsoft Graph
SharePoint Saturday Paris 2016 - AngularJS with the Microsoft Graph
 
Introduction to AngularJs
Introduction to AngularJsIntroduction to AngularJs
Introduction to AngularJs
 
Single page application
Single page applicationSingle page application
Single page application
 
Let your website a ride of AngularJS
Let your website a ride of AngularJSLet your website a ride of AngularJS
Let your website a ride of AngularJS
 
The AngularJS way
The AngularJS wayThe AngularJS way
The AngularJS way
 
AngularJS : Superheroic JavaScript MVW Framework
AngularJS : Superheroic JavaScript MVW FrameworkAngularJS : Superheroic JavaScript MVW Framework
AngularJS : Superheroic JavaScript MVW Framework
 
AngularJS Directives
AngularJS DirectivesAngularJS Directives
AngularJS Directives
 
Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...
Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...
Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...
 
Angular js
Angular jsAngular js
Angular js
 
Building AngularJS Custom Directives
Building AngularJS Custom DirectivesBuilding AngularJS Custom Directives
Building AngularJS Custom Directives
 
Gettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJSGettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJS
 

Similar to AngularJS

Angularjs for kolkata drupal meetup
Angularjs for kolkata drupal meetupAngularjs for kolkata drupal meetup
Angularjs for kolkata drupal meetupGoutam Dey
 
AngularJS Beginners Workshop
AngularJS Beginners WorkshopAngularJS Beginners Workshop
AngularJS Beginners WorkshopSathish VJ
 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day WorkshopShyam Seshadri
 
Angular meetup 2 2019-08-29
Angular meetup 2   2019-08-29Angular meetup 2   2019-08-29
Angular meetup 2 2019-08-29Nitin Bhojwani
 
Andrii Sliusar "Module Architecture of React-Redux Applications"
Andrii Sliusar "Module Architecture of React-Redux Applications"Andrii Sliusar "Module Architecture of React-Redux Applications"
Andrii Sliusar "Module Architecture of React-Redux Applications"LogeekNightUkraine
 
Angular patterns
Angular patternsAngular patterns
Angular patternsPremkumar M
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO DevsWO Community
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to conceptsAbhishek Sur
 
Building Blocks of Angular 2 and ASP.NET Core
Building Blocks of Angular 2 and ASP.NET CoreBuilding Blocks of Angular 2 and ASP.NET Core
Building Blocks of Angular 2 and ASP.NET CoreLevi Fuller
 
PresentationPatterns_v2
PresentationPatterns_v2PresentationPatterns_v2
PresentationPatterns_v2Maksym Tolstik
 
Build Java Web Application Using Apache Struts
Build Java Web Application Using Apache Struts Build Java Web Application Using Apache Struts
Build Java Web Application Using Apache Struts weili_at_slideshare
 

Similar to AngularJS (20)

Angularjs for kolkata drupal meetup
Angularjs for kolkata drupal meetupAngularjs for kolkata drupal meetup
Angularjs for kolkata drupal meetup
 
AngularJS Beginners Workshop
AngularJS Beginners WorkshopAngularJS Beginners Workshop
AngularJS Beginners Workshop
 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day Workshop
 
Show Some Spine!
Show Some Spine!Show Some Spine!
Show Some Spine!
 
Angular meetup 2 2019-08-29
Angular meetup 2   2019-08-29Angular meetup 2   2019-08-29
Angular meetup 2 2019-08-29
 
Andrii Sliusar "Module Architecture of React-Redux Applications"
Andrii Sliusar "Module Architecture of React-Redux Applications"Andrii Sliusar "Module Architecture of React-Redux Applications"
Andrii Sliusar "Module Architecture of React-Redux Applications"
 
Angular patterns
Angular patternsAngular patterns
Angular patterns
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO Devs
 
Angular js
Angular jsAngular js
Angular js
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
 
Building Blocks of Angular 2 and ASP.NET Core
Building Blocks of Angular 2 and ASP.NET CoreBuilding Blocks of Angular 2 and ASP.NET Core
Building Blocks of Angular 2 and ASP.NET Core
 
PresentationPatterns_v2
PresentationPatterns_v2PresentationPatterns_v2
PresentationPatterns_v2
 
Design p atterns
Design p atternsDesign p atterns
Design p atterns
 
JS Essence
JS EssenceJS Essence
JS Essence
 
Protractor survival guide
Protractor survival guideProtractor survival guide
Protractor survival guide
 
Angular js
Angular jsAngular js
Angular js
 
Build Java Web Application Using Apache Struts
Build Java Web Application Using Apache Struts Build Java Web Application Using Apache Struts
Build Java Web Application Using Apache Struts
 
Angular js for Beginnners
Angular js for BeginnnersAngular js for Beginnners
Angular js for Beginnners
 
Javascript best practices
Javascript best practicesJavascript best practices
Javascript best practices
 
Angular
AngularAngular
Angular
 

Recently uploaded

Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 

Recently uploaded (20)

Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 

AngularJS

  • 2. Prototype Pattern • Every JS object has a prototype. The prototype is also an object. • All JS objects inherit their properties and methods from their prototype. Ex: new Object() – inherit from a prototype called Object. prototype new Date() – inherit from a prototype called Date. Prototype • Functions loaded into memory once • Variable/functions taken out of global namespace • Comprised of a constructor and a prototype • Override functions/properties Ex: Calculator.prototype.add = function( x, y){………………….};
  • 3. Prototype Pattern Structure Constructor Method will be loaded only once
  • 4. Namespace to avoid name collisions
  • 5. Module Pattern • Variable/functions taken out of global namespace • Expose only public members while hiding private members • Functions may be duplicated across objects in memory • Not easy to extend.
  • 7. Revealing Module Pattern • Similar to Module Pattern • “Cleaner” way to expose public members
  • 8. Revealing Module Pattern Structure Lower Case : Bcoz don’t need to use new keyword Self Executing Function
  • 9. Revealing prototype pattern • Combines Prototype + Revealing Module Pattern • Functions loaded in memory only once • Extensible
  • 11. Framework Vs Library • Library : A set of function to call. • Each function does some work, and returns the control back to you. • You are in charge • Framework : Has a behavior built in • We plugin into it, register our classes and the framework code is calling our code in a point in time • You are not in charge
  • 12. Why AngularJS? • Modularity – application to grow / add features painlessly • Reusability – Reuse/ share components across projects • Readability • Embeddable – plug-in functionality • Learning curve – embrace web standards - HTML, CSS, JavaScript • Testable – Minimum effort • Extendable – add new/replace functionality to framework • Services – packed with collection of core services • Flexibility – Choose own folder structure / model data my way • Community • Open Source • Video Resources : Codeschool , egghead.io
  • 13. Features • Directives • 2 Way data binding • Model-View-Controller • Modules • JQLite • Routes • Services
  • 14. Modules • Container • To keep code clear • To keep code separated • To easily include all need parts angular.module(‘myApp’,[]);
  • 15. Directives • Cool way to extend HTML – attributes, elements and comments • Ex: ngApp , ngModel, ngBind or {{}}, ngIf, ngRepeat,ng-src, ngController, ngClick, ngSubmit etc
  • 16. Scope • Watch for changes to models • Apply changes to models • Hierarchical in a similar fashion to DOM elements • Glue between controller (imperative logic) and DOM (declarative logic)
  • 17. Controllers • Imperative logic (a testable unit) • Creates a new scope • Use the controller method instead of global scope • Business logic for a single view • No DOM manipulation • Should not be stateful – use services for this • Should not maintain the lifetime of other components
  • 18.
  • 19. Services • Participate in dependency injection • Swappable with mocks/stubs for testing • Must be registered with a module • Lazy instantiation • Data can reside in the scope hierarchy, functionality should reside in the service • Popular Angular services $http, $location, $window, $q, $log
  • 20. Routing • Key to “SPA” functionality – The page can change without using the server • The ngView is often used to render a template – HTML templates loaded when needed – Can also be preloaded as script with type=“text/ng-template” • The $routeProvider service is used to configure the route • The $location service can be used to navigate
  • 21. DEMO

Editor's Notes

  1. $compile – angular HTML compiler