SlideShare a Scribd company logo
www.luxoft.co
m
Angular 2
+ new JavaScript technologies
Dmitriy Kochergin
21 November 2017
partially used slides from Luxoft Training Center training Angular2
www.luxoft.co
m
Horizon
www.luxoft.co
m
Contents
• Angular 2
• MEAN stack
• Node.js
• NPM
• Express
• JavaScript, EcmaScript, TypeScript
• RXJS
www.luxoft.co
m
www.luxoft.co
m
www.luxoft.co
m
www.luxoft.co
m
www.luxoft.co
m
www.luxoft.co
m
Thinking in components
www.luxoft.co
m
Thinking in components
www.luxoft.co
m
MVC
www.luxoft.co
m
Angular 2 features: Two-way data binding
www.luxoft.co
m
Angular 2 features: Dependency injection
www.luxoft.co
m
Angular 2 features: Directives
www.luxoft.co
m
Angular 2 features: Modules
www.luxoft.co
m
Angular 2 features: AOT
www.luxoft.co
m
www.luxoft.co
m
Angular 2 development environment
www.luxoft.co
m
MEAN stack
www.luxoft.co
m
What is Node.JS
• v8 JavaScript engine
• More performant than Java Rhino and Nashorn
• Event driven
• Non-blocking standard libraries
• Most APIs speak streams
• Provides a package manager and module
system
• JavaScript on client and server
• Code reuse
www.luxoft.co
m
Old school JS programming
• For example we need jquery in frontend
• Go to jquery site
• Download *.js or *.min.js
• Put it to js folder
• Add it to index.html head section
• Repeat steps for upgrade
www.luxoft.co
m
NPM – Node Package Manager
• Handles and resolves dependencies
• More than 475,000 modules available
• package.json – dependencies definition
• npm install
• node_modules
www.luxoft.co
m
Angular CLI
• ng create (component, html, scss)
• ng serve
- localhost:4200
www.luxoft.co
m
Routes with Express
• Respond to HTTP requests with a callback
• Supports variable placement in routes
• Easy to serve JSON
• Example
app.get("/greeting", function(req,res) {
res.send("Hello, "+req.query.name+"!");
});
www.luxoft.co
m
Express routing examples
app.get(’/users/:id?’, function(req,res) {
var id = req.params.id;
res.send( id ? 'user'+id : 'users’);
});
app.post(’/users/:id.:format’, function(req,res) {
var id = req.params.id;
var format = req.params.format;
res.send( 'user '+id+ ’ format : ’+format);
});
www.luxoft.co
m
risingstars2016.js.org/
www.luxoft.co
m
risingstars2016.js.org/
www.luxoft.co
m
JavaScript
EcmaScript
Typescript
www.luxoft.co
m
EcmaScript
• ECMAScript: A language standardized by ECMA International and overseen by the TC39
committee
• JavaScript: The commonly used name for implementations of the ECMAScript standard.
• ECMAScript 5 (ES5): The 5th edition of ECMAScript (2009). Current standard in modern browsers.
• ECMAScript 2015 (ES6): Partially implemented in most modern browsers.
See compatibility at kangax.github.io/compat-table/es6/
• ECMAScript 2016 (ES7): Very small release.
• ECMAScript 2017 (ES8): On the edge.
• ECMAScript 2018 (ES9): Future is near.
• Babel can transpile ES2015+ scripts to older versions of JS.
www.luxoft.co
m
ES 2015 new features
• let
• const
• Arrow function
• Computed Property Names
• Array matching, Object matching
• Array: new functions
• Object.assign
• String searching
• Set, Map, WeakSet/WeakMap
• String Interpolation
• New number functions
• Default Parameter Values
• Rest Parameters
• Spread Operator
• Classes
• Inheritance
• Static members
• Getters/setters
• Modules import/export
• Promises (built in), Generators
www.luxoft.co
m
TypeScript
• TypeScript is a free and open-source programming language
developed and maintained by Microsoft.
Anders Hejlsberg, lead architect of C# creator of
Delphi and Turbo Pascal,
author of TypeScript
www.luxoft.co
m
TypeScript
• TypeScript is a strict superset of JavaScript,
and adds optional static typing, any
existing JavaScript programs are also valid
TypeScript programs.
www.luxoft.co
m
www.luxoft.co
m
www.luxoft.co
m
Typescript features
• Data types: Boolean, Number, String, Array, Enum, Any, Void
• Interfaces (optional properties, function types, array types, class types, extending)
• Annotations
• Classes, Abstract classes
• Private/Public/Protected: Public by default
• Accessors
• Static properties
• Functions (Optional parameters, Default parameters, Rest parameters)
• Overloading
• Generics
• Decorators, Tuples, Type assertions, Async/await
www.luxoft.co
m
Interfaces
interface LabelledValue {
label: string;
}
function printLabel(labelledObj: LabelledValue) {
console.log(labelledObj.label);
}
var myObj = {size: 10, label: "Size 10 Object"};
printLabel(myObj);
www.luxoft.co
m
Classes
class Animal {
private name: string;
constructor(theName: string) {
this.name = theName;
}
move(meters: number) {
alert(this.name + " moved " + meters + "m.");
}
}
www.luxoft.co
m
Reactive programming with
RXJS
www.luxoft.co
m
RXJS
www.luxoft.co
m
Angular 2 HTTP call
private http: Http;
…
this.http.get('http://swapi.co/api/films')
.map((response: Response) => response.json() as FilmModel[])
.do(data => console.log(JSON.stringify(data)))
.catch(this.handleError);
www.luxoft.co
m
Observable
Register/Unregister
(wants to watch TV or not)
can cause backpressure
1
2 Push events
(stream of pictures)
Observable
Observable
Observer
Observer
www.luxoft.co
m
RXJS
• Think how data should flow instead
of what you do to make it flow
www.luxoft.co
m
RXJS Example
productsStream
.filter(product => product.price > 30)
.map(product => product.price)
.forEach(price => console.log(`Prices higher than $30: ${price}`);
for (Product product: productsList) {
if (product.price > 30) {
console.log(`Prices higher than $30: ` + product.price;
}
}
www.luxoft.co
m
Reactive approach
• Clean and understandable
• Focusing on result, not on algorithm
• Complex operations natively from the box (debounce and throttle)
• Backpressure handling
• Skip or get every “n” element (e.g. trading data)
• Abort processing of not needed data (user disconnected)
• Complex debug
• Learning curve
www.luxoft.co
m
Reactive approach
www.luxoft.co
m
www.luxoft.co
m
THANK YOU

More Related Content

PDF
Scala Macros
PDF
ElasticMQ: a fully asynchronous, Akka-based SQS server
PPTX
Typescript 101 introduction
PPTX
TypeScript
PDF
Jslab rssh: JS as language platform
KEY
MacRuby: What is it? and why should you care?
PPTX
TypeScript 101
PPTX
TypeScript Modules
Scala Macros
ElasticMQ: a fully asynchronous, Akka-based SQS server
Typescript 101 introduction
TypeScript
Jslab rssh: JS as language platform
MacRuby: What is it? and why should you care?
TypeScript 101
TypeScript Modules

What's hot (19)

PPTX
Type script - advanced usage and practices
PPTX
Introducing type script
PPTX
JavaScript: Creative Coding for Browsers
PPTX
Getting started with typescript
PDF
Lint, coverage, doc, autocompletion, transpilation, minification... powered b...
PPT
Web development basics (Part-7)
PDF
TypeScript: coding JavaScript without the pain
PPTX
AngularConf2015
PPTX
Javascript now and in the future
PPTX
Children of Ruby
PDF
How to-node-core
PPTX
Introduction about type script
ODP
Javascript Update May 2013
PDF
Typescript - MentorMate Academy
PPTX
OOP in Scala
PDF
Node.js Course 1 of 2 - Introduction and first steps
PDF
rubyonrails
PDF
What's a macro?: Learning by Examples
PDF
Single Sign On in Ruby - Enterprise Ready!
Type script - advanced usage and practices
Introducing type script
JavaScript: Creative Coding for Browsers
Getting started with typescript
Lint, coverage, doc, autocompletion, transpilation, minification... powered b...
Web development basics (Part-7)
TypeScript: coding JavaScript without the pain
AngularConf2015
Javascript now and in the future
Children of Ruby
How to-node-core
Introduction about type script
Javascript Update May 2013
Typescript - MentorMate Academy
OOP in Scala
Node.js Course 1 of 2 - Introduction and first steps
rubyonrails
What's a macro?: Learning by Examples
Single Sign On in Ruby - Enterprise Ready!
Ad

Similar to Dmytro Kochergin Angular 2 and New Java Script Technologies (20)

PPT
Introduction to mean and mern || Event by DSC UNIDEB
PPT
Top java script frameworks ppt
PDF
Angular JS2 Training Session #1
PDF
MEAN Stack Warm-up
PDF
[PDF]_Learning_ECMAScript_6.pdf
PDF
WebNet Conference 2012 - Designing complex applications using html5 and knock...
PPT
Introduction to Javascript
PPTX
NodeJs
PDF
What is mean stack?
PDF
MEAN Web Development 2nd Edition Amos Q. Haviv All Chapters Instant Download
PDF
MEAN Web Development 2nd Edition Amos Q. Haviv All Chapters Instant Download
PDF
AngularJS - A Powerful Framework For Web Applications
PDF
Angular 2 overview
PDF
JavaScript in 2015
PDF
Full Stack Developer Course | Infinite Graphix Technologies
PPTX
ECMA5 approach to building JavaScript frameworks with Anzor Bashkhaz
PDF
Download Complete JavaScript for NET Developers 1st Edition Ovais Mehboob Ahm...
PPTX
PDF
MEAN Web Development 2nd Edition Amos Q. Haviv
PPTX
Java script
Introduction to mean and mern || Event by DSC UNIDEB
Top java script frameworks ppt
Angular JS2 Training Session #1
MEAN Stack Warm-up
[PDF]_Learning_ECMAScript_6.pdf
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Introduction to Javascript
NodeJs
What is mean stack?
MEAN Web Development 2nd Edition Amos Q. Haviv All Chapters Instant Download
MEAN Web Development 2nd Edition Amos Q. Haviv All Chapters Instant Download
AngularJS - A Powerful Framework For Web Applications
Angular 2 overview
JavaScript in 2015
Full Stack Developer Course | Infinite Graphix Technologies
ECMA5 approach to building JavaScript frameworks with Anzor Bashkhaz
Download Complete JavaScript for NET Developers 1st Edition Ovais Mehboob Ahm...
MEAN Web Development 2nd Edition Amos Q. Haviv
Java script
Ad

More from LogeekNightUkraine (20)

PPTX
Face recognition with c++
PPTX
C++20 features
PPTX
Autonomous driving on your developer pc. technologies, approaches, future
PDF
Orkhan Gasimov "High Performance System Design"
PPTX
Vitalii Korzh "Managed Workflows or How to Master Data"
PDF
Yevhen Tatarynov "From POC to High-Performance .NET applications"
PDF
Oleksii Kuchuk "Reading gauge values with open cv imgproc"
PDF
Oleksandr Kutsan "Using katai struct to describe the process of working with ...
PDF
Pavlo Zhdanov "Mastering solid and base principles for software design"
PDF
Serhii Zemlianyi "Error Retries with Exponential Backoff Using RabbitMQ"
PDF
Iurii Antykhovych "Java and performance tools and toys"
PDF
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...
PPTX
Aleksandr Kutsan "Managing Dependencies in C++"
PDF
Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"
PDF
Alexandr Golyak, Nikolay Chertkov "Automotive Testing vs Test Automatio"
PPTX
Michal Kordas "Docker: Good, Bad or Both"
PPTX
Kolomiyets Dmytro "Dealing with Multiple Caches, When Developing Microservices"
PPTX
Shestakov Illia "The Sandbox Theory"
PPTX
Dmytro Kochergin “Autotest with CYPRESS”
PPTX
Ivan Dryzhyruk “Ducks Don’t Like Bugs”
Face recognition with c++
C++20 features
Autonomous driving on your developer pc. technologies, approaches, future
Orkhan Gasimov "High Performance System Design"
Vitalii Korzh "Managed Workflows or How to Master Data"
Yevhen Tatarynov "From POC to High-Performance .NET applications"
Oleksii Kuchuk "Reading gauge values with open cv imgproc"
Oleksandr Kutsan "Using katai struct to describe the process of working with ...
Pavlo Zhdanov "Mastering solid and base principles for software design"
Serhii Zemlianyi "Error Retries with Exponential Backoff Using RabbitMQ"
Iurii Antykhovych "Java and performance tools and toys"
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...
Aleksandr Kutsan "Managing Dependencies in C++"
Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"
Alexandr Golyak, Nikolay Chertkov "Automotive Testing vs Test Automatio"
Michal Kordas "Docker: Good, Bad or Both"
Kolomiyets Dmytro "Dealing with Multiple Caches, When Developing Microservices"
Shestakov Illia "The Sandbox Theory"
Dmytro Kochergin “Autotest with CYPRESS”
Ivan Dryzhyruk “Ducks Don’t Like Bugs”

Recently uploaded (20)

PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Transform Your Business with a Software ERP System
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPT
Introduction Database Management System for Course Database
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
history of c programming in notes for students .pptx
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Nekopoi APK 2025 free lastest update
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Understanding Forklifts - TECH EHS Solution
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Introduction to Artificial Intelligence
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
ai tools demonstartion for schools and inter college
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Softaken Excel to vCard Converter Software.pdf
Transform Your Business with a Software ERP System
Odoo Companies in India – Driving Business Transformation.pdf
Introduction Database Management System for Course Database
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
history of c programming in notes for students .pptx
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Nekopoi APK 2025 free lastest update
CHAPTER 2 - PM Management and IT Context
Adobe Illustrator 28.6 Crack My Vision of Vector Design
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Wondershare Filmora 15 Crack With Activation Key [2025
Understanding Forklifts - TECH EHS Solution
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Introduction to Artificial Intelligence
Design an Analysis of Algorithms I-SECS-1021-03
Computer Software and OS of computer science of grade 11.pptx
ai tools demonstartion for schools and inter college

Dmytro Kochergin Angular 2 and New Java Script Technologies