SlideShare a Scribd company logo
Exploring 
Liju Raj Pillai 
CEO, Perfomatix Solutions Pvt Ltd
2
Topics 
• What to expect from the talk 
• Why JavaScript is relevant? 
• Before diving in to AngularJS 
• What is AngularJS 
• Core concepts of AngularJS 
• When to use AngularJS 
• What next 
• Demo 
3
What to expect from this talk?
Why JS is relevant ? 
• JavaScript is around since 1995 
• Considered to be “second class” 
• Ajax 
• jQuery,underscore 
• Modern browsers 
• Better JS engines
Before diving in to AngularJS 
• JavaScript(of course !!!) 
• Model View Controller pattern 
• Why MVC ? 
• Server side MVC 
• Client side MVC 
• SPA – Single Page Application 
• Framework vs Library
What is AngularJS 
• Client-side framework 
• Developed and maintained by Google. 
• Provides client side MVC capabilities. 
• Philosophy 
• Declarative code is better than imperative 
• Testing in equal importance to app writing 
• Decouple client side from server side 
• Ideal for SPA
Sample Application 
8 
JAVASCRIPT 
var myModule=angular.module(“myApp”,[]) 
myModule.controller(“exampleController”,[“$scope”,function($scope){ 
$scope.message=“Angular is awesome” 
}]); 
JAVASCRIPT 
var myModule=angular.module(“myApp”,[]) 
myModule.controller(“exampleController”,[“$scope”,function($scope){ 
$scope.message=“Angular is awesome” 
}]); 
HTML 
<html ng-app=“myApp”> 
<head> 
<script src=“lib/angular.js”> 
<script src=“js/___.js”> 
</head> 
<body> 
<div ng-controller=“exampleController”> 
{{message}} 
</div> 
</body> 
</html> 
HTML 
<html ng-app=“myApp”> 
<head> 
<script src=“lib/angular.js”> 
<script src=“js/___.js”> 
</head> 
<body> 
<div ng-controller=“exampleController”> 
{{message}} 
</div> 
</body> 
</html> 
RESULT 
Angular is awesome 
RESULT 
Angular is awesome
Modules 
• Divides web application into small,reusable components 
• Controllers,Filters,Directives etc can be declared inside a module 
• You can package code as reusable modules 
• Modules can be loaded in any order 
• Unit tests only have to load relevant modules
Modules 
CREATING AN ANGULAR JS MODULE 
<script type="text/javascript"> 
angular.module('myApp',[]); 
angular.module('myApp',['dependentModule1','dependentModule2']); 
</script> 
CREATING AN ANGULAR JS MODULE 
<script type="text/javascript"> 
angular.module('myApp',[]); 
angular.module('myApp',['dependentModule1','dependentModule2']); 
</script> 
USING ANGULAR JS MODULE 
<html ng-app="myApp"> 
<head>...</head> 
<body>…</body> 
</html 
USING ANGULAR JS MODULE 
<html ng-app="myApp"> 
<head>...</head> 
<body>…</body> 
</html
Data Binding 
Data Binding in Classical Template Systems Data Binding in Angular Templates
Dependency Injection 
• Design pattern 
• DI is omnipresent in AngularJS
Dependency Injection
AngularJS Controllers 
•Where your business logic lives 
•Layer between UI and data store 
•ng-controller 
•Decoupled from the view 
•Re-instantiated on every new call 
•Add behavior to $scope
AngularJS Controllers 
CODE SNIPPET 
var myModule=angular.module(“exampleModule”,[]) 
myModule.controller(“exampleController”,[“$scope”,function($scope){ 
$scope.message=“Angular is awesome” 
}]); 
CODE SNIPPET 
var myModule=angular.module(“exampleModule”,[]) 
myModule.controller(“exampleController”,[“$scope”,function($scope){ 
$scope.message=“Angular is awesome” 
}]); 
HTML 
<div ng-controller="DoubleController"> 
Two times <input ng-model="num"> equals {{ double(num) }} 
</div> 
HTML 
<div ng-controller="DoubleController"> 
Two times <input ng-model="num"> equals {{ double(num) }} 
</div>
AngularJS $scope 
• Connects controller and view 
• $rootScope
AngularJS $scope 
HTML 
<div ng-controller="MyController"> 
Your name: 
<input type="text" ng-model="username"> 
<button ng-click='sayHello()'>greet</button> 
<hr> 
{{greeting}} 
</div> 
HTML 
<div ng-controller="MyController"> 
Your name: 
<input type="text" ng-model="username"> 
<button ng-click='sayHello()'>greet</button> 
<hr> 
{{greeting}} 
</div> 
SCRIPT 
angular.module('scopeExample', []) 
.controller('MyController', ['$scope', function($scope) { 
$scope.username = 'World'; 
$scope.sayHello = function() { 
$scope.greeting = 'Hello ' + $scope.username + '!'; 
}; 
}]); 
SCRIPT 
angular.module('scopeExample', []) 
.controller('MyController', ['$scope', function($scope) { 
$scope.username = 'World'; 
$scope.sayHello = function() { 
$scope.greeting = 'Hello ' + $scope.username + '!'; 
}; 
}]);
AngularJS Service 
• Stateless objects that contains useful function 
• Can be called from controllers,filters,directives etc 
• Singleton 
• Injectable by DI 
• Reusable components
AngularJS Service 
• Lazy instantiated 
• Services provided by Angular 
• $http - For ajax requests 
• $interval and $timeout - Repeats and delays 
• $rootScope - very top scope of application 
• $location - URL and its parts of current site 
• $window - Wrapper of global window. Useful for tests 
CODE SNIPPET 
var myModule = angular.module('myModule', []); 
myModule.factory('serviceId', function() { 
var shinyNewServiceInstance; 
// factory function body that constructs shinyNewServiceInstance 
return shinyNewServiceInstance; 
}); 
CODE SNIPPET 
var myModule = angular.module('myModule', []); 
myModule.factory('serviceId', function() { 
var shinyNewServiceInstance; 
// factory function body that constructs shinyNewServiceInstance 
return shinyNewServiceInstance; 
});
AngularJS Filters 
• A filter formats the value of an expression for display to the user 
CODE SNIPPET 
myApp.filter('capitalize', function () { 
return function (s) { 
if (!s || !angular.isString(s)) { 
return s; 
} 
return s.charAt(0).toUpperCase() + s.substring(1); 
}; 
}); 
CODE SNIPPET 
myApp.filter('capitalize', function () { 
return function (s) { 
if (!s || !angular.isString(s)) { 
return s; 
} 
return s.charAt(0).toUpperCase() + s.substring(1); 
}; 
});
AngularJS Filters 
• Functions which modify expressions 
• But does not alter the original data 
• Angular JS provides few of its own filters 
• currency, lowercase, date, number, filter, orderBy, uppercase etc.
AngularJS Directives 
• Angular’s way to teach html new tricks 
• Lives in the view 
• Built in Directives ng-app, ng-controller, ng-repeat, ng-model etc 
• Directive names, ngModel or ng-model
AngularJS Directives 
JAVASCRIPT 
myApp.directive('boldClick', function() { 
return function(scope, element) { 
var bold = false; 
element.click(function() { 
if (bold) { 
element.css('font-weight', 'normal'); 
} else { 
element.css('font-weight', 'bold'); 
} 
bold = !bold; 
}); 
}; 
}); 
JAVASCRIPT 
myApp.directive('boldClick', function() { 
return function(scope, element) { 
var bold = false; 
element.click(function() { 
if (bold) { 
element.css('font-weight', 'normal'); 
} else { 
element.css('font-weight', 'bold'); 
} 
bold = !bold; 
}); 
}; 
}); 
HTML 
<div> 
My pet is a <span bold-click>tortoise</span>. 
</div> 
HTML 
<div> 
My pet is a <span bold-click>tortoise</span>. 
</div> 
https://docs.angularjs.org/api/ng/directive
When to use AngularJS 
• CRUD Application 
• SPA 
• API First
When not to use AngularJS 
• Games 
• GUI Editors 
• Applications with intensive and tricky DOM manipulation 
• Non SPA applications
What next 
• Path from novice to ninja 
• Learn JavaScript http://eloquentjavascript.net/ 
• Read https://docs.angularjs.org/guide 
• Do https://docs.angularjs.org/tutorial 
• Refer https://egghead.io/
What next 
• Angular2.0 
• Tools 
• http://yeoman.io/ - Scaffolding and build tool 
• batarang - Debug tool
Demo 
28
Thank you !!! 
29

More Related Content

What's hot (20)

Advanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JSAdvanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JS
Simon Guest
 
Exploring AngularJS - Liju Pillai
Exploring AngularJS - Liju PillaiExploring AngularJS - Liju Pillai
Exploring AngularJS - Liju Pillai
Liju Pillai
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Jussi Pohjolainen
 
AngularJS Beginners Workshop
AngularJS Beginners WorkshopAngularJS Beginners Workshop
AngularJS Beginners Workshop
Sathish VJ
 
Getting Started with Angular JS
Getting Started with Angular JSGetting Started with Angular JS
Getting Started with Angular JS
Akshay Mathur
 
Dynamic Application Development by NodeJS ,AngularJS with OrientDB
Dynamic Application Development by NodeJS ,AngularJS with OrientDBDynamic Application Development by NodeJS ,AngularJS with OrientDB
Dynamic Application Development by NodeJS ,AngularJS with OrientDB
Apaichon Punopas
 
Angular js
Angular jsAngular js
Angular js
Manav Prasad
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS Basics
Ravi Mone
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
Aayush Shrestha
 
Step by Step - AngularJS
Step by Step - AngularJSStep by Step - AngularJS
Step by Step - AngularJS
Infragistics
 
AngularJs presentation
AngularJs presentation AngularJs presentation
AngularJs presentation
Phan Tuan
 
AngularJS - Architecture decisions in a large project 
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project 
Elad Hirsch
 
When to use and when not to use AngularJS - Liju Pillai, www.perfomatix.com
When to use and when not to use AngularJS - Liju Pillai, www.perfomatix.comWhen to use and when not to use AngularJS - Liju Pillai, www.perfomatix.com
When to use and when not to use AngularJS - Liju Pillai, www.perfomatix.com
Perfomatix Solutions
 
Angular js
Angular jsAngular js
Angular js
Behind D Walls
 
AngularJS application architecture
AngularJS application architectureAngularJS application architecture
AngularJS application architecture
Gabriele Falace
 
The AngularJS way
The AngularJS wayThe AngularJS way
The AngularJS way
Boyan Mihaylov
 
Angular JS tutorial
Angular JS tutorialAngular JS tutorial
Angular JS tutorial
cncwebworld
 
Angular js
Angular jsAngular js
Angular js
Dinusha Nandika
 
Angular js architecture (v1.4.8)
Angular js architecture (v1.4.8)Angular js architecture (v1.4.8)
Angular js architecture (v1.4.8)
Gabi Costel Lapusneanu
 
AngularJS Introduction
AngularJS IntroductionAngularJS Introduction
AngularJS Introduction
Carlos Morales
 
Advanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JSAdvanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JS
Simon Guest
 
Exploring AngularJS - Liju Pillai
Exploring AngularJS - Liju PillaiExploring AngularJS - Liju Pillai
Exploring AngularJS - Liju Pillai
Liju Pillai
 
AngularJS Beginners Workshop
AngularJS Beginners WorkshopAngularJS Beginners Workshop
AngularJS Beginners Workshop
Sathish VJ
 
Getting Started with Angular JS
Getting Started with Angular JSGetting Started with Angular JS
Getting Started with Angular JS
Akshay Mathur
 
Dynamic Application Development by NodeJS ,AngularJS with OrientDB
Dynamic Application Development by NodeJS ,AngularJS with OrientDBDynamic Application Development by NodeJS ,AngularJS with OrientDB
Dynamic Application Development by NodeJS ,AngularJS with OrientDB
Apaichon Punopas
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS Basics
Ravi Mone
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
Aayush Shrestha
 
Step by Step - AngularJS
Step by Step - AngularJSStep by Step - AngularJS
Step by Step - AngularJS
Infragistics
 
AngularJs presentation
AngularJs presentation AngularJs presentation
AngularJs presentation
Phan Tuan
 
AngularJS - Architecture decisions in a large project 
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project 
Elad Hirsch
 
When to use and when not to use AngularJS - Liju Pillai, www.perfomatix.com
When to use and when not to use AngularJS - Liju Pillai, www.perfomatix.comWhen to use and when not to use AngularJS - Liju Pillai, www.perfomatix.com
When to use and when not to use AngularJS - Liju Pillai, www.perfomatix.com
Perfomatix Solutions
 
AngularJS application architecture
AngularJS application architectureAngularJS application architecture
AngularJS application architecture
Gabriele Falace
 
Angular JS tutorial
Angular JS tutorialAngular JS tutorial
Angular JS tutorial
cncwebworld
 
AngularJS Introduction
AngularJS IntroductionAngularJS Introduction
AngularJS Introduction
Carlos Morales
 

Viewers also liked (8)

AngularJS Custom Directives
AngularJS Custom DirectivesAngularJS Custom Directives
AngularJS Custom Directives
yprodev
 
Angular promises and http
Angular promises and httpAngular promises and http
Angular promises and http
Alexe Bogdan
 
Angular Promises and Advanced Routing
Angular Promises and Advanced RoutingAngular Promises and Advanced Routing
Angular Promises and Advanced Routing
Alexe Bogdan
 
Basics of angular directive (Part - 1)
Basics of angular directive (Part - 1)Basics of angular directive (Part - 1)
Basics of angular directive (Part - 1)
Vijay Kani
 
Building an End-to-End AngularJS Application
Building an End-to-End AngularJS ApplicationBuilding an End-to-End AngularJS Application
Building an End-to-End AngularJS Application
Dan Wahlin
 
AngularJS Best Practices
AngularJS Best PracticesAngularJS Best Practices
AngularJS Best Practices
Betclic Everest Group Tech Team
 
AngularJS custom directive
AngularJS custom directiveAngularJS custom directive
AngularJS custom directive
Nascenia IT
 
Building AngularJS Custom Directives
Building AngularJS Custom DirectivesBuilding AngularJS Custom Directives
Building AngularJS Custom Directives
Dan Wahlin
 
AngularJS Custom Directives
AngularJS Custom DirectivesAngularJS Custom Directives
AngularJS Custom Directives
yprodev
 
Angular promises and http
Angular promises and httpAngular promises and http
Angular promises and http
Alexe Bogdan
 
Angular Promises and Advanced Routing
Angular Promises and Advanced RoutingAngular Promises and Advanced Routing
Angular Promises and Advanced Routing
Alexe Bogdan
 
Basics of angular directive (Part - 1)
Basics of angular directive (Part - 1)Basics of angular directive (Part - 1)
Basics of angular directive (Part - 1)
Vijay Kani
 
Building an End-to-End AngularJS Application
Building an End-to-End AngularJS ApplicationBuilding an End-to-End AngularJS Application
Building an End-to-End AngularJS Application
Dan Wahlin
 
AngularJS custom directive
AngularJS custom directiveAngularJS custom directive
AngularJS custom directive
Nascenia IT
 
Building AngularJS Custom Directives
Building AngularJS Custom DirectivesBuilding AngularJS Custom Directives
Building AngularJS Custom Directives
Dan Wahlin
 
Ad

Similar to Coffee@DBG - Exploring Angular JS (20)

AgularJS basics- angular directives and controllers
AgularJS basics- angular directives and controllersAgularJS basics- angular directives and controllers
AgularJS basics- angular directives and controllers
jobinThomas54
 
Angular js for Beginnners
Angular js for BeginnnersAngular js for Beginnners
Angular js for Beginnners
Santosh Kumar Kar
 
Angular workshop - Full Development Guide
Angular workshop - Full Development GuideAngular workshop - Full Development Guide
Angular workshop - Full Development Guide
Nitin Giri
 
Angularjs
AngularjsAngularjs
Angularjs
Sabin Tamrakar
 
Angular js
Angular jsAngular js
Angular js
Baldeep Sohal
 
AngularJS Workshop
AngularJS WorkshopAngularJS Workshop
AngularJS Workshop
Gianluca Cacace
 
Introduction of angular js
Introduction of angular jsIntroduction of angular js
Introduction of angular js
Tamer Solieman
 
Mini-Training: AngularJS
Mini-Training: AngularJSMini-Training: AngularJS
Mini-Training: AngularJS
Betclic Everest Group Tech Team
 
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
Learnimtactics
 
Angular
AngularAngular
Angular
LearningTech
 
Angular
AngularAngular
Angular
LearningTech
 
ANGULAR JS TRAINING IN PUNE
ANGULAR JS TRAINING IN PUNEANGULAR JS TRAINING IN PUNE
ANGULAR JS TRAINING IN PUNE
cncwebworld
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Yoann Gotthilf
 
AngularJS.part1
AngularJS.part1AngularJS.part1
AngularJS.part1
Andrey Kolodnitsky
 
Opinionated AngularJS
Opinionated AngularJSOpinionated AngularJS
Opinionated AngularJS
prabhutech
 
Angular js-crash-course
Angular js-crash-courseAngular js-crash-course
Angular js-crash-course
Keith Bloomfield
 
Introduction to AngularJs
Introduction to AngularJsIntroduction to AngularJs
Introduction to AngularJs
murtazahaveliwala
 
Angular - Beginner
Angular - BeginnerAngular - Beginner
Angular - Beginner
Riccardo Masetti
 
AngularJs Crash Course
AngularJs Crash CourseAngularJs Crash Course
AngularJs Crash Course
Keith Bloomfield
 
Ultimate Introduction To AngularJS
Ultimate Introduction To AngularJSUltimate Introduction To AngularJS
Ultimate Introduction To AngularJS
Jacopo Nardiello
 
AgularJS basics- angular directives and controllers
AgularJS basics- angular directives and controllersAgularJS basics- angular directives and controllers
AgularJS basics- angular directives and controllers
jobinThomas54
 
Angular workshop - Full Development Guide
Angular workshop - Full Development GuideAngular workshop - Full Development Guide
Angular workshop - Full Development Guide
Nitin Giri
 
Introduction of angular js
Introduction of angular jsIntroduction of angular js
Introduction of angular js
Tamer Solieman
 
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
Learnimtactics
 
ANGULAR JS TRAINING IN PUNE
ANGULAR JS TRAINING IN PUNEANGULAR JS TRAINING IN PUNE
ANGULAR JS TRAINING IN PUNE
cncwebworld
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Yoann Gotthilf
 
Opinionated AngularJS
Opinionated AngularJSOpinionated AngularJS
Opinionated AngularJS
prabhutech
 
Ultimate Introduction To AngularJS
Ultimate Introduction To AngularJSUltimate Introduction To AngularJS
Ultimate Introduction To AngularJS
Jacopo Nardiello
 
Ad

More from Deepu S Nath (20)

Design Thinking, Critical Thinking & Innovation Design
Design Thinking, Critical Thinking & Innovation DesignDesign Thinking, Critical Thinking & Innovation Design
Design Thinking, Critical Thinking & Innovation Design
Deepu S Nath
 
GTECH ATFG µLearn Framework Intro
GTECH ATFG µLearn Framework IntroGTECH ATFG µLearn Framework Intro
GTECH ATFG µLearn Framework Intro
Deepu S Nath
 
Future of learning - Technology Disruption
Future of learning  - Technology DisruptionFuture of learning  - Technology Disruption
Future of learning - Technology Disruption
Deepu S Nath
 
Decentralized Applications using Ethereum
Decentralized Applications using EthereumDecentralized Applications using Ethereum
Decentralized Applications using Ethereum
Deepu S Nath
 
How machines can take decisions
How machines can take decisionsHow machines can take decisions
How machines can take decisions
Deepu S Nath
 
Artificial Intelligence: An Introduction
 Artificial Intelligence: An Introduction Artificial Intelligence: An Introduction
Artificial Intelligence: An Introduction
Deepu S Nath
 
FAYA PORT 80 Introduction
FAYA PORT 80 IntroductionFAYA PORT 80 Introduction
FAYA PORT 80 Introduction
Deepu S Nath
 
How machines can take decisions
How machines can take decisionsHow machines can take decisions
How machines can take decisions
Deepu S Nath
 
Simplified Introduction to AI
Simplified Introduction to AISimplified Introduction to AI
Simplified Introduction to AI
Deepu S Nath
 
Mining Opportunities of Block Chain and BitCoin
Mining Opportunities of Block Chain and BitCoinMining Opportunities of Block Chain and BitCoin
Mining Opportunities of Block Chain and BitCoin
Deepu S Nath
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
Deepu S Nath
 
Coffee@DBG - TechBites March 2016
Coffee@DBG - TechBites March 2016Coffee@DBG - TechBites March 2016
Coffee@DBG - TechBites March 2016
Deepu S Nath
 
REACT.JS : Rethinking UI Development Using JavaScript
REACT.JS : Rethinking UI Development Using JavaScriptREACT.JS : Rethinking UI Development Using JavaScript
REACT.JS : Rethinking UI Development Using JavaScript
Deepu S Nath
 
SEO For Developers
SEO For DevelopersSEO For Developers
SEO For Developers
Deepu S Nath
 
Life Cycle of an App - From Idea to Monetization
Life Cycle of an App - From Idea to Monetization  Life Cycle of an App - From Idea to Monetization
Life Cycle of an App - From Idea to Monetization
Deepu S Nath
 
Uncommon Python - What is special in Python
Uncommon Python -  What is special in PythonUncommon Python -  What is special in Python
Uncommon Python - What is special in Python
Deepu S Nath
 
Coffee@DBG - TechBites Sept 2015
Coffee@DBG - TechBites Sept 2015Coffee@DBG - TechBites Sept 2015
Coffee@DBG - TechBites Sept 2015
Deepu S Nath
 
Techbites July 2015
Techbites July 2015Techbites July 2015
Techbites July 2015
Deepu S Nath
 
Apple Watch - Start Your Developer Engine
Apple Watch -  Start Your Developer EngineApple Watch -  Start Your Developer Engine
Apple Watch - Start Your Developer Engine
Deepu S Nath
 
Greetings & Response - English Communication Training
Greetings & Response - English Communication TrainingGreetings & Response - English Communication Training
Greetings & Response - English Communication Training
Deepu S Nath
 
Design Thinking, Critical Thinking & Innovation Design
Design Thinking, Critical Thinking & Innovation DesignDesign Thinking, Critical Thinking & Innovation Design
Design Thinking, Critical Thinking & Innovation Design
Deepu S Nath
 
GTECH ATFG µLearn Framework Intro
GTECH ATFG µLearn Framework IntroGTECH ATFG µLearn Framework Intro
GTECH ATFG µLearn Framework Intro
Deepu S Nath
 
Future of learning - Technology Disruption
Future of learning  - Technology DisruptionFuture of learning  - Technology Disruption
Future of learning - Technology Disruption
Deepu S Nath
 
Decentralized Applications using Ethereum
Decentralized Applications using EthereumDecentralized Applications using Ethereum
Decentralized Applications using Ethereum
Deepu S Nath
 
How machines can take decisions
How machines can take decisionsHow machines can take decisions
How machines can take decisions
Deepu S Nath
 
Artificial Intelligence: An Introduction
 Artificial Intelligence: An Introduction Artificial Intelligence: An Introduction
Artificial Intelligence: An Introduction
Deepu S Nath
 
FAYA PORT 80 Introduction
FAYA PORT 80 IntroductionFAYA PORT 80 Introduction
FAYA PORT 80 Introduction
Deepu S Nath
 
How machines can take decisions
How machines can take decisionsHow machines can take decisions
How machines can take decisions
Deepu S Nath
 
Simplified Introduction to AI
Simplified Introduction to AISimplified Introduction to AI
Simplified Introduction to AI
Deepu S Nath
 
Mining Opportunities of Block Chain and BitCoin
Mining Opportunities of Block Chain and BitCoinMining Opportunities of Block Chain and BitCoin
Mining Opportunities of Block Chain and BitCoin
Deepu S Nath
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
Deepu S Nath
 
Coffee@DBG - TechBites March 2016
Coffee@DBG - TechBites March 2016Coffee@DBG - TechBites March 2016
Coffee@DBG - TechBites March 2016
Deepu S Nath
 
REACT.JS : Rethinking UI Development Using JavaScript
REACT.JS : Rethinking UI Development Using JavaScriptREACT.JS : Rethinking UI Development Using JavaScript
REACT.JS : Rethinking UI Development Using JavaScript
Deepu S Nath
 
SEO For Developers
SEO For DevelopersSEO For Developers
SEO For Developers
Deepu S Nath
 
Life Cycle of an App - From Idea to Monetization
Life Cycle of an App - From Idea to Monetization  Life Cycle of an App - From Idea to Monetization
Life Cycle of an App - From Idea to Monetization
Deepu S Nath
 
Uncommon Python - What is special in Python
Uncommon Python -  What is special in PythonUncommon Python -  What is special in Python
Uncommon Python - What is special in Python
Deepu S Nath
 
Coffee@DBG - TechBites Sept 2015
Coffee@DBG - TechBites Sept 2015Coffee@DBG - TechBites Sept 2015
Coffee@DBG - TechBites Sept 2015
Deepu S Nath
 
Techbites July 2015
Techbites July 2015Techbites July 2015
Techbites July 2015
Deepu S Nath
 
Apple Watch - Start Your Developer Engine
Apple Watch -  Start Your Developer EngineApple Watch -  Start Your Developer Engine
Apple Watch - Start Your Developer Engine
Deepu S Nath
 
Greetings & Response - English Communication Training
Greetings & Response - English Communication TrainingGreetings & Response - English Communication Training
Greetings & Response - English Communication Training
Deepu S Nath
 

Recently uploaded (20)

Dancing with AI - A Developer's Journey.pptx
Dancing with AI - A Developer's Journey.pptxDancing with AI - A Developer's Journey.pptx
Dancing with AI - A Developer's Journey.pptx
Elliott Richmond
 
Create Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent BuilderCreate Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent Builder
DianaGray10
 
Jira Administration Training – Day 1 : Introduction
Jira Administration Training – Day 1 : IntroductionJira Administration Training – Day 1 : Introduction
Jira Administration Training – Day 1 : Introduction
Ravi Teja
 
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
Edge AI and Vision Alliance
 
LSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection FunctionLSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection Function
Takahiro Harada
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
Trends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary MeekerTrends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary Meeker
Clive Dickens
 
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Safe Software
 
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and ImplementationAI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
Christine Shepherd
 
Securiport - A Border Security Company
Securiport  -  A Border Security CompanySecuriport  -  A Border Security Company
Securiport - A Border Security Company
Securiport
 
Palo Alto Networks Cybersecurity Foundation
Palo Alto Networks Cybersecurity FoundationPalo Alto Networks Cybersecurity Foundation
Palo Alto Networks Cybersecurity Foundation
VICTOR MAESTRE RAMIREZ
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdfBoosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Alkin Tezuysal
 
soulmaite review - Find Real AI soulmate review
soulmaite review - Find Real AI soulmate reviewsoulmaite review - Find Real AI soulmate review
soulmaite review - Find Real AI soulmate review
Soulmaite
 
Compliance-as-a-Service document pdf text
Compliance-as-a-Service document pdf textCompliance-as-a-Service document pdf text
Compliance-as-a-Service document pdf text
Earthling security
 
Co-Constructing Explanations for AI Systems using Provenance
Co-Constructing Explanations for AI Systems using ProvenanceCo-Constructing Explanations for AI Systems using Provenance
Co-Constructing Explanations for AI Systems using Provenance
Paul Groth
 
What is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to Know
What is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to KnowWhat is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to Know
What is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to Know
SMACT Works
 
Introduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUEIntroduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUE
Google Developer Group On Campus European Universities in Egypt
 
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
Jasper Oosterveld
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 
Dancing with AI - A Developer's Journey.pptx
Dancing with AI - A Developer's Journey.pptxDancing with AI - A Developer's Journey.pptx
Dancing with AI - A Developer's Journey.pptx
Elliott Richmond
 
Create Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent BuilderCreate Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent Builder
DianaGray10
 
Jira Administration Training – Day 1 : Introduction
Jira Administration Training – Day 1 : IntroductionJira Administration Training – Day 1 : Introduction
Jira Administration Training – Day 1 : Introduction
Ravi Teja
 
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
Edge AI and Vision Alliance
 
LSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection FunctionLSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection Function
Takahiro Harada
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
Trends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary MeekerTrends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary Meeker
Clive Dickens
 
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Safe Software
 
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and ImplementationAI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
Christine Shepherd
 
Securiport - A Border Security Company
Securiport  -  A Border Security CompanySecuriport  -  A Border Security Company
Securiport - A Border Security Company
Securiport
 
Palo Alto Networks Cybersecurity Foundation
Palo Alto Networks Cybersecurity FoundationPalo Alto Networks Cybersecurity Foundation
Palo Alto Networks Cybersecurity Foundation
VICTOR MAESTRE RAMIREZ
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdfBoosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Alkin Tezuysal
 
soulmaite review - Find Real AI soulmate review
soulmaite review - Find Real AI soulmate reviewsoulmaite review - Find Real AI soulmate review
soulmaite review - Find Real AI soulmate review
Soulmaite
 
Compliance-as-a-Service document pdf text
Compliance-as-a-Service document pdf textCompliance-as-a-Service document pdf text
Compliance-as-a-Service document pdf text
Earthling security
 
Co-Constructing Explanations for AI Systems using Provenance
Co-Constructing Explanations for AI Systems using ProvenanceCo-Constructing Explanations for AI Systems using Provenance
Co-Constructing Explanations for AI Systems using Provenance
Paul Groth
 
What is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to Know
What is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to KnowWhat is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to Know
What is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to Know
SMACT Works
 
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
Jasper Oosterveld
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 

Coffee@DBG - Exploring Angular JS

  • 1. Exploring Liju Raj Pillai CEO, Perfomatix Solutions Pvt Ltd
  • 2. 2
  • 3. Topics • What to expect from the talk • Why JavaScript is relevant? • Before diving in to AngularJS • What is AngularJS • Core concepts of AngularJS • When to use AngularJS • What next • Demo 3
  • 4. What to expect from this talk?
  • 5. Why JS is relevant ? • JavaScript is around since 1995 • Considered to be “second class” • Ajax • jQuery,underscore • Modern browsers • Better JS engines
  • 6. Before diving in to AngularJS • JavaScript(of course !!!) • Model View Controller pattern • Why MVC ? • Server side MVC • Client side MVC • SPA – Single Page Application • Framework vs Library
  • 7. What is AngularJS • Client-side framework • Developed and maintained by Google. • Provides client side MVC capabilities. • Philosophy • Declarative code is better than imperative • Testing in equal importance to app writing • Decouple client side from server side • Ideal for SPA
  • 8. Sample Application 8 JAVASCRIPT var myModule=angular.module(“myApp”,[]) myModule.controller(“exampleController”,[“$scope”,function($scope){ $scope.message=“Angular is awesome” }]); JAVASCRIPT var myModule=angular.module(“myApp”,[]) myModule.controller(“exampleController”,[“$scope”,function($scope){ $scope.message=“Angular is awesome” }]); HTML <html ng-app=“myApp”> <head> <script src=“lib/angular.js”> <script src=“js/___.js”> </head> <body> <div ng-controller=“exampleController”> {{message}} </div> </body> </html> HTML <html ng-app=“myApp”> <head> <script src=“lib/angular.js”> <script src=“js/___.js”> </head> <body> <div ng-controller=“exampleController”> {{message}} </div> </body> </html> RESULT Angular is awesome RESULT Angular is awesome
  • 9. Modules • Divides web application into small,reusable components • Controllers,Filters,Directives etc can be declared inside a module • You can package code as reusable modules • Modules can be loaded in any order • Unit tests only have to load relevant modules
  • 10. Modules CREATING AN ANGULAR JS MODULE <script type="text/javascript"> angular.module('myApp',[]); angular.module('myApp',['dependentModule1','dependentModule2']); </script> CREATING AN ANGULAR JS MODULE <script type="text/javascript"> angular.module('myApp',[]); angular.module('myApp',['dependentModule1','dependentModule2']); </script> USING ANGULAR JS MODULE <html ng-app="myApp"> <head>...</head> <body>…</body> </html USING ANGULAR JS MODULE <html ng-app="myApp"> <head>...</head> <body>…</body> </html
  • 11. Data Binding Data Binding in Classical Template Systems Data Binding in Angular Templates
  • 12. Dependency Injection • Design pattern • DI is omnipresent in AngularJS
  • 14. AngularJS Controllers •Where your business logic lives •Layer between UI and data store •ng-controller •Decoupled from the view •Re-instantiated on every new call •Add behavior to $scope
  • 15. AngularJS Controllers CODE SNIPPET var myModule=angular.module(“exampleModule”,[]) myModule.controller(“exampleController”,[“$scope”,function($scope){ $scope.message=“Angular is awesome” }]); CODE SNIPPET var myModule=angular.module(“exampleModule”,[]) myModule.controller(“exampleController”,[“$scope”,function($scope){ $scope.message=“Angular is awesome” }]); HTML <div ng-controller="DoubleController"> Two times <input ng-model="num"> equals {{ double(num) }} </div> HTML <div ng-controller="DoubleController"> Two times <input ng-model="num"> equals {{ double(num) }} </div>
  • 16. AngularJS $scope • Connects controller and view • $rootScope
  • 17. AngularJS $scope HTML <div ng-controller="MyController"> Your name: <input type="text" ng-model="username"> <button ng-click='sayHello()'>greet</button> <hr> {{greeting}} </div> HTML <div ng-controller="MyController"> Your name: <input type="text" ng-model="username"> <button ng-click='sayHello()'>greet</button> <hr> {{greeting}} </div> SCRIPT angular.module('scopeExample', []) .controller('MyController', ['$scope', function($scope) { $scope.username = 'World'; $scope.sayHello = function() { $scope.greeting = 'Hello ' + $scope.username + '!'; }; }]); SCRIPT angular.module('scopeExample', []) .controller('MyController', ['$scope', function($scope) { $scope.username = 'World'; $scope.sayHello = function() { $scope.greeting = 'Hello ' + $scope.username + '!'; }; }]);
  • 18. AngularJS Service • Stateless objects that contains useful function • Can be called from controllers,filters,directives etc • Singleton • Injectable by DI • Reusable components
  • 19. AngularJS Service • Lazy instantiated • Services provided by Angular • $http - For ajax requests • $interval and $timeout - Repeats and delays • $rootScope - very top scope of application • $location - URL and its parts of current site • $window - Wrapper of global window. Useful for tests CODE SNIPPET var myModule = angular.module('myModule', []); myModule.factory('serviceId', function() { var shinyNewServiceInstance; // factory function body that constructs shinyNewServiceInstance return shinyNewServiceInstance; }); CODE SNIPPET var myModule = angular.module('myModule', []); myModule.factory('serviceId', function() { var shinyNewServiceInstance; // factory function body that constructs shinyNewServiceInstance return shinyNewServiceInstance; });
  • 20. AngularJS Filters • A filter formats the value of an expression for display to the user CODE SNIPPET myApp.filter('capitalize', function () { return function (s) { if (!s || !angular.isString(s)) { return s; } return s.charAt(0).toUpperCase() + s.substring(1); }; }); CODE SNIPPET myApp.filter('capitalize', function () { return function (s) { if (!s || !angular.isString(s)) { return s; } return s.charAt(0).toUpperCase() + s.substring(1); }; });
  • 21. AngularJS Filters • Functions which modify expressions • But does not alter the original data • Angular JS provides few of its own filters • currency, lowercase, date, number, filter, orderBy, uppercase etc.
  • 22. AngularJS Directives • Angular’s way to teach html new tricks • Lives in the view • Built in Directives ng-app, ng-controller, ng-repeat, ng-model etc • Directive names, ngModel or ng-model
  • 23. AngularJS Directives JAVASCRIPT myApp.directive('boldClick', function() { return function(scope, element) { var bold = false; element.click(function() { if (bold) { element.css('font-weight', 'normal'); } else { element.css('font-weight', 'bold'); } bold = !bold; }); }; }); JAVASCRIPT myApp.directive('boldClick', function() { return function(scope, element) { var bold = false; element.click(function() { if (bold) { element.css('font-weight', 'normal'); } else { element.css('font-weight', 'bold'); } bold = !bold; }); }; }); HTML <div> My pet is a <span bold-click>tortoise</span>. </div> HTML <div> My pet is a <span bold-click>tortoise</span>. </div> https://docs.angularjs.org/api/ng/directive
  • 24. When to use AngularJS • CRUD Application • SPA • API First
  • 25. When not to use AngularJS • Games • GUI Editors • Applications with intensive and tricky DOM manipulation • Non SPA applications
  • 26. What next • Path from novice to ninja • Learn JavaScript http://eloquentjavascript.net/ • Read https://docs.angularjs.org/guide • Do https://docs.angularjs.org/tutorial • Refer https://egghead.io/
  • 27. What next • Angular2.0 • Tools • http://yeoman.io/ - Scaffolding and build tool • batarang - Debug tool