SlideShare a Scribd company logo
1 of 58
Download to read offline
© 2015 Farata Systems
Modern Web
Development for Java
Programmers
Unit 2. AngularJS Basics. Becoming Productive with
JavaScript.
Video recording of this session: http://bit.ly/1NHV3Wd 

© 2015 Farata Systems
Overview of JavaScript
Frameworks
© 2015 Farata Systems
Why use HTML5 frameworks
• They deal with cross-browser compatibility
• Make your application more structured
• May include reusable components
• Make programmers more productive
• Lower the amount of manually written code
© 2015 Farata Systems
Frameworks vs Libraries
Frameworks expect you to programs using well defined rules. 



Libraries just offer reusable components.
There are two major types of frameworks:
• Feature complete
• Lightweight (MVC + Binding + Routing)



© 2015 Farata Systems
Feature Complete Frameworks
• Suitable for back-office applications
• Include a library of UI components
• Have good tooling
• Steeper learning curve
• May be difficult to customize
• Typicallt the size of the app is more than 1MB
© 2015 Farata Systems
Lightweight Frameworks
• Mainly deal with application structure, navigation, AJAX
• Work best for consumer-oriented websites
• Can be combined with 3-party libraries
• Easier to learn
© 2015 Farata Systems
Single-Page Applications (SPA)
• No full Web page reloads
• Only certain portions of the page get refreshed
• The state of a Web page doesn’t get reset
• The user gets a feel of a desktop app
• Search Engine Optimization (SEO) may suffer
© 2015 Farata Systems
Gmail: a Single Page Application
© 2015 Farata Systems
Professional SPA features
• Modularization
• Controllers handles DOM manipulations and AJAX
• HTML templating
• Routing with deep linking
• Real time communication via Web sockets
• Use of HTML5 Local storage
Read more about SPA at

https://en.wikipedia.org/wiki/Single-page_application
© 2015 Farata Systems
AngularJS
https://angularjs.org
© 2015 Farata Systems
Why AngularJS?
• Pros:
• Good choice for single-page applications
• MVC with minimal coding
• Easy routing
• Lightweight, yet pluggable with well-defined modular architecture
• Develped by Google
• Cons: developed by Google
© 2015 Farata Systems
Hello World
<!DOCTYPE html>



<html>

<head >

<title>Hello World</title>

</head>

<body ng-app>

<h1> This is just a Hello World HTML</
h1>



<div>



<h2> Hello from div</h2>

</div>



<script src="angular.js" />

</body>

</html>
An AngularJS directive
© 2015 Farata Systems
MVC in Angular App
Controller
View Model
User
sees
initiates

actions
modifies
html
ng-controller
ng-model
updates

via

binding
ng-app
productName
description
bid
price

…
productName
description
bid
price
$scope
informs

controller
© 2015 Farata Systems
MVCS
Controller
View Model
User 1. Sees
4. Modifies
html
ng-controller
ng-model
6. Updates

via

binding
ng-app
productName
description
bid
price

…
Services



The 

server-side

tier

productName
description
bid
price
$scope
2. Initiates

actions
3. Informs

controller
5. HTTP

or

WebSocket

communications

7. Sees
© 2015 Farata Systems
Two-way Binding
HTML

template
View
Change in View

updates Model
<p>{{ productName }}</p>
Compiles
Model
Change in Model

updates View
© 2015 Farata Systems
A Simple AngularJS App
• Single HTML file:
<!DOCTYPE html>



<!-- STEP 2: Bootstrap AngularJS -->

<html ng-app>

<head lang="en">

<meta charset="UTF-8">

<title>Unit 2. Walkthrough 2.</title>

</head>

<body>

<!-- STEP 3: Define a new variable in the root scope. -->

<p>Type here: <input type="text" ng-model="message"/></p>



<!-- STEP 4: Add data binding to the "message" variable. -->

<p>Should appear: <strong>{{ message }}</strong></p>



<!-- STEP 1: Add AngularJS dependency. -->

<script src="angular.js"></script>

</body>

</html>
Defines the scope of controlled by AngularJS
Creates a variable message in the model
Binds a view to a variable from the model
© 2015 Farata Systems
Walkthrough 1Install AngularJS plugin according to the instructions from the file prerequisites.txt.
Unzip the file with handouts and create an empty IDEA project in the same directory. Import the module unit2.iml according
to instructions from import_code_manual. Ignore the excluded folders warnings. 



Use directory walkthroughs/w1 from the handouts as the starting point. Open w1.html file in the IDEA’s editor:
1. Include AngularJS library using <script> tag:

<script src="angular.js"></script>
2. Bootstrap AngularJS app by adding ng-app directive to <html> tag:

<html ng-app>.
3. Define a new variable in the root scope and enable two-way data-binding for the input element as using ng-model
directive: <input type="text" ng-model="message"/>
4. Inside the <strong> element add data-binding to the message variable:

<strong>{{ message }}</strong>
5. Open w1.html file in Chrome browser and see if the binding works.
6. Compare Angular and pure JavaScript versions in the solutions directory. Select w1.html and w1_pureJS.html, right-
click, and select Compare Two files. You should see the output shown on next slide.
7.Review all code samples from the folder walkthroghs/w1-solutions.
© 2015 Farata Systems
Walkthrough 1: Comparing Angular and JavaScript versions
w1-solution/w1.html w1-solution/w1_JS.html
© 2015 Farata Systems
Angular Players
• Modules - each app consists of one or more modules
• Controllers - handle user interactions, orchestrate models and services
• Directives - assign custom behavior to HTML elements
• Filters - format the expression’s value
• Binding Expressions - code snippets placed in curly braces within HTML template
© 2015 Farata Systems
Modules
• Help avoiding monolithic applications
• Angular istelf is split into modules (see http://ngmodules.org).
The file angular.js is a module with core functionality.
• Split one JS file into several files
• Allow to specify dependencies
• Can be loaded in any order or in parallel
20
© 2015 Farata Systems
Module Usages
// Create a new module

var auction = angular.module('auction', []);



// Get an existing module

var auction = angular.module('auction');



// Create a module that dependents on ngRoute

var auction = angular.module('auction', ['ngRoute']);

// Adding routing support
<script src="angular-route.js"></script>
21
When Angular loads it creates one variable angular on the
global scope.
© 2015 Farata Systems
Module, Controller, Model, and Filter
<!DOCTYPE html>

<html ng-app="auction">

<head lang="en">

<meta charset="UTF-8">

<title>Unit 2. Walkthrough 3.</title>

</head>

<body ng-controller="IndexController">

<p>Type here: <input type="text" ng-model="model.message"/></p>

<p>Should appear: <strong>{{ model.message | uppercase }}</strong></p>



<script src="angular.js"></script>

<script src="w3.js"></script>

</body>

</html>
var auction = angular.module('auction', []);



auction.controller('IndexController', function ($scope) {

$scope.model = {

message: 'Initial message'

};

});
Module name
Binding Expression
Inject scope
into controller
Create module w3.js
Filter
index.html
Controller name
Create controller
© 2015 Farata Systems
Controller
• Handles user interactions
• Creates the model on the $scope object
• Receives control during routing
• Never manipulates the view directly
• A view can have multiple controllers
© 2015 Farata Systems
How to use a controller
'use strict';



(function () {

var MainController = function ($scope) {

$scope.awesomeThings = [

'HTML5 Boilerplate',

'AngularJS',

'Karma'];

};



angular.module('store').controller('MainController', MainController);

})();

<div ng-controller=“MainController”>
<ul>

<li ng-repeat="aThing in awesomeThings">{{ aThing }}</li>

</ul>
</div>
A scope shares variables
between view and controller
A new variable aThing is created for each ng-repeat iteration
© 2015 Farata Systems
Scope
• Shares variables between view and controller
• A place where the model data are visible
• One $rootScope is implicitly created for the entire app
• Child $scope objects are created for controllers and
directives (e.g. ng-controller, ng-repeat)
• If a variable isn’t found in the child scope, AngularJS
looks in the prototypal chain of scopes.
© 2015 Farata Systems
Directives
• Attach behaviour to the DOM elements
• Can have visual and non-visual effects (ng-controller vs ng-repeat)
• Directives offer:
‣ UI decomposition
‣ Reusable components
26
© 2015 Farata Systems
Directive Usages
• Directives can be represented in several forms:
‣ HTML element’s attribute: ng-app, data-ng-app
‣ HTML element’s: <auction-navbar>
‣ CSS classes <div class=“auction-navbar”>
27
© 2015 Farata Systems
Walkthrough 2
Developing Online Auction in Angular
© 2015 Farata Systems
Walkthrough 2
• In this walkthrough we will use AngularJS to develop the Auction Home and
Search pages. We’ll use the $http object to read the data from the json files.
• Here we’ll implement navigation between Auction Home and Search pages
without using routing. We’ll get the same functionality as in the Homework but
using AngularJS directives:
• ng-init - to declare and initialize a variable on the current scope
• ng-include - to download HTML template, apply the data to the template
and insert generated markup inside the HTML element it’s attached to
• Use the directory walkthroughs/w2 as the starting point.
• Open walkthrough_2_guide.html file from the handouts and follow the
instructions.
© 2015 Farata Systems
Routing
• Enables deep-linking for single-page applications
• Uses the fragment identifier #, doesn’t reload the page
• Supports HTML5 History API as well as “hashbang” (/#!)
• Is represented as $route service:
• Maps URLs to views (HTML templates) and controllers





angular.module(‘ngRoute', ['ng']).provider('$route', $RouteProvider);
Lives in a separate module
Registered with provider(), hence
$routeProvider is available at configuration phase
© 2015 Farata Systems
$routeProvider
• Allows configuring mapping at configuration phase
angular.module('auction', ['ngRoute'])

.config(['$routeProvider', function ($routeProvider) {

$routeProvider

.when('/', {

templateUrl: 'views/home.html',

controller: 'HomeController'

})

.when('/search', {

templateUrl: 'views/search.html',

controller: 'SearchController'

})

.otherwise({

redirectTo: '/'

});

}]);
Added as dependency to the app
Config phase
One-to-one mapping
Path to a partial view (HTML template)
Controller’s name as it’s registered
in the DI container
Default route
Never contains “hashbang"
© 2015 Farata Systems
Filters
• Transform an expression value
• Can be used in HTML and directly invoked from code
• Take at least one parameter - the value to transform
• Can take arbitrary number of parameters
32
© 2015 Farata Systems
Filter Example
<span>{{ names | joinData : ', ' }}</span>
angular.module(‘auction').filter('joinData',
(array, separator) => array.join(separator));
var names = ['John', 'Mike', 'Kate'];
‘John, Mike, Kate’
33
Filter name
Filter implementation
© 2015 Farata Systems
Identifying the View
• The routing module needs to know where to display the HTML fragment
• Add attribute marked with ng-view inside the HTML element
• Declare a single ng-view for the entire app
• ng-view is always in sync with the URL according to
$routeProvider’s mapping
<div class="container" ng-view></div>
© 2015 Farata Systems
How Navigate to a Route?
• Clicking on a link (# used to prevent page reloading):
<a href="#/search">Submit</a>
• Using $location service:
$location.url('/search');
• Changing a path fragment may require modifications in
multiple places. AngularUI has more flexible ui-router
component.
© 2014 Farata Systems
Tools
© 2015 Farata Systems
The Tools We Use
• node.js - JS framework plus a runtime for all development tools
listed below.
• npm - node package manager used for installing and managing
development tools
• yeoman - a scaffolding tool used to generate the initial structure of
an application
• bower - package manager for your application dependencies
(front-end)
• grunt - a build automation tool
© 2015 Farata Systems
© 2015 Farata Systems
Node.js
• A frameworks and a platform for executing JavaScript code outside the
web browser
• Built on top of Chrome’s JavaScript engine - V8
• Uses event-driven non-blocking I/O model
• Allows writing server-side JavaScript applications that access files,
support TCP, UDP, HTTP, SSL, and compression.
• We will use Node.js as a runtime for JavaScript development tools
• Has pre-built installers for all popular platforms at nodejs.org/download/
© 2015 Farata Systems
npm
• npm is a Node.js package manager for development-
tools and their dependencies
• Has a repository of 50K+ packages at 

https://www.npmjs.org
• To run, type npm in the command window
© 2015 Farata Systems
package.json
• package.json is a json-formatted file where we configure npm dependencies.
• You can configure two types of dependencies in package.json:
‣ dependencies - packages needed for publishing your app in the npm
registry
‣ devDependencies - packages that are used only during development only
(e.g. grunt, development web server, etc.)
• To install all dependencies listed in package.json: npm install
• To install a new dependency (e.g. grunt-ts) locally: npm install grunt-ts
• To install a new dependency globally: npm install -g grunt-ts
• Use --save and --save-dev to automatically update package.json along
with installing a new package.
© 2015 Farata Systems
A package.json Example
List all development dependencies for the auction app:
{

"name": "auction",

"version": "0.1.0",

"dependencies": {},

"devDependencies": {

"grunt": "^0.4.2",
"grunt-concurrent": "~0.4.1",
"load-grunt-tasks": "0.2.1"

}

}
Specific version: 0.2.1
“Reasonably close”: >=0.4.1-0 <0.5.0-0
>=0.4.2-0 <1.0.0-0
© 2014 Farata Systems 43
© 2015 Farata Systems
Yeoman
• A scaffolding tool for generating the initial project structure.
• It’s an npm package and is installed with npm install -g yo
• Has a rich collection of generators at http://yeoman.io/generators
• To install the angular generator: 

npm install -g generator-angular
• To run, type yo with parameter in the command window without the
generator- prefix, e.g.:



yo angular
44
© 2015 Farata Systems
Bower
• Bower is a package manager for the application dependencies
• Package can have any layout and any type of assets.
• Configuration is specified in the file bower.json.
• There is a huge collection of packages controlled by Bower at http://
bower.io/search
• To install bower globally: npm install -g bower
• To run, type bower in the command window, and it’ll use configurations
specified in the file bower.json.
45
© 2015 Farata Systems
Bower Configuration: bower.json
• bower.json describes the application’s package. We’ll use json
propertied to configure application dependencies.
• Two types of dependencies:
‣ dependencies - packages needed for production version of the
app
‣ devDependencies - packages needed only during development
(e.g. unit testing libraries)
• To install all dependencies listed in bower.json: bower install
• To install a new dependency: bower install angular-resource
• Use --save and --save-dev to automatically update bower.json
along with installing a new package.
46
© 2015 Farata Systems
Bower: version ranges
The complete list of versions is at: https://docs.npmjs.com/misc/semver#Ranges
{

"name": "auction",

"version": "0.1.0",

"dependencies": {

"angular": "1.2.14",

"angular-route": "~1.2.14",

"bootstrap": "^3.1.1"

},

"devDependencies": {

"DefinitelyTyped": "*"

}

}
The exact version 1.2.14
>=1.2.14-0 <1.3.0-0
>=3.1.1-0 <4.0.0-0
any version
47
© 2014 Farata Systems 48
© 2015 Farata Systems
Grunt
• Grunt is a build automation tool for web apps
• Grunt is configured as a dependency in npm’s package.json
• We need to install command-line interface to grunt:
npm install -g grunt-cli
• To run, type grunt in the command window
• Grunt plugins are installed with npm:
npm install grunt-ts —-save-dev
49
© 2015 Farata Systems
Grunt Configuration: Gruntfile.js
• A JavaScript that loads Grunt plugins containing tasks
• Defines all configurations for tasks that Grunt can execute
• Each task can be invoked separately with grunt task
• A task consists of targets, and you can optionally run just a
target: 

grunt task:target
50
© 2014 Farata Systems
A sample Gruntfile.js
module.exports = function(grunt) {



grunt.initConfig({

pkg: grunt.file.readJSON('package.json'),

concat: {

options: {

separator: ';'

},

dist: {

src: ['src/**/*.js'],

dest: 'dist/<%= pkg.name %>.js'

}

},

qunit: {

files: ['test/**/*.html']

},

watch: {

files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'],

tasks: ['qunit']

}

});



grunt.loadNpmTasks('grunt-contrib-concat');

grunt.loadNpmTasks('grunt-contrib-qunit');

grunt.loadNpmTasks('grunt-contrib-watch');



grunt.registerTask('test', ['qunit']);



grunt.registerTask('default', ['qunit', 'concat']);



};
Node.js way to
encapsulate modules
Initializes grunt configuration
Read configs from package.json
Task’s configuration.
Has the same name as task.
Common name for all tasks
A unique set of available options
for each taskTarget can have
an arbitrary name
<%= %> - refers to a property in the config
<% %> - executes arbitrary JavaScript code
Loads the plugin installed with npm
Creates a custom task available
in the command-line
A default grunt task(s)
51
will be reviewed during the walkthrough 3
© 2015 Farata Systems
Files
• Most Grunt tasks operate on files
• Grunt supports several source/destination formats:
dist: {

src: ['src/bb.js', 'src/bbb.js'],

dest: 'dest/b.js'

}
dist: {

src: ['src/bb.js', 'src/bbb.js'],

dest: 'dest/b.js'

}
Compact format
Files Object Format
dist: {

files: {

'dest/a.js': ['src/aa.js', 'src/aaa.js'],

'dest/a1.js': ['src/aa1.js', 'src/aaa1.js']

}

}
Compact format
less: {

dist: {

files: [{

expand: true,

cwd: '<%= yeoman.app %>/styles',

src: '{,*/}*.less',

dest: '.tmp/styles',

ext: '.css'

}]

}

}
Example from auction app
52
will be reviewed during the walkthrough 3
© 2015 Farata Systems
Typical Workflow
• npm install
• bower install
• grunt build
53
© 2014 Farata Systems
Walkthrough 3
Reimplementing the Home Page using tools
54
Open walkthrough_3_guide.html and follow instructions.
© 2015 Farata Systems
Frequently used AngularJS services
• $scope - access to the current scope
• $rootScope - access to the root scope
• $http - HTTP requests
• $location - to work with window.location
• $window - to access window object
© 2015 Farata Systems
AngularJS directives you’ll
need for the homework
• ng-app - determines the scope of AngularJS app and
automatically bootstraps the app
• ng-view - tells AngularJS which HTML element should be used to
include the rendered view while navigating using routing service
• ng-repeat - iterates through a collection of objects, instantiates a
template it’s attached to once per item
© 2015 Farata Systems
Homework 2
Refactor the auction app to use routing instead of ngInit and ngInclude directives to navigate among the
pages. Use directory homework2 from the handouts as the starting point.
1. Add the angular-route library as a dependency to bower.json. Run bower install to download the
library locally. Run grunt wiredep to add the reference to the library angular-route into index.html.
2. Open app/scripts/app.js and add ngRoute module as a dependency for the main application module
auction. Configure $routeProvider as shown in the slide $routeProvider but use your own templateUrl
and controller values. Use controllerAs option to automatically expose controller’s fields and methods on
the scope.
3. Open app/views/index.html file and replace ngInit and ngInclude directives with ngView directive.
Replace ngClick with ngHref directives for Search button and brand name link that we use for navigation.
ngHref should have correct value as we discussed in How Navigate to a Route section.
4. Run grunt build command. It’ll generate the dist directory in the root directory of your app. Deploy the
content of dist at GitHub Pages.
5. Send your homework (2 URLs: link to GitHub repository with the source code and a link to the app deployed to
GitHub Pages) to training@faratasystems.com.
Read the documentation about all the AngularJS directives used during the class and in the homework.
Read about grunt plugins we used to configure our app. You can find each plugin by its name in npmjs.org
registry.
© 2015 Farata Systems
Additional Resources
• AngularJS Developer Guide - http://docs.angularjs.org/guide
• A collection of articles - http://www.ng-newsletter.com/posts/
• A collection of AngularJS learning resources - https://github.com/
jmcunningham/AngularJS-Learning
• AngularJS Google style guide (disregard the Google Closure part)
• AngularJS community style guide
• Our upcoming trainings: http://faratasystems.com

More Related Content

What's hot

Angular 2 for Java Developers
Angular 2 for Java DevelopersAngular 2 for Java Developers
Angular 2 for Java DevelopersYakov Fain
 
AngularJs presentation
AngularJs presentation AngularJs presentation
AngularJs presentation Phan Tuan
 
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 &UXJWORKS powered by Ordina
 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day WorkshopShyam Seshadri
 
Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectIntroduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectJadson Santos
 
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016Codemotion
 
Angular 2 Essential Training
Angular 2 Essential Training Angular 2 Essential Training
Angular 2 Essential Training Patrick Schroeder
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2Knoldus Inc.
 
Angular 2: core concepts
Angular 2: core conceptsAngular 2: core concepts
Angular 2: core conceptsCodemotion
 
Reactive Thinking in Java with RxJava2
Reactive Thinking in Java with RxJava2Reactive Thinking in Java with RxJava2
Reactive Thinking in Java with RxJava2Yakov Fain
 
AngularJS application architecture
AngularJS application architectureAngularJS application architecture
AngularJS application architectureGabriele Falace
 
Angular 2 - The Next Framework
Angular 2 - The Next FrameworkAngular 2 - The Next Framework
Angular 2 - The Next FrameworkCommit University
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overviewJesse Warden
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScriptYakov Fain
 
AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)Gary Arora
 
Angular1x and Angular 2 for Beginners
Angular1x and Angular 2 for BeginnersAngular1x and Angular 2 for Beginners
Angular1x and Angular 2 for BeginnersOswald Campesato
 

What's hot (20)

Angular 2 for Java Developers
Angular 2 for Java DevelopersAngular 2 for Java Developers
Angular 2 for Java Developers
 
AngularJs presentation
AngularJs presentation AngularJs presentation
AngularJs presentation
 
Introduction to Angularjs
Introduction to AngularjsIntroduction to Angularjs
Introduction to Angularjs
 
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
 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day Workshop
 
AngularJS Best Practices
AngularJS Best PracticesAngularJS Best Practices
AngularJS Best Practices
 
Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectIntroduction to angular with a simple but complete project
Introduction to angular with a simple but complete project
 
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
 
Angular 2 Essential Training
Angular 2 Essential Training Angular 2 Essential Training
Angular 2 Essential Training
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
 
Angular 2: core concepts
Angular 2: core conceptsAngular 2: core concepts
Angular 2: core concepts
 
Reactive Thinking in Java with RxJava2
Reactive Thinking in Java with RxJava2Reactive Thinking in Java with RxJava2
Reactive Thinking in Java with RxJava2
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS Basics
 
Angular2 for Beginners
Angular2 for BeginnersAngular2 for Beginners
Angular2 for Beginners
 
AngularJS application architecture
AngularJS application architectureAngularJS application architecture
AngularJS application architecture
 
Angular 2 - The Next Framework
Angular 2 - The Next FrameworkAngular 2 - The Next Framework
Angular 2 - The Next Framework
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overview
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScript
 
AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)
 
Angular1x and Angular 2 for Beginners
Angular1x and Angular 2 for BeginnersAngular1x and Angular 2 for Beginners
Angular1x and Angular 2 for Beginners
 

Viewers also liked

Developing Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJSDeveloping Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJSShekhar Gulati
 
Building Universal Applications with Angular 2
Building Universal Applications with Angular 2Building Universal Applications with Angular 2
Building Universal Applications with Angular 2Minko Gechev
 
AngularJS for Java Developers
AngularJS for Java DevelopersAngularJS for Java Developers
AngularJS for Java DevelopersLoc Nguyen
 
Angular 2 - Core Concepts
Angular 2 - Core ConceptsAngular 2 - Core Concepts
Angular 2 - Core ConceptsFabio Biondi
 
Getting Started with Angular 2
Getting Started with Angular 2Getting Started with Angular 2
Getting Started with Angular 2FITC
 
Building share point apps with angularjs
Building share point apps with angularjsBuilding share point apps with angularjs
Building share point apps with angularjsAhmed Elharouny
 
Dart for Java Developers
Dart for Java DevelopersDart for Java Developers
Dart for Java DevelopersYakov Fain
 
Cours java smi 2007 2008
Cours java smi 2007 2008Cours java smi 2007 2008
Cours java smi 2007 2008Khalil Lechheb
 
Integrating consumers IoT devices into Business Workflow
Integrating consumers IoT devices into Business WorkflowIntegrating consumers IoT devices into Business Workflow
Integrating consumers IoT devices into Business WorkflowYakov Fain
 
JM.PASCAL - This is my way...
JM.PASCAL - This is my way...JM.PASCAL - This is my way...
JM.PASCAL - This is my way...PASCAL Jean Marie
 
Alfresco 3.0 Enteprise : View by a Node
Alfresco 3.0 Enteprise : View by a NodeAlfresco 3.0 Enteprise : View by a Node
Alfresco 3.0 Enteprise : View by a NodePASCAL Jean Marie
 
Alfresco Android - Summit 2013 Talk
Alfresco Android - Summit 2013 TalkAlfresco Android - Summit 2013 Talk
Alfresco Android - Summit 2013 TalkPASCAL Jean Marie
 
Java(ee) mongo db applications in the cloud
Java(ee) mongo db applications in the cloud Java(ee) mongo db applications in the cloud
Java(ee) mongo db applications in the cloud Shekhar Gulati
 
Bonnes pratiques des applications java prêtes pour la production
Bonnes pratiques des applications java prêtes pour la productionBonnes pratiques des applications java prêtes pour la production
Bonnes pratiques des applications java prêtes pour la productionCyrille Le Clerc
 
Developer’s intro to the alfresco platform
Developer’s intro to the alfresco platformDeveloper’s intro to the alfresco platform
Developer’s intro to the alfresco platformAlfresco Software
 
Alfresco in few points - Node Tutorial
Alfresco in few points - Node TutorialAlfresco in few points - Node Tutorial
Alfresco in few points - Node TutorialPASCAL Jean Marie
 

Viewers also liked (20)

Developing Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJSDeveloping Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJS
 
Building Universal Applications with Angular 2
Building Universal Applications with Angular 2Building Universal Applications with Angular 2
Building Universal Applications with Angular 2
 
AngularJS for Java Developers
AngularJS for Java DevelopersAngularJS for Java Developers
AngularJS for Java Developers
 
Angular 2 - Core Concepts
Angular 2 - Core ConceptsAngular 2 - Core Concepts
Angular 2 - Core Concepts
 
Getting Started with Angular 2
Getting Started with Angular 2Getting Started with Angular 2
Getting Started with Angular 2
 
Building share point apps with angularjs
Building share point apps with angularjsBuilding share point apps with angularjs
Building share point apps with angularjs
 
Dart for Java Developers
Dart for Java DevelopersDart for Java Developers
Dart for Java Developers
 
Cours java smi 2007 2008
Cours java smi 2007 2008Cours java smi 2007 2008
Cours java smi 2007 2008
 
Integrating consumers IoT devices into Business Workflow
Integrating consumers IoT devices into Business WorkflowIntegrating consumers IoT devices into Business Workflow
Integrating consumers IoT devices into Business Workflow
 
PFE Scan (2)
PFE Scan (2)PFE Scan (2)
PFE Scan (2)
 
JM.PASCAL - This is my way...
JM.PASCAL - This is my way...JM.PASCAL - This is my way...
JM.PASCAL - This is my way...
 
Introduction àJava
Introduction àJavaIntroduction àJava
Introduction àJava
 
Alfresco 3.0 Enteprise : View by a Node
Alfresco 3.0 Enteprise : View by a NodeAlfresco 3.0 Enteprise : View by a Node
Alfresco 3.0 Enteprise : View by a Node
 
Alfresco Android - Summit 2013 Talk
Alfresco Android - Summit 2013 TalkAlfresco Android - Summit 2013 Talk
Alfresco Android - Summit 2013 Talk
 
ECM - Simple Definition ENG
ECM - Simple Definition ENGECM - Simple Definition ENG
ECM - Simple Definition ENG
 
Java(ee) mongo db applications in the cloud
Java(ee) mongo db applications in the cloud Java(ee) mongo db applications in the cloud
Java(ee) mongo db applications in the cloud
 
Bonnes pratiques des applications java prêtes pour la production
Bonnes pratiques des applications java prêtes pour la productionBonnes pratiques des applications java prêtes pour la production
Bonnes pratiques des applications java prêtes pour la production
 
Developer’s intro to the alfresco platform
Developer’s intro to the alfresco platformDeveloper’s intro to the alfresco platform
Developer’s intro to the alfresco platform
 
Alfresco in few points - Node Tutorial
Alfresco in few points - Node TutorialAlfresco in few points - Node Tutorial
Alfresco in few points - Node Tutorial
 
Spring In Alfresco Ecm
Spring In Alfresco EcmSpring In Alfresco Ecm
Spring In Alfresco Ecm
 

Similar to Overview of the AngularJS framework

Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to AngularjsGaurav Agrawal
 
Angular js 1.3 presentation for fed nov 2014
Angular js 1.3 presentation for fed   nov 2014Angular js 1.3 presentation for fed   nov 2014
Angular js 1.3 presentation for fed nov 2014Sarah Hudson
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSShyjal Raazi
 
Introduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarIntroduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarAppfinz Technologies
 
Angular 6 Training with project in hyderabad india
Angular 6 Training with project in hyderabad indiaAngular 6 Training with project in hyderabad india
Angular 6 Training with project in hyderabad indiaphp2ranjan
 
introduction to Angularjs basics
introduction to Angularjs basicsintroduction to Angularjs basics
introduction to Angularjs basicsRavindra K
 
AngularJs (1.x) Presentation
AngularJs (1.x) PresentationAngularJs (1.x) Presentation
AngularJs (1.x) PresentationRaghubir Singh
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular applicationSuresh Patidar
 
Learning AngularJS - Complete coverage of AngularJS features and concepts
Learning AngularJS  - Complete coverage of AngularJS features and conceptsLearning AngularJS  - Complete coverage of AngularJS features and concepts
Learning AngularJS - Complete coverage of AngularJS features and conceptsSuresh Patidar
 
Valentine with Angular js - Introduction
Valentine with Angular js - IntroductionValentine with Angular js - Introduction
Valentine with Angular js - IntroductionSenthil Kumar
 
Angular Project Report
 Angular Project Report Angular Project Report
Angular Project ReportKodexhub
 
Feature Development with jQuery
Feature Development with jQueryFeature Development with jQuery
Feature Development with jQueryMichael Edwards
 
Single Page Applications in SharePoint with Angular
Single Page Applications in SharePoint with AngularSingle Page Applications in SharePoint with Angular
Single Page Applications in SharePoint with AngularSparkhound Inc.
 

Similar to Overview of the AngularJS framework (20)

Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
 
Angular js 1.3 presentation for fed nov 2014
Angular js 1.3 presentation for fed   nov 2014Angular js 1.3 presentation for fed   nov 2014
Angular js 1.3 presentation for fed nov 2014
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Introduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarIntroduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumar
 
Introduction to Angular Js
Introduction to Angular JsIntroduction to Angular Js
Introduction to Angular Js
 
Angular 6 Training with project in hyderabad india
Angular 6 Training with project in hyderabad indiaAngular 6 Training with project in hyderabad india
Angular 6 Training with project in hyderabad india
 
introduction to Angularjs basics
introduction to Angularjs basicsintroduction to Angularjs basics
introduction to Angularjs basics
 
Angularjs
AngularjsAngularjs
Angularjs
 
AngularJs (1.x) Presentation
AngularJs (1.x) PresentationAngularJs (1.x) Presentation
AngularJs (1.x) Presentation
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular application
 
AngularJS in practice
AngularJS in practiceAngularJS in practice
AngularJS in practice
 
Learning AngularJS - Complete coverage of AngularJS features and concepts
Learning AngularJS  - Complete coverage of AngularJS features and conceptsLearning AngularJS  - Complete coverage of AngularJS features and concepts
Learning AngularJS - Complete coverage of AngularJS features and concepts
 
AngularJS
AngularJSAngularJS
AngularJS
 
Angularjs basic part01
Angularjs basic part01Angularjs basic part01
Angularjs basic part01
 
Angular js
Angular jsAngular js
Angular js
 
Valentine with Angular js - Introduction
Valentine with Angular js - IntroductionValentine with Angular js - Introduction
Valentine with Angular js - Introduction
 
Angular Project Report
 Angular Project Report Angular Project Report
Angular Project Report
 
Feature Development with jQuery
Feature Development with jQueryFeature Development with jQuery
Feature Development with jQuery
 
Single Page Applications in SharePoint with Angular
Single Page Applications in SharePoint with AngularSingle Page Applications in SharePoint with Angular
Single Page Applications in SharePoint with Angular
 
AngularJS
AngularJSAngularJS
AngularJS
 

More from Yakov Fain

Type script for_java_dev_jul_2020
Type script for_java_dev_jul_2020Type script for_java_dev_jul_2020
Type script for_java_dev_jul_2020Yakov Fain
 
Using JHipster for generating Angular/Spring Boot apps
Using JHipster for generating Angular/Spring Boot appsUsing JHipster for generating Angular/Spring Boot apps
Using JHipster for generating Angular/Spring Boot appsYakov Fain
 
Using JHipster for generating Angular/Spring Boot apps
Using JHipster for generating Angular/Spring Boot appsUsing JHipster for generating Angular/Spring Boot apps
Using JHipster for generating Angular/Spring Boot appsYakov Fain
 
TypeScript for Java Developers
TypeScript for Java DevelopersTypeScript for Java Developers
TypeScript for Java DevelopersYakov Fain
 
Reactive Streams and RxJava2
Reactive Streams and RxJava2Reactive Streams and RxJava2
Reactive Streams and RxJava2Yakov Fain
 
Using JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot appsUsing JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot appsYakov Fain
 
Angular 4 for Java Developers
Angular 4 for Java DevelopersAngular 4 for Java Developers
Angular 4 for Java DevelopersYakov Fain
 
Reactive programming in Angular 2
Reactive programming in Angular 2Reactive programming in Angular 2
Reactive programming in Angular 2Yakov Fain
 
Reactive Thinking in Java
Reactive Thinking in JavaReactive Thinking in Java
Reactive Thinking in JavaYakov Fain
 
RESTful services and OAUTH protocol in IoT
RESTful services and OAUTH protocol in IoTRESTful services and OAUTH protocol in IoT
RESTful services and OAUTH protocol in IoTYakov Fain
 
Java Intro: Unit1. Hello World
Java Intro: Unit1. Hello WorldJava Intro: Unit1. Hello World
Java Intro: Unit1. Hello WorldYakov Fain
 
Running a Virtual Company
Running a Virtual CompanyRunning a Virtual Company
Running a Virtual CompanyYakov Fain
 
Princeton jug git_github
Princeton jug git_githubPrinceton jug git_github
Princeton jug git_githubYakov Fain
 
Speed up your Web applications with HTML5 WebSockets
Speed up your Web applications with HTML5 WebSocketsSpeed up your Web applications with HTML5 WebSockets
Speed up your Web applications with HTML5 WebSocketsYakov Fain
 
Surviving as a Professional Software Developer
Surviving as a Professional Software DeveloperSurviving as a Professional Software Developer
Surviving as a Professional Software DeveloperYakov Fain
 
Becoming a professional software developer
Becoming a professional software developerBecoming a professional software developer
Becoming a professional software developerYakov Fain
 

More from Yakov Fain (16)

Type script for_java_dev_jul_2020
Type script for_java_dev_jul_2020Type script for_java_dev_jul_2020
Type script for_java_dev_jul_2020
 
Using JHipster for generating Angular/Spring Boot apps
Using JHipster for generating Angular/Spring Boot appsUsing JHipster for generating Angular/Spring Boot apps
Using JHipster for generating Angular/Spring Boot apps
 
Using JHipster for generating Angular/Spring Boot apps
Using JHipster for generating Angular/Spring Boot appsUsing JHipster for generating Angular/Spring Boot apps
Using JHipster for generating Angular/Spring Boot apps
 
TypeScript for Java Developers
TypeScript for Java DevelopersTypeScript for Java Developers
TypeScript for Java Developers
 
Reactive Streams and RxJava2
Reactive Streams and RxJava2Reactive Streams and RxJava2
Reactive Streams and RxJava2
 
Using JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot appsUsing JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot apps
 
Angular 4 for Java Developers
Angular 4 for Java DevelopersAngular 4 for Java Developers
Angular 4 for Java Developers
 
Reactive programming in Angular 2
Reactive programming in Angular 2Reactive programming in Angular 2
Reactive programming in Angular 2
 
Reactive Thinking in Java
Reactive Thinking in JavaReactive Thinking in Java
Reactive Thinking in Java
 
RESTful services and OAUTH protocol in IoT
RESTful services and OAUTH protocol in IoTRESTful services and OAUTH protocol in IoT
RESTful services and OAUTH protocol in IoT
 
Java Intro: Unit1. Hello World
Java Intro: Unit1. Hello WorldJava Intro: Unit1. Hello World
Java Intro: Unit1. Hello World
 
Running a Virtual Company
Running a Virtual CompanyRunning a Virtual Company
Running a Virtual Company
 
Princeton jug git_github
Princeton jug git_githubPrinceton jug git_github
Princeton jug git_github
 
Speed up your Web applications with HTML5 WebSockets
Speed up your Web applications with HTML5 WebSocketsSpeed up your Web applications with HTML5 WebSockets
Speed up your Web applications with HTML5 WebSockets
 
Surviving as a Professional Software Developer
Surviving as a Professional Software DeveloperSurviving as a Professional Software Developer
Surviving as a Professional Software Developer
 
Becoming a professional software developer
Becoming a professional software developerBecoming a professional software developer
Becoming a professional software developer
 

Recently uploaded

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
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
 

Recently uploaded (20)

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
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...
 

Overview of the AngularJS framework

  • 1. © 2015 Farata Systems Modern Web Development for Java Programmers Unit 2. AngularJS Basics. Becoming Productive with JavaScript. Video recording of this session: http://bit.ly/1NHV3Wd 

  • 2. © 2015 Farata Systems Overview of JavaScript Frameworks
  • 3. © 2015 Farata Systems Why use HTML5 frameworks • They deal with cross-browser compatibility • Make your application more structured • May include reusable components • Make programmers more productive • Lower the amount of manually written code
  • 4. © 2015 Farata Systems Frameworks vs Libraries Frameworks expect you to programs using well defined rules. 
 
 Libraries just offer reusable components. There are two major types of frameworks: • Feature complete • Lightweight (MVC + Binding + Routing)
 

  • 5. © 2015 Farata Systems Feature Complete Frameworks • Suitable for back-office applications • Include a library of UI components • Have good tooling • Steeper learning curve • May be difficult to customize • Typicallt the size of the app is more than 1MB
  • 6. © 2015 Farata Systems Lightweight Frameworks • Mainly deal with application structure, navigation, AJAX • Work best for consumer-oriented websites • Can be combined with 3-party libraries • Easier to learn
  • 7. © 2015 Farata Systems Single-Page Applications (SPA) • No full Web page reloads • Only certain portions of the page get refreshed • The state of a Web page doesn’t get reset • The user gets a feel of a desktop app • Search Engine Optimization (SEO) may suffer
  • 8. © 2015 Farata Systems Gmail: a Single Page Application
  • 9. © 2015 Farata Systems Professional SPA features • Modularization • Controllers handles DOM manipulations and AJAX • HTML templating • Routing with deep linking • Real time communication via Web sockets • Use of HTML5 Local storage Read more about SPA at
 https://en.wikipedia.org/wiki/Single-page_application
  • 10. © 2015 Farata Systems AngularJS https://angularjs.org
  • 11. © 2015 Farata Systems Why AngularJS? • Pros: • Good choice for single-page applications • MVC with minimal coding • Easy routing • Lightweight, yet pluggable with well-defined modular architecture • Develped by Google • Cons: developed by Google
  • 12. © 2015 Farata Systems Hello World <!DOCTYPE html>
 
 <html>
 <head >
 <title>Hello World</title>
 </head>
 <body ng-app>
 <h1> This is just a Hello World HTML</ h1>
 
 <div>
 
 <h2> Hello from div</h2>
 </div>
 
 <script src="angular.js" />
 </body>
 </html> An AngularJS directive
  • 13. © 2015 Farata Systems MVC in Angular App Controller View Model User sees initiates
 actions modifies html ng-controller ng-model updates
 via
 binding ng-app productName description bid price
 … productName description bid price $scope informs
 controller
  • 14. © 2015 Farata Systems MVCS Controller View Model User 1. Sees 4. Modifies html ng-controller ng-model 6. Updates
 via
 binding ng-app productName description bid price
 … Services
 
 The 
 server-side
 tier
 productName description bid price $scope 2. Initiates
 actions 3. Informs
 controller 5. HTTP
 or
 WebSocket
 communications
 7. Sees
  • 15. © 2015 Farata Systems Two-way Binding HTML
 template View Change in View
 updates Model <p>{{ productName }}</p> Compiles Model Change in Model
 updates View
  • 16. © 2015 Farata Systems A Simple AngularJS App • Single HTML file: <!DOCTYPE html>
 
 <!-- STEP 2: Bootstrap AngularJS -->
 <html ng-app>
 <head lang="en">
 <meta charset="UTF-8">
 <title>Unit 2. Walkthrough 2.</title>
 </head>
 <body>
 <!-- STEP 3: Define a new variable in the root scope. -->
 <p>Type here: <input type="text" ng-model="message"/></p>
 
 <!-- STEP 4: Add data binding to the "message" variable. -->
 <p>Should appear: <strong>{{ message }}</strong></p>
 
 <!-- STEP 1: Add AngularJS dependency. -->
 <script src="angular.js"></script>
 </body>
 </html> Defines the scope of controlled by AngularJS Creates a variable message in the model Binds a view to a variable from the model
  • 17. © 2015 Farata Systems Walkthrough 1Install AngularJS plugin according to the instructions from the file prerequisites.txt. Unzip the file with handouts and create an empty IDEA project in the same directory. Import the module unit2.iml according to instructions from import_code_manual. Ignore the excluded folders warnings. 
 
 Use directory walkthroughs/w1 from the handouts as the starting point. Open w1.html file in the IDEA’s editor: 1. Include AngularJS library using <script> tag:
 <script src="angular.js"></script> 2. Bootstrap AngularJS app by adding ng-app directive to <html> tag:
 <html ng-app>. 3. Define a new variable in the root scope and enable two-way data-binding for the input element as using ng-model directive: <input type="text" ng-model="message"/> 4. Inside the <strong> element add data-binding to the message variable:
 <strong>{{ message }}</strong> 5. Open w1.html file in Chrome browser and see if the binding works. 6. Compare Angular and pure JavaScript versions in the solutions directory. Select w1.html and w1_pureJS.html, right- click, and select Compare Two files. You should see the output shown on next slide. 7.Review all code samples from the folder walkthroghs/w1-solutions.
  • 18. © 2015 Farata Systems Walkthrough 1: Comparing Angular and JavaScript versions w1-solution/w1.html w1-solution/w1_JS.html
  • 19. © 2015 Farata Systems Angular Players • Modules - each app consists of one or more modules • Controllers - handle user interactions, orchestrate models and services • Directives - assign custom behavior to HTML elements • Filters - format the expression’s value • Binding Expressions - code snippets placed in curly braces within HTML template
  • 20. © 2015 Farata Systems Modules • Help avoiding monolithic applications • Angular istelf is split into modules (see http://ngmodules.org). The file angular.js is a module with core functionality. • Split one JS file into several files • Allow to specify dependencies • Can be loaded in any order or in parallel 20
  • 21. © 2015 Farata Systems Module Usages // Create a new module
 var auction = angular.module('auction', []);
 
 // Get an existing module
 var auction = angular.module('auction');
 
 // Create a module that dependents on ngRoute
 var auction = angular.module('auction', ['ngRoute']);
 // Adding routing support <script src="angular-route.js"></script> 21 When Angular loads it creates one variable angular on the global scope.
  • 22. © 2015 Farata Systems Module, Controller, Model, and Filter <!DOCTYPE html>
 <html ng-app="auction">
 <head lang="en">
 <meta charset="UTF-8">
 <title>Unit 2. Walkthrough 3.</title>
 </head>
 <body ng-controller="IndexController">
 <p>Type here: <input type="text" ng-model="model.message"/></p>
 <p>Should appear: <strong>{{ model.message | uppercase }}</strong></p>
 
 <script src="angular.js"></script>
 <script src="w3.js"></script>
 </body>
 </html> var auction = angular.module('auction', []);
 
 auction.controller('IndexController', function ($scope) {
 $scope.model = {
 message: 'Initial message'
 };
 }); Module name Binding Expression Inject scope into controller Create module w3.js Filter index.html Controller name Create controller
  • 23. © 2015 Farata Systems Controller • Handles user interactions • Creates the model on the $scope object • Receives control during routing • Never manipulates the view directly • A view can have multiple controllers
  • 24. © 2015 Farata Systems How to use a controller 'use strict';
 
 (function () {
 var MainController = function ($scope) {
 $scope.awesomeThings = [
 'HTML5 Boilerplate',
 'AngularJS',
 'Karma'];
 };
 
 angular.module('store').controller('MainController', MainController);
 })();
 <div ng-controller=“MainController”> <ul>
 <li ng-repeat="aThing in awesomeThings">{{ aThing }}</li>
 </ul> </div> A scope shares variables between view and controller A new variable aThing is created for each ng-repeat iteration
  • 25. © 2015 Farata Systems Scope • Shares variables between view and controller • A place where the model data are visible • One $rootScope is implicitly created for the entire app • Child $scope objects are created for controllers and directives (e.g. ng-controller, ng-repeat) • If a variable isn’t found in the child scope, AngularJS looks in the prototypal chain of scopes.
  • 26. © 2015 Farata Systems Directives • Attach behaviour to the DOM elements • Can have visual and non-visual effects (ng-controller vs ng-repeat) • Directives offer: ‣ UI decomposition ‣ Reusable components 26
  • 27. © 2015 Farata Systems Directive Usages • Directives can be represented in several forms: ‣ HTML element’s attribute: ng-app, data-ng-app ‣ HTML element’s: <auction-navbar> ‣ CSS classes <div class=“auction-navbar”> 27
  • 28. © 2015 Farata Systems Walkthrough 2 Developing Online Auction in Angular
  • 29. © 2015 Farata Systems Walkthrough 2 • In this walkthrough we will use AngularJS to develop the Auction Home and Search pages. We’ll use the $http object to read the data from the json files. • Here we’ll implement navigation between Auction Home and Search pages without using routing. We’ll get the same functionality as in the Homework but using AngularJS directives: • ng-init - to declare and initialize a variable on the current scope • ng-include - to download HTML template, apply the data to the template and insert generated markup inside the HTML element it’s attached to • Use the directory walkthroughs/w2 as the starting point. • Open walkthrough_2_guide.html file from the handouts and follow the instructions.
  • 30. © 2015 Farata Systems Routing • Enables deep-linking for single-page applications • Uses the fragment identifier #, doesn’t reload the page • Supports HTML5 History API as well as “hashbang” (/#!) • Is represented as $route service: • Maps URLs to views (HTML templates) and controllers
 
 
 angular.module(‘ngRoute', ['ng']).provider('$route', $RouteProvider); Lives in a separate module Registered with provider(), hence $routeProvider is available at configuration phase
  • 31. © 2015 Farata Systems $routeProvider • Allows configuring mapping at configuration phase angular.module('auction', ['ngRoute'])
 .config(['$routeProvider', function ($routeProvider) {
 $routeProvider
 .when('/', {
 templateUrl: 'views/home.html',
 controller: 'HomeController'
 })
 .when('/search', {
 templateUrl: 'views/search.html',
 controller: 'SearchController'
 })
 .otherwise({
 redirectTo: '/'
 });
 }]); Added as dependency to the app Config phase One-to-one mapping Path to a partial view (HTML template) Controller’s name as it’s registered in the DI container Default route Never contains “hashbang"
  • 32. © 2015 Farata Systems Filters • Transform an expression value • Can be used in HTML and directly invoked from code • Take at least one parameter - the value to transform • Can take arbitrary number of parameters 32
  • 33. © 2015 Farata Systems Filter Example <span>{{ names | joinData : ', ' }}</span> angular.module(‘auction').filter('joinData', (array, separator) => array.join(separator)); var names = ['John', 'Mike', 'Kate']; ‘John, Mike, Kate’ 33 Filter name Filter implementation
  • 34. © 2015 Farata Systems Identifying the View • The routing module needs to know where to display the HTML fragment • Add attribute marked with ng-view inside the HTML element • Declare a single ng-view for the entire app • ng-view is always in sync with the URL according to $routeProvider’s mapping <div class="container" ng-view></div>
  • 35. © 2015 Farata Systems How Navigate to a Route? • Clicking on a link (# used to prevent page reloading): <a href="#/search">Submit</a> • Using $location service: $location.url('/search'); • Changing a path fragment may require modifications in multiple places. AngularUI has more flexible ui-router component.
  • 36. © 2014 Farata Systems Tools
  • 37. © 2015 Farata Systems The Tools We Use • node.js - JS framework plus a runtime for all development tools listed below. • npm - node package manager used for installing and managing development tools • yeoman - a scaffolding tool used to generate the initial structure of an application • bower - package manager for your application dependencies (front-end) • grunt - a build automation tool
  • 38. © 2015 Farata Systems
  • 39. © 2015 Farata Systems Node.js • A frameworks and a platform for executing JavaScript code outside the web browser • Built on top of Chrome’s JavaScript engine - V8 • Uses event-driven non-blocking I/O model • Allows writing server-side JavaScript applications that access files, support TCP, UDP, HTTP, SSL, and compression. • We will use Node.js as a runtime for JavaScript development tools • Has pre-built installers for all popular platforms at nodejs.org/download/
  • 40. © 2015 Farata Systems npm • npm is a Node.js package manager for development- tools and their dependencies • Has a repository of 50K+ packages at 
 https://www.npmjs.org • To run, type npm in the command window
  • 41. © 2015 Farata Systems package.json • package.json is a json-formatted file where we configure npm dependencies. • You can configure two types of dependencies in package.json: ‣ dependencies - packages needed for publishing your app in the npm registry ‣ devDependencies - packages that are used only during development only (e.g. grunt, development web server, etc.) • To install all dependencies listed in package.json: npm install • To install a new dependency (e.g. grunt-ts) locally: npm install grunt-ts • To install a new dependency globally: npm install -g grunt-ts • Use --save and --save-dev to automatically update package.json along with installing a new package.
  • 42. © 2015 Farata Systems A package.json Example List all development dependencies for the auction app: {
 "name": "auction",
 "version": "0.1.0",
 "dependencies": {},
 "devDependencies": {
 "grunt": "^0.4.2", "grunt-concurrent": "~0.4.1", "load-grunt-tasks": "0.2.1"
 }
 } Specific version: 0.2.1 “Reasonably close”: >=0.4.1-0 <0.5.0-0 >=0.4.2-0 <1.0.0-0
  • 43. © 2014 Farata Systems 43
  • 44. © 2015 Farata Systems Yeoman • A scaffolding tool for generating the initial project structure. • It’s an npm package and is installed with npm install -g yo • Has a rich collection of generators at http://yeoman.io/generators • To install the angular generator: 
 npm install -g generator-angular • To run, type yo with parameter in the command window without the generator- prefix, e.g.:
 
 yo angular 44
  • 45. © 2015 Farata Systems Bower • Bower is a package manager for the application dependencies • Package can have any layout and any type of assets. • Configuration is specified in the file bower.json. • There is a huge collection of packages controlled by Bower at http:// bower.io/search • To install bower globally: npm install -g bower • To run, type bower in the command window, and it’ll use configurations specified in the file bower.json. 45
  • 46. © 2015 Farata Systems Bower Configuration: bower.json • bower.json describes the application’s package. We’ll use json propertied to configure application dependencies. • Two types of dependencies: ‣ dependencies - packages needed for production version of the app ‣ devDependencies - packages needed only during development (e.g. unit testing libraries) • To install all dependencies listed in bower.json: bower install • To install a new dependency: bower install angular-resource • Use --save and --save-dev to automatically update bower.json along with installing a new package. 46
  • 47. © 2015 Farata Systems Bower: version ranges The complete list of versions is at: https://docs.npmjs.com/misc/semver#Ranges {
 "name": "auction",
 "version": "0.1.0",
 "dependencies": {
 "angular": "1.2.14",
 "angular-route": "~1.2.14",
 "bootstrap": "^3.1.1"
 },
 "devDependencies": {
 "DefinitelyTyped": "*"
 }
 } The exact version 1.2.14 >=1.2.14-0 <1.3.0-0 >=3.1.1-0 <4.0.0-0 any version 47
  • 48. © 2014 Farata Systems 48
  • 49. © 2015 Farata Systems Grunt • Grunt is a build automation tool for web apps • Grunt is configured as a dependency in npm’s package.json • We need to install command-line interface to grunt: npm install -g grunt-cli • To run, type grunt in the command window • Grunt plugins are installed with npm: npm install grunt-ts —-save-dev 49
  • 50. © 2015 Farata Systems Grunt Configuration: Gruntfile.js • A JavaScript that loads Grunt plugins containing tasks • Defines all configurations for tasks that Grunt can execute • Each task can be invoked separately with grunt task • A task consists of targets, and you can optionally run just a target: 
 grunt task:target 50
  • 51. © 2014 Farata Systems A sample Gruntfile.js module.exports = function(grunt) {
 
 grunt.initConfig({
 pkg: grunt.file.readJSON('package.json'),
 concat: {
 options: {
 separator: ';'
 },
 dist: {
 src: ['src/**/*.js'],
 dest: 'dist/<%= pkg.name %>.js'
 }
 },
 qunit: {
 files: ['test/**/*.html']
 },
 watch: {
 files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'],
 tasks: ['qunit']
 }
 });
 
 grunt.loadNpmTasks('grunt-contrib-concat');
 grunt.loadNpmTasks('grunt-contrib-qunit');
 grunt.loadNpmTasks('grunt-contrib-watch');
 
 grunt.registerTask('test', ['qunit']);
 
 grunt.registerTask('default', ['qunit', 'concat']);
 
 }; Node.js way to encapsulate modules Initializes grunt configuration Read configs from package.json Task’s configuration. Has the same name as task. Common name for all tasks A unique set of available options for each taskTarget can have an arbitrary name <%= %> - refers to a property in the config <% %> - executes arbitrary JavaScript code Loads the plugin installed with npm Creates a custom task available in the command-line A default grunt task(s) 51 will be reviewed during the walkthrough 3
  • 52. © 2015 Farata Systems Files • Most Grunt tasks operate on files • Grunt supports several source/destination formats: dist: {
 src: ['src/bb.js', 'src/bbb.js'],
 dest: 'dest/b.js'
 } dist: {
 src: ['src/bb.js', 'src/bbb.js'],
 dest: 'dest/b.js'
 } Compact format Files Object Format dist: {
 files: {
 'dest/a.js': ['src/aa.js', 'src/aaa.js'],
 'dest/a1.js': ['src/aa1.js', 'src/aaa1.js']
 }
 } Compact format less: {
 dist: {
 files: [{
 expand: true,
 cwd: '<%= yeoman.app %>/styles',
 src: '{,*/}*.less',
 dest: '.tmp/styles',
 ext: '.css'
 }]
 }
 } Example from auction app 52 will be reviewed during the walkthrough 3
  • 53. © 2015 Farata Systems Typical Workflow • npm install • bower install • grunt build 53
  • 54. © 2014 Farata Systems Walkthrough 3 Reimplementing the Home Page using tools 54 Open walkthrough_3_guide.html and follow instructions.
  • 55. © 2015 Farata Systems Frequently used AngularJS services • $scope - access to the current scope • $rootScope - access to the root scope • $http - HTTP requests • $location - to work with window.location • $window - to access window object
  • 56. © 2015 Farata Systems AngularJS directives you’ll need for the homework • ng-app - determines the scope of AngularJS app and automatically bootstraps the app • ng-view - tells AngularJS which HTML element should be used to include the rendered view while navigating using routing service • ng-repeat - iterates through a collection of objects, instantiates a template it’s attached to once per item
  • 57. © 2015 Farata Systems Homework 2 Refactor the auction app to use routing instead of ngInit and ngInclude directives to navigate among the pages. Use directory homework2 from the handouts as the starting point. 1. Add the angular-route library as a dependency to bower.json. Run bower install to download the library locally. Run grunt wiredep to add the reference to the library angular-route into index.html. 2. Open app/scripts/app.js and add ngRoute module as a dependency for the main application module auction. Configure $routeProvider as shown in the slide $routeProvider but use your own templateUrl and controller values. Use controllerAs option to automatically expose controller’s fields and methods on the scope. 3. Open app/views/index.html file and replace ngInit and ngInclude directives with ngView directive. Replace ngClick with ngHref directives for Search button and brand name link that we use for navigation. ngHref should have correct value as we discussed in How Navigate to a Route section. 4. Run grunt build command. It’ll generate the dist directory in the root directory of your app. Deploy the content of dist at GitHub Pages. 5. Send your homework (2 URLs: link to GitHub repository with the source code and a link to the app deployed to GitHub Pages) to training@faratasystems.com. Read the documentation about all the AngularJS directives used during the class and in the homework. Read about grunt plugins we used to configure our app. You can find each plugin by its name in npmjs.org registry.
  • 58. © 2015 Farata Systems Additional Resources • AngularJS Developer Guide - http://docs.angularjs.org/guide • A collection of articles - http://www.ng-newsletter.com/posts/ • A collection of AngularJS learning resources - https://github.com/ jmcunningham/AngularJS-Learning • AngularJS Google style guide (disregard the Google Closure part) • AngularJS community style guide • Our upcoming trainings: http://faratasystems.com