SlideShare a Scribd company logo
18th of December, 2014
Javascript and OOP
The power of simplicity
18th of December, 2014
Outline
● The Javascript object
● Adding behaviour
● Inheritance without classes
● OOP concepts in JS
18th of December, 2014
Outline
● The Javascript object
● Adding behaviour
● Inheritance without classes
● OOP concepts in JS
18th of December, 2014
What is an object ?
var label = {
x: 20,
y: 23,
width: 100,
height: 24,
text: "Click me!"
};
label["x"] === 20;
label.y === 23;
18th of December, 2014
What is an object ?
var label = {
x: 20,
y: 23,
width: 100,
height: 24,
text: "Click me!"
};
label["x"] === 20;
label.y === 23;
18th of December, 2014
What is an object ?
var label = {
x: 20,
y: 23,
width: 100,
height: 24,
text: "Click me!"
};
label["x"] === 20;
label.y === 23;
18th of December, 2014
Create it in a function
function createLabel(x, y, text) {
return {
x: x,
y: y,
width: computeWidth(text),
height: defaultHeight,
text: text
};
}
var errorLabel = createLabel(20, 23, "There was an error");
var successLabel = createLabel(56, 89, "Success");
18th of December, 2014
The constructor function
function Label(x, y, text) {
this.x = x;
this.y = y;
this.width = computeWidth(text);
this.height = defaultHeight;
this.text = text;
}
var errorLabel = new Label(20, 23, "There was an error");
errorLabel.x === 20;
18th of December, 2014
The constructor function
function Label(x, y, text) {
this.x = x;
this.y = y;
this.width = computeWidth(text);
this.height = defaultHeight;
this.text = text;
}
var errorLabel = new Label(20, 23, "There was an error");
errorLabel.x === 20;
18th of December, 2014
The constructor function
function Label(x, y, text) {
this.x = x;
this.y = y;
this.width = computeWidth(text);
this.height = defaultHeight;
this.text = text;
}
var errorLabel = new Label(20, 23, "There was an error");
errorLabel.x === 20;
18th of December, 2014
Outline
● The Javascript object
● Adding behaviour
● Inheritance without classes
● OOP concepts in JS
18th of December, 2014
Adding behaviour
var greeter = {
nameToGreet: "Roger",
};
greeter.greet(); // How to do it ?
18th of December, 2014
Adding behaviour
var greeter = {
nameToGreet: "Roger",
greet: function () {
console.log("Hello " + this.nameToGreet + "!");
}
};
greeter.greet(); // "Hello Roger!"
18th of December, 2014
Adding behaviour
var greeter = {
nameToGreet: "Roger",
greet: function () {
console.log("Hello " + this.nameToGreet + "!");
}
};
greeter.greet(); // "Hello Roger!"
18th of December, 2014
A word about this...
var greeter = {
nameToGreet: "Roger",
greet: function () {
console.log("Hello " + this.nameToGreet + "!");
}
};
var semiGreeter = { nameToGreet: "Bob" };
semiGreeter.greet = greeter.greet;
semiGreeter.greet(); // "Hello Bob!"
18th of December, 2014
A word about this...
var greeter = {
nameToGreet: "Roger",
greet: function () {
console.log("Hello " + this.nameToGreet + "!");
}
};
var semiGreeter = { nameToGreet: "Bob" };
semiGreeter.greet = greeter.greet;
semiGreeter.greet(); // "Hello Bob!"
18th of December, 2014
A word about this...
var greeter = {
nameToGreet: "Roger",
greet: function () {
console.log("Hello " + this.nameToGreet + "!");
}
};
var semiGreeter = { nameToGreet: "Bob" };
semiGreeter.greet = greeter.greet;
semiGreeter.greet(); // "Hello Bob!"
18th of December, 2014
A word about this...
var greeter = {
nameToGreet: "Roger",
greet: function () {
console.log("Hello " + this.nameToGreet + "!");
}
};
var semiGreeter = { nameToGreet: "Bob" };
semiGreeter.greet = greeter.greet;
semiGreeter.greet(); // "Hello Bob!"
18th of December, 2014
A word about this...
var greeter = {
nameToGreet: "Roger",
greet: function () {
console.log("Hello " + this.nameToGreet + "!");
}
};
var semiGreeter = { nameToGreet: "Bob" };
semiGreeter.greet = greeter.greet;
semiGreeter.greet(); // "Hello Bob!"
18th of December, 2014
Outline
● The Javascript object
● Adding behaviour
● Inheritance without classes
● OOP concepts in JS
18th of December, 2014
Prototypal inheritance
Do not have classes ?
Extend objects !
18th of December, 2014
Prototypal inheritance
var baseObject = {
name: "baseObject"
};
var childObject = {
__proto__: baseObject
};
childObject.name === "baseObject";
18th of December, 2014
Prototypal inheritance
var baseObject = {
name: "baseObject"
};
var childObject = {
__proto__: baseObject
};
childObject.name === "baseObject";
18th of December, 2014
Prototypal inheritance
var baseObject = {
name: "baseObject"
};
var childObject = {
__proto__: baseObject
};
childObject.name === "baseObject";
18th of December, 2014
Prototypal inheritance
var baseObject = {
name: "baseObject"
};
var childObject = {
__proto__: baseObject
};
childObject.name === "baseObject";
18th of December, 2014
Prototypal inheritance
var baseObject = {
name: "baseObject"
};
var childObject = {
__proto__: baseObject
};
childObject.name === "baseObject";
18th of December, 2014
Prototypal inheritance
var baseObject = {
name: "baseObject"
};
var childObject = {
__proto__: baseObject
};
childObject.name === "baseObject";
childObject.name = "childObject";
childObject.name === "childObject";
Overrides baseObject.
name
18th of December, 2014
Prototype with constructor
var baseObject = {
name: "baseObject"
};
var ChildObject = function () {};
ChildObject.prototype = baseObject;
var childObject = new ChildObject();
childObject.name === "baseObject";
18th of December, 2014
Prototype with constructor
var baseObject = {
name: "baseObject"
};
var ChildObject = function () {};
ChildObject.prototype = baseObject;
var childObject = new ChildObject();
childObject.name === "baseObject";
18th of December, 2014
Outline
● The Javascript object
● Adding behaviour
● Inheritance without classes
● OOP concepts in JS
18th of December, 2014
Classes
function Greeter(name) {
this.name = name;
}
Greeter.prototype = {
greet: function () {
console.log("Hello " + this.name + "!");
}
};
var greeter = new Greeter("Roger");
greeter.greet(); // "Hello Roger!"
18th of December, 2014
Classes
function Greeter(name) {
this.name = name;
}
Greeter.prototype = {
greet: function () {
console.log("Hello " + this.name + "!");
}
};
var greeter = new Greeter("Roger");
greeter.greet(); // "Hello Roger!"
Initialize instance
18th of December, 2014
Classes
function Greeter(name) {
this.name = name;
}
Greeter.prototype = {
greet: function () {
console.log("Hello " + this.name + "!");
}
};
var greeter = new Greeter("Roger");
greeter.greet(); // "Hello Roger!"
Methods
18th of December, 2014
Static fields
function Greeter(name) {
this.name = name || Greeter.DEFAULT_NAME;
}
Greeter.DEFAULT_NAME = "Sir";
Greeter.prototype = {
// ...
};
var greeter = new Greeter();
greeter.greet(); // "Hello Sir!"
18th of December, 2014
Inheritance
function AwesomeGreeter(name) {
Greeter.call(this, name);
}
AwesomeGreeter.prototype = new Greeter();
AwesomeGreeter.prototype.superGreet = function () {
this.greet();
console.log("You are awesome!");
};
var greeter = new AwesomeGreeter("Chuck");
greeter.superGreet(); // "Hello Chuck!" "You are awesome!"
18th of December, 2014
Inheritance
function AwesomeGreeter(name) {
Greeter.call(this, name);
}
AwesomeGreeter.prototype = new Greeter();
AwesomeGreeter.prototype.superGreet = function () {
this.greet();
console.log("You are awesome!");
};
var greeter = new AwesomeGreeter("Chuck");
greeter.superGreet(); // "Hello Chuck!" "You are awesome!"
Call parent’s
constructor
18th of December, 2014
Inheritance
function AwesomeGreeter(name) {
Greeter.call(this, name);
}
AwesomeGreeter.prototype = new Greeter();
AwesomeGreeter.prototype.superGreet = function () {
this.greet();
console.log("You are awesome!");
};
var greeter = new AwesomeGreeter("Chuck");
greeter.superGreet(); // "Hello Chuck!" "You are awesome!"
Inherit parent’s methods
18th of December, 2014
Inheritance
function AwesomeGreeter(name) {
Greeter.call(this, name);
}
AwesomeGreeter.prototype = new Greeter();
AwesomeGreeter.prototype.superGreet = function () {
this.greet();
console.log("You are awesome!");
};
var greeter = new AwesomeGreeter("Chuck");
greeter.superGreet(); // "Hello Chuck!" "You are awesome!"
Add new
methods
18th of December, 2014
Private fields
function Greeter(name) {
this.greet = function () {
console.log('Hello ' + name + '!');
};
}
var greeter = new Greeter("Roger");
greeter.greet(); // "Hello Roger!"
console.log(greeter.name); // undefined
18th of December, 2014
Private fields
function Greeter(name) {
this.greet = function () {
console.log('Hello ' + name + '!');
};
}
var greeter = new Greeter("Roger");
greeter.greet(); // "Hello Roger!"
console.log(greeter.name); // undefined
Define greet as a
closure
18th of December, 2014
Private fields
function Greeter(name) {
function buildMessage() {
return 'Hello ' + name + '!';
}
this.greet = function () {
console.log(buildMessage());
};
}
var greeter = new Greeter("Roger");
greeter.greet(); // "Hello Roger!"
console.log(greeter.name); // undefined
Private method
18th of December, 2014
What did we learn ?
With:
● Objects
18th of December, 2014
What did we learn ?
With:
● Objects
● Functions
18th of December, 2014
What did we learn ?
With:
● Objects
● Functions
● Prototypes
18th of December, 2014
What did we learn ?
With:
● Objects
● Functions
● Prototypes
We got:
● Classes
● Methods
● Inheritance
● Static fields
● Private fields
18th of December, 2014
What did we learn ?
With:
● Objects
● Functions
● Prototypes
We got:
● Classes
● Methods
● Inheritance
● Static fields
● Private fields
So Javascript is cool !
18th of December, 2014
Questions ?
For online questions, please leave a comment on the article.
18th of December, 2014
Join the community !
(in Paris)
Social networks :
● Follow us on Twitter : https://twitter.com/steamlearn
● Like us on Facebook : https://www.facebook.com/steamlearn
SteamLearn is an Inovia initiative : inovia.fr
You wish to be in the audience ? Join the meetup group!
http://www.meetup.com/Steam-Learn/
18th of December, 2014
References
● MDN - Introduction to object-oriented Javascript
● 2ality - JavaScript’s “this”: how it works, where it can trip
you up
● Ecmascript 6 specification draft
Ad

More Related Content

What's hot (18)

Potential Friend Finder
Potential Friend FinderPotential Friend Finder
Potential Friend Finder
Richard Schneeman
 
Transparent Object Persistence with FLOW3
Transparent Object Persistence with FLOW3Transparent Object Persistence with FLOW3
Transparent Object Persistence with FLOW3
Karsten Dambekalns
 
NoSQL & MongoDB
NoSQL & MongoDBNoSQL & MongoDB
NoSQL & MongoDB
Shuai Liu
 
Mobile Database Persistence
Mobile Database PersistenceMobile Database Persistence
Mobile Database Persistence
Eric Maxwell
 
Php
PhpPhp
Php
Linh Tran
 
Introduction To Moose
Introduction To MooseIntroduction To Moose
Introduction To Moose
Mike Whitaker
 
MongoDB - Introduction
MongoDB - IntroductionMongoDB - Introduction
MongoDB - Introduction
Vagmi Mudumbai
 
Learning jQuery in 30 minutes
Learning jQuery in 30 minutesLearning jQuery in 30 minutes
Learning jQuery in 30 minutes
Simon Willison
 
An Overview of HTML5 Storage
An Overview of HTML5 StorageAn Overview of HTML5 Storage
An Overview of HTML5 Storage
Paul Irish
 
Five Things you Need to Know About Scaling
Five Things you Need to Know About ScalingFive Things you Need to Know About Scaling
Five Things you Need to Know About Scaling
MongoDB
 
Moose (Perl 5)
Moose (Perl 5)Moose (Perl 5)
Moose (Perl 5)
xSawyer
 
Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)
Remy Sharp
 
Moose talk at FOSDEM 2011 (Perl devroom)
Moose talk at FOSDEM 2011 (Perl devroom)Moose talk at FOSDEM 2011 (Perl devroom)
Moose talk at FOSDEM 2011 (Perl devroom)
xSawyer
 
Introduction to Moose
Introduction to MooseIntroduction to Moose
Introduction to Moose
thashaa
 
jQuery%20on%20Rails%20Presentation
jQuery%20on%20Rails%20PresentationjQuery%20on%20Rails%20Presentation
jQuery%20on%20Rails%20Presentation
guestcf600a
 
HTML5 JavaScript Interfaces
HTML5 JavaScript InterfacesHTML5 JavaScript Interfaces
HTML5 JavaScript Interfaces
Aaron Gustafson
 
Transparent Object Persistence with FLOW3
Transparent Object Persistence with FLOW3Transparent Object Persistence with FLOW3
Transparent Object Persistence with FLOW3
Karsten Dambekalns
 
2018 PyCon Korea - Ring
2018 PyCon Korea - Ring2018 PyCon Korea - Ring
2018 PyCon Korea - Ring
YunWon Jeong
 
Transparent Object Persistence with FLOW3
Transparent Object Persistence with FLOW3Transparent Object Persistence with FLOW3
Transparent Object Persistence with FLOW3
Karsten Dambekalns
 
NoSQL & MongoDB
NoSQL & MongoDBNoSQL & MongoDB
NoSQL & MongoDB
Shuai Liu
 
Mobile Database Persistence
Mobile Database PersistenceMobile Database Persistence
Mobile Database Persistence
Eric Maxwell
 
Introduction To Moose
Introduction To MooseIntroduction To Moose
Introduction To Moose
Mike Whitaker
 
MongoDB - Introduction
MongoDB - IntroductionMongoDB - Introduction
MongoDB - Introduction
Vagmi Mudumbai
 
Learning jQuery in 30 minutes
Learning jQuery in 30 minutesLearning jQuery in 30 minutes
Learning jQuery in 30 minutes
Simon Willison
 
An Overview of HTML5 Storage
An Overview of HTML5 StorageAn Overview of HTML5 Storage
An Overview of HTML5 Storage
Paul Irish
 
Five Things you Need to Know About Scaling
Five Things you Need to Know About ScalingFive Things you Need to Know About Scaling
Five Things you Need to Know About Scaling
MongoDB
 
Moose (Perl 5)
Moose (Perl 5)Moose (Perl 5)
Moose (Perl 5)
xSawyer
 
Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)
Remy Sharp
 
Moose talk at FOSDEM 2011 (Perl devroom)
Moose talk at FOSDEM 2011 (Perl devroom)Moose talk at FOSDEM 2011 (Perl devroom)
Moose talk at FOSDEM 2011 (Perl devroom)
xSawyer
 
Introduction to Moose
Introduction to MooseIntroduction to Moose
Introduction to Moose
thashaa
 
jQuery%20on%20Rails%20Presentation
jQuery%20on%20Rails%20PresentationjQuery%20on%20Rails%20Presentation
jQuery%20on%20Rails%20Presentation
guestcf600a
 
HTML5 JavaScript Interfaces
HTML5 JavaScript InterfacesHTML5 JavaScript Interfaces
HTML5 JavaScript Interfaces
Aaron Gustafson
 
Transparent Object Persistence with FLOW3
Transparent Object Persistence with FLOW3Transparent Object Persistence with FLOW3
Transparent Object Persistence with FLOW3
Karsten Dambekalns
 
2018 PyCon Korea - Ring
2018 PyCon Korea - Ring2018 PyCon Korea - Ring
2018 PyCon Korea - Ring
YunWon Jeong
 

Similar to Steam Learn: Javascript and OOP (20)

Node.js - Demnächst auf einem Server in Ihrer Nähe
Node.js - Demnächst auf einem Server in Ihrer NäheNode.js - Demnächst auf einem Server in Ihrer Nähe
Node.js - Demnächst auf einem Server in Ihrer Nähe
Ralph Winzinger
 
AmdJavaMeetupBDDUsingCucumber
AmdJavaMeetupBDDUsingCucumberAmdJavaMeetupBDDUsingCucumber
AmdJavaMeetupBDDUsingCucumber
gopalsaob
 
TDC 2014 - JavaScript de qualidade: hoje, amanhã e sempre!
TDC 2014 - JavaScript de qualidade: hoje, amanhã e sempre!TDC 2014 - JavaScript de qualidade: hoje, amanhã e sempre!
TDC 2014 - JavaScript de qualidade: hoje, amanhã e sempre!
Guilherme Carreiro
 
Propel sfugmd
Propel sfugmdPropel sfugmd
Propel sfugmd
iKlaus
 
Object-oriented Javascript
Object-oriented JavascriptObject-oriented Javascript
Object-oriented Javascript
Daniel Ku
 
JSGeneve - Backbone.js
JSGeneve - Backbone.jsJSGeneve - Backbone.js
JSGeneve - Backbone.js
Pierre Spring
 
JavaScript - Like a Box of Chocolates
JavaScript - Like a Box of ChocolatesJavaScript - Like a Box of Chocolates
JavaScript - Like a Box of Chocolates
Robert Nyman
 
JSDay Italy - Backbone.js
JSDay Italy - Backbone.jsJSDay Italy - Backbone.js
JSDay Italy - Backbone.js
Pierre Spring
 
Hooks WCSD12
Hooks WCSD12Hooks WCSD12
Hooks WCSD12
Jeffrey Zinn
 
Intro to Ember.js
Intro to Ember.jsIntro to Ember.js
Intro to Ember.js
Jay Phelps
 
JavaScript - Like a Box of Chocolates - jsDay
JavaScript - Like a Box of Chocolates - jsDayJavaScript - Like a Box of Chocolates - jsDay
JavaScript - Like a Box of Chocolates - jsDay
Robert Nyman
 
JavaScript & HTML5 - Brave New World
JavaScript & HTML5 - Brave New WorldJavaScript & HTML5 - Brave New World
JavaScript & HTML5 - Brave New World
Robert Nyman
 
The History of PHPersistence
The History of PHPersistenceThe History of PHPersistence
The History of PHPersistence
Hugo Hamon
 
(Ab)Using the MetaCPAN API for Fun and Profit
(Ab)Using the MetaCPAN API for Fun and Profit(Ab)Using the MetaCPAN API for Fun and Profit
(Ab)Using the MetaCPAN API for Fun and Profit
Olaf Alders
 
PHP Tips & Tricks
PHP Tips & TricksPHP Tips & Tricks
PHP Tips & Tricks
Radek Benkel
 
JavaScript Neednt Hurt - JavaBin talk
JavaScript Neednt Hurt - JavaBin talkJavaScript Neednt Hurt - JavaBin talk
JavaScript Neednt Hurt - JavaBin talk
Thomas Kjeldahl Nilsson
 
JavaScript for PHP developers
JavaScript for PHP developersJavaScript for PHP developers
JavaScript for PHP developers
Stoyan Stefanov
 
Google Guava - Core libraries for Java & Android
Google Guava - Core libraries for Java & AndroidGoogle Guava - Core libraries for Java & Android
Google Guava - Core libraries for Java & Android
Jordi Gerona
 
Building Your First Widget
Building Your First WidgetBuilding Your First Widget
Building Your First Widget
Chris Wilcoxson
 
20160227 Granma
20160227 Granma20160227 Granma
20160227 Granma
Sharon Liu
 
Node.js - Demnächst auf einem Server in Ihrer Nähe
Node.js - Demnächst auf einem Server in Ihrer NäheNode.js - Demnächst auf einem Server in Ihrer Nähe
Node.js - Demnächst auf einem Server in Ihrer Nähe
Ralph Winzinger
 
AmdJavaMeetupBDDUsingCucumber
AmdJavaMeetupBDDUsingCucumberAmdJavaMeetupBDDUsingCucumber
AmdJavaMeetupBDDUsingCucumber
gopalsaob
 
TDC 2014 - JavaScript de qualidade: hoje, amanhã e sempre!
TDC 2014 - JavaScript de qualidade: hoje, amanhã e sempre!TDC 2014 - JavaScript de qualidade: hoje, amanhã e sempre!
TDC 2014 - JavaScript de qualidade: hoje, amanhã e sempre!
Guilherme Carreiro
 
Propel sfugmd
Propel sfugmdPropel sfugmd
Propel sfugmd
iKlaus
 
Object-oriented Javascript
Object-oriented JavascriptObject-oriented Javascript
Object-oriented Javascript
Daniel Ku
 
JSGeneve - Backbone.js
JSGeneve - Backbone.jsJSGeneve - Backbone.js
JSGeneve - Backbone.js
Pierre Spring
 
JavaScript - Like a Box of Chocolates
JavaScript - Like a Box of ChocolatesJavaScript - Like a Box of Chocolates
JavaScript - Like a Box of Chocolates
Robert Nyman
 
JSDay Italy - Backbone.js
JSDay Italy - Backbone.jsJSDay Italy - Backbone.js
JSDay Italy - Backbone.js
Pierre Spring
 
Intro to Ember.js
Intro to Ember.jsIntro to Ember.js
Intro to Ember.js
Jay Phelps
 
JavaScript - Like a Box of Chocolates - jsDay
JavaScript - Like a Box of Chocolates - jsDayJavaScript - Like a Box of Chocolates - jsDay
JavaScript - Like a Box of Chocolates - jsDay
Robert Nyman
 
JavaScript & HTML5 - Brave New World
JavaScript & HTML5 - Brave New WorldJavaScript & HTML5 - Brave New World
JavaScript & HTML5 - Brave New World
Robert Nyman
 
The History of PHPersistence
The History of PHPersistenceThe History of PHPersistence
The History of PHPersistence
Hugo Hamon
 
(Ab)Using the MetaCPAN API for Fun and Profit
(Ab)Using the MetaCPAN API for Fun and Profit(Ab)Using the MetaCPAN API for Fun and Profit
(Ab)Using the MetaCPAN API for Fun and Profit
Olaf Alders
 
JavaScript for PHP developers
JavaScript for PHP developersJavaScript for PHP developers
JavaScript for PHP developers
Stoyan Stefanov
 
Google Guava - Core libraries for Java & Android
Google Guava - Core libraries for Java & AndroidGoogle Guava - Core libraries for Java & Android
Google Guava - Core libraries for Java & Android
Jordi Gerona
 
Building Your First Widget
Building Your First WidgetBuilding Your First Widget
Building Your First Widget
Chris Wilcoxson
 
20160227 Granma
20160227 Granma20160227 Granma
20160227 Granma
Sharon Liu
 
Ad

More from inovia (20)

10 tips for Redux at scale
10 tips for Redux at scale10 tips for Redux at scale
10 tips for Redux at scale
inovia
 
10 essentials steps for kafka streaming services
10 essentials steps for kafka streaming services10 essentials steps for kafka streaming services
10 essentials steps for kafka streaming services
inovia
 
Redux at scale
Redux at scaleRedux at scale
Redux at scale
inovia
 
DocuSign's Road to react
DocuSign's Road to reactDocuSign's Road to react
DocuSign's Road to react
inovia
 
API Gateway: Nginx way
API Gateway: Nginx wayAPI Gateway: Nginx way
API Gateway: Nginx way
inovia
 
Kafka: meetup microservice
Kafka: meetup microserviceKafka: meetup microservice
Kafka: meetup microservice
inovia
 
Microservice: starting point
Microservice:  starting pointMicroservice:  starting point
Microservice: starting point
inovia
 
Correlation id (tid)
Correlation id (tid)Correlation id (tid)
Correlation id (tid)
inovia
 
Meetic back end redesign - Meetup microservices
Meetic back end redesign - Meetup microservicesMeetic back end redesign - Meetup microservices
Meetic back end redesign - Meetup microservices
inovia
 
Security in microservices architectures
Security in microservices architecturesSecurity in microservices architectures
Security in microservices architectures
inovia
 
Building a Secure, Performant Network Fabric for Microservice Applications
Building a Secure, Performant Network Fabric for Microservice ApplicationsBuilding a Secure, Performant Network Fabric for Microservice Applications
Building a Secure, Performant Network Fabric for Microservice Applications
inovia
 
Microservices vs SOA
Microservices vs SOAMicroservices vs SOA
Microservices vs SOA
inovia
 
CQRS, an introduction by JC Bohin
CQRS, an introduction by JC BohinCQRS, an introduction by JC Bohin
CQRS, an introduction by JC Bohin
inovia
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
inovia
 
Oauth2, open-id connect with microservices
Oauth2, open-id connect with microservicesOauth2, open-id connect with microservices
Oauth2, open-id connect with microservices
inovia
 
You probably don't need microservices
You probably don't need microservicesYou probably don't need microservices
You probably don't need microservices
inovia
 
Api Gateway - What's the use of an api gateway?
Api Gateway - What's the use of an api gateway?Api Gateway - What's the use of an api gateway?
Api Gateway - What's the use of an api gateway?
inovia
 
Steam Learn: An introduction to Redis
Steam Learn: An introduction to RedisSteam Learn: An introduction to Redis
Steam Learn: An introduction to Redis
inovia
 
Steam Learn: Speedrun et TAS
Steam Learn: Speedrun et TASSteam Learn: Speedrun et TAS
Steam Learn: Speedrun et TAS
inovia
 
Steam Learn: Asynchronous Javascript
Steam Learn: Asynchronous JavascriptSteam Learn: Asynchronous Javascript
Steam Learn: Asynchronous Javascript
inovia
 
10 tips for Redux at scale
10 tips for Redux at scale10 tips for Redux at scale
10 tips for Redux at scale
inovia
 
10 essentials steps for kafka streaming services
10 essentials steps for kafka streaming services10 essentials steps for kafka streaming services
10 essentials steps for kafka streaming services
inovia
 
Redux at scale
Redux at scaleRedux at scale
Redux at scale
inovia
 
DocuSign's Road to react
DocuSign's Road to reactDocuSign's Road to react
DocuSign's Road to react
inovia
 
API Gateway: Nginx way
API Gateway: Nginx wayAPI Gateway: Nginx way
API Gateway: Nginx way
inovia
 
Kafka: meetup microservice
Kafka: meetup microserviceKafka: meetup microservice
Kafka: meetup microservice
inovia
 
Microservice: starting point
Microservice:  starting pointMicroservice:  starting point
Microservice: starting point
inovia
 
Correlation id (tid)
Correlation id (tid)Correlation id (tid)
Correlation id (tid)
inovia
 
Meetic back end redesign - Meetup microservices
Meetic back end redesign - Meetup microservicesMeetic back end redesign - Meetup microservices
Meetic back end redesign - Meetup microservices
inovia
 
Security in microservices architectures
Security in microservices architecturesSecurity in microservices architectures
Security in microservices architectures
inovia
 
Building a Secure, Performant Network Fabric for Microservice Applications
Building a Secure, Performant Network Fabric for Microservice ApplicationsBuilding a Secure, Performant Network Fabric for Microservice Applications
Building a Secure, Performant Network Fabric for Microservice Applications
inovia
 
Microservices vs SOA
Microservices vs SOAMicroservices vs SOA
Microservices vs SOA
inovia
 
CQRS, an introduction by JC Bohin
CQRS, an introduction by JC BohinCQRS, an introduction by JC Bohin
CQRS, an introduction by JC Bohin
inovia
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
inovia
 
Oauth2, open-id connect with microservices
Oauth2, open-id connect with microservicesOauth2, open-id connect with microservices
Oauth2, open-id connect with microservices
inovia
 
You probably don't need microservices
You probably don't need microservicesYou probably don't need microservices
You probably don't need microservices
inovia
 
Api Gateway - What's the use of an api gateway?
Api Gateway - What's the use of an api gateway?Api Gateway - What's the use of an api gateway?
Api Gateway - What's the use of an api gateway?
inovia
 
Steam Learn: An introduction to Redis
Steam Learn: An introduction to RedisSteam Learn: An introduction to Redis
Steam Learn: An introduction to Redis
inovia
 
Steam Learn: Speedrun et TAS
Steam Learn: Speedrun et TASSteam Learn: Speedrun et TAS
Steam Learn: Speedrun et TAS
inovia
 
Steam Learn: Asynchronous Javascript
Steam Learn: Asynchronous JavascriptSteam Learn: Asynchronous Javascript
Steam Learn: Asynchronous Javascript
inovia
 
Ad

Recently uploaded (20)

How to Install and Activate ListGrabber Plugin
How to Install and Activate ListGrabber PluginHow to Install and Activate ListGrabber Plugin
How to Install and Activate ListGrabber Plugin
eGrabber
 
Drawing Heighway’s Dragon - Part 4 - Interactive and Animated Dragon Creation
Drawing Heighway’s Dragon - Part 4 - Interactive and Animated Dragon CreationDrawing Heighway’s Dragon - Part 4 - Interactive and Animated Dragon Creation
Drawing Heighway’s Dragon - Part 4 - Interactive and Animated Dragon Creation
Philip Schwarz
 
How to Create a Crypto Wallet Like Trust.pptx
How to Create a Crypto Wallet Like Trust.pptxHow to Create a Crypto Wallet Like Trust.pptx
How to Create a Crypto Wallet Like Trust.pptx
riyageorge2024
 
iTop VPN With Crack Lifetime Activation Key
iTop VPN With Crack Lifetime Activation KeyiTop VPN With Crack Lifetime Activation Key
iTop VPN With Crack Lifetime Activation Key
raheemk1122g
 
Memory Management and Leaks in Postgres from pgext.day 2025
Memory Management and Leaks in Postgres from pgext.day 2025Memory Management and Leaks in Postgres from pgext.day 2025
Memory Management and Leaks in Postgres from pgext.day 2025
Phil Eaton
 
Multi-Agent Era will Define the Future of Software
Multi-Agent Era will Define the Future of SoftwareMulti-Agent Era will Define the Future of Software
Multi-Agent Era will Define the Future of Software
Ivo Andreev
 
Quasar Framework Introduction for C++ develpoers
Quasar Framework Introduction for C++ develpoersQuasar Framework Introduction for C++ develpoers
Quasar Framework Introduction for C++ develpoers
sadadkhah
 
SamFw Tool v4.9 Samsung Frp Tool Free Download
SamFw Tool v4.9 Samsung Frp Tool Free DownloadSamFw Tool v4.9 Samsung Frp Tool Free Download
SamFw Tool v4.9 Samsung Frp Tool Free Download
Iobit Uninstaller Pro Crack
 
Buy vs. Build: Unlocking the right path for your training tech
Buy vs. Build: Unlocking the right path for your training techBuy vs. Build: Unlocking the right path for your training tech
Buy vs. Build: Unlocking the right path for your training tech
Rustici Software
 
Let's Do Bad Things to Unsecured Containers
Let's Do Bad Things to Unsecured ContainersLet's Do Bad Things to Unsecured Containers
Let's Do Bad Things to Unsecured Containers
Gene Gotimer
 
wAIred_LearnWithOutAI_JCON_14052025.pptx
wAIred_LearnWithOutAI_JCON_14052025.pptxwAIred_LearnWithOutAI_JCON_14052025.pptx
wAIred_LearnWithOutAI_JCON_14052025.pptx
SimonedeGijt
 
GC Tuning: A Masterpiece in Performance Engineering
GC Tuning: A Masterpiece in Performance EngineeringGC Tuning: A Masterpiece in Performance Engineering
GC Tuning: A Masterpiece in Performance Engineering
Tier1 app
 
AI Agents with Gemini 2.0 - Beyond the Chatbot
AI Agents with Gemini 2.0 - Beyond the ChatbotAI Agents with Gemini 2.0 - Beyond the Chatbot
AI Agents with Gemini 2.0 - Beyond the Chatbot
Márton Kodok
 
Applying AI in Marketo: Practical Strategies and Implementation
Applying AI in Marketo: Practical Strategies and ImplementationApplying AI in Marketo: Practical Strategies and Implementation
Applying AI in Marketo: Practical Strategies and Implementation
BradBedford3
 
UI/UX Design & Development and Servicess
UI/UX Design & Development and ServicessUI/UX Design & Development and Servicess
UI/UX Design & Development and Servicess
marketing810348
 
Do not let staffing shortages and limited fiscal view hamper your cause
Do not let staffing shortages and limited fiscal view hamper your causeDo not let staffing shortages and limited fiscal view hamper your cause
Do not let staffing shortages and limited fiscal view hamper your cause
Fexle Services Pvt. Ltd.
 
IObit Uninstaller Pro Crack {2025} Download Free
IObit Uninstaller Pro Crack {2025} Download FreeIObit Uninstaller Pro Crack {2025} Download Free
IObit Uninstaller Pro Crack {2025} Download Free
Iobit Uninstaller Pro Crack
 
Troubleshooting JVM Outages – 3 Fortune 500 case studies
Troubleshooting JVM Outages – 3 Fortune 500 case studiesTroubleshooting JVM Outages – 3 Fortune 500 case studies
Troubleshooting JVM Outages – 3 Fortune 500 case studies
Tier1 app
 
Reinventing Microservices Efficiency and Innovation with Single-Runtime
Reinventing Microservices Efficiency and Innovation with Single-RuntimeReinventing Microservices Efficiency and Innovation with Single-Runtime
Reinventing Microservices Efficiency and Innovation with Single-Runtime
Natan Silnitsky
 
Call of Duty: Warzone for Windows With Crack Free Download 2025
Call of Duty: Warzone for Windows With Crack Free Download 2025Call of Duty: Warzone for Windows With Crack Free Download 2025
Call of Duty: Warzone for Windows With Crack Free Download 2025
Iobit Uninstaller Pro Crack
 
How to Install and Activate ListGrabber Plugin
How to Install and Activate ListGrabber PluginHow to Install and Activate ListGrabber Plugin
How to Install and Activate ListGrabber Plugin
eGrabber
 
Drawing Heighway’s Dragon - Part 4 - Interactive and Animated Dragon Creation
Drawing Heighway’s Dragon - Part 4 - Interactive and Animated Dragon CreationDrawing Heighway’s Dragon - Part 4 - Interactive and Animated Dragon Creation
Drawing Heighway’s Dragon - Part 4 - Interactive and Animated Dragon Creation
Philip Schwarz
 
How to Create a Crypto Wallet Like Trust.pptx
How to Create a Crypto Wallet Like Trust.pptxHow to Create a Crypto Wallet Like Trust.pptx
How to Create a Crypto Wallet Like Trust.pptx
riyageorge2024
 
iTop VPN With Crack Lifetime Activation Key
iTop VPN With Crack Lifetime Activation KeyiTop VPN With Crack Lifetime Activation Key
iTop VPN With Crack Lifetime Activation Key
raheemk1122g
 
Memory Management and Leaks in Postgres from pgext.day 2025
Memory Management and Leaks in Postgres from pgext.day 2025Memory Management and Leaks in Postgres from pgext.day 2025
Memory Management and Leaks in Postgres from pgext.day 2025
Phil Eaton
 
Multi-Agent Era will Define the Future of Software
Multi-Agent Era will Define the Future of SoftwareMulti-Agent Era will Define the Future of Software
Multi-Agent Era will Define the Future of Software
Ivo Andreev
 
Quasar Framework Introduction for C++ develpoers
Quasar Framework Introduction for C++ develpoersQuasar Framework Introduction for C++ develpoers
Quasar Framework Introduction for C++ develpoers
sadadkhah
 
Buy vs. Build: Unlocking the right path for your training tech
Buy vs. Build: Unlocking the right path for your training techBuy vs. Build: Unlocking the right path for your training tech
Buy vs. Build: Unlocking the right path for your training tech
Rustici Software
 
Let's Do Bad Things to Unsecured Containers
Let's Do Bad Things to Unsecured ContainersLet's Do Bad Things to Unsecured Containers
Let's Do Bad Things to Unsecured Containers
Gene Gotimer
 
wAIred_LearnWithOutAI_JCON_14052025.pptx
wAIred_LearnWithOutAI_JCON_14052025.pptxwAIred_LearnWithOutAI_JCON_14052025.pptx
wAIred_LearnWithOutAI_JCON_14052025.pptx
SimonedeGijt
 
GC Tuning: A Masterpiece in Performance Engineering
GC Tuning: A Masterpiece in Performance EngineeringGC Tuning: A Masterpiece in Performance Engineering
GC Tuning: A Masterpiece in Performance Engineering
Tier1 app
 
AI Agents with Gemini 2.0 - Beyond the Chatbot
AI Agents with Gemini 2.0 - Beyond the ChatbotAI Agents with Gemini 2.0 - Beyond the Chatbot
AI Agents with Gemini 2.0 - Beyond the Chatbot
Márton Kodok
 
Applying AI in Marketo: Practical Strategies and Implementation
Applying AI in Marketo: Practical Strategies and ImplementationApplying AI in Marketo: Practical Strategies and Implementation
Applying AI in Marketo: Practical Strategies and Implementation
BradBedford3
 
UI/UX Design & Development and Servicess
UI/UX Design & Development and ServicessUI/UX Design & Development and Servicess
UI/UX Design & Development and Servicess
marketing810348
 
Do not let staffing shortages and limited fiscal view hamper your cause
Do not let staffing shortages and limited fiscal view hamper your causeDo not let staffing shortages and limited fiscal view hamper your cause
Do not let staffing shortages and limited fiscal view hamper your cause
Fexle Services Pvt. Ltd.
 
IObit Uninstaller Pro Crack {2025} Download Free
IObit Uninstaller Pro Crack {2025} Download FreeIObit Uninstaller Pro Crack {2025} Download Free
IObit Uninstaller Pro Crack {2025} Download Free
Iobit Uninstaller Pro Crack
 
Troubleshooting JVM Outages – 3 Fortune 500 case studies
Troubleshooting JVM Outages – 3 Fortune 500 case studiesTroubleshooting JVM Outages – 3 Fortune 500 case studies
Troubleshooting JVM Outages – 3 Fortune 500 case studies
Tier1 app
 
Reinventing Microservices Efficiency and Innovation with Single-Runtime
Reinventing Microservices Efficiency and Innovation with Single-RuntimeReinventing Microservices Efficiency and Innovation with Single-Runtime
Reinventing Microservices Efficiency and Innovation with Single-Runtime
Natan Silnitsky
 
Call of Duty: Warzone for Windows With Crack Free Download 2025
Call of Duty: Warzone for Windows With Crack Free Download 2025Call of Duty: Warzone for Windows With Crack Free Download 2025
Call of Duty: Warzone for Windows With Crack Free Download 2025
Iobit Uninstaller Pro Crack
 

Steam Learn: Javascript and OOP

  • 1. 18th of December, 2014 Javascript and OOP The power of simplicity
  • 2. 18th of December, 2014 Outline ● The Javascript object ● Adding behaviour ● Inheritance without classes ● OOP concepts in JS
  • 3. 18th of December, 2014 Outline ● The Javascript object ● Adding behaviour ● Inheritance without classes ● OOP concepts in JS
  • 4. 18th of December, 2014 What is an object ? var label = { x: 20, y: 23, width: 100, height: 24, text: "Click me!" }; label["x"] === 20; label.y === 23;
  • 5. 18th of December, 2014 What is an object ? var label = { x: 20, y: 23, width: 100, height: 24, text: "Click me!" }; label["x"] === 20; label.y === 23;
  • 6. 18th of December, 2014 What is an object ? var label = { x: 20, y: 23, width: 100, height: 24, text: "Click me!" }; label["x"] === 20; label.y === 23;
  • 7. 18th of December, 2014 Create it in a function function createLabel(x, y, text) { return { x: x, y: y, width: computeWidth(text), height: defaultHeight, text: text }; } var errorLabel = createLabel(20, 23, "There was an error"); var successLabel = createLabel(56, 89, "Success");
  • 8. 18th of December, 2014 The constructor function function Label(x, y, text) { this.x = x; this.y = y; this.width = computeWidth(text); this.height = defaultHeight; this.text = text; } var errorLabel = new Label(20, 23, "There was an error"); errorLabel.x === 20;
  • 9. 18th of December, 2014 The constructor function function Label(x, y, text) { this.x = x; this.y = y; this.width = computeWidth(text); this.height = defaultHeight; this.text = text; } var errorLabel = new Label(20, 23, "There was an error"); errorLabel.x === 20;
  • 10. 18th of December, 2014 The constructor function function Label(x, y, text) { this.x = x; this.y = y; this.width = computeWidth(text); this.height = defaultHeight; this.text = text; } var errorLabel = new Label(20, 23, "There was an error"); errorLabel.x === 20;
  • 11. 18th of December, 2014 Outline ● The Javascript object ● Adding behaviour ● Inheritance without classes ● OOP concepts in JS
  • 12. 18th of December, 2014 Adding behaviour var greeter = { nameToGreet: "Roger", }; greeter.greet(); // How to do it ?
  • 13. 18th of December, 2014 Adding behaviour var greeter = { nameToGreet: "Roger", greet: function () { console.log("Hello " + this.nameToGreet + "!"); } }; greeter.greet(); // "Hello Roger!"
  • 14. 18th of December, 2014 Adding behaviour var greeter = { nameToGreet: "Roger", greet: function () { console.log("Hello " + this.nameToGreet + "!"); } }; greeter.greet(); // "Hello Roger!"
  • 15. 18th of December, 2014 A word about this... var greeter = { nameToGreet: "Roger", greet: function () { console.log("Hello " + this.nameToGreet + "!"); } }; var semiGreeter = { nameToGreet: "Bob" }; semiGreeter.greet = greeter.greet; semiGreeter.greet(); // "Hello Bob!"
  • 16. 18th of December, 2014 A word about this... var greeter = { nameToGreet: "Roger", greet: function () { console.log("Hello " + this.nameToGreet + "!"); } }; var semiGreeter = { nameToGreet: "Bob" }; semiGreeter.greet = greeter.greet; semiGreeter.greet(); // "Hello Bob!"
  • 17. 18th of December, 2014 A word about this... var greeter = { nameToGreet: "Roger", greet: function () { console.log("Hello " + this.nameToGreet + "!"); } }; var semiGreeter = { nameToGreet: "Bob" }; semiGreeter.greet = greeter.greet; semiGreeter.greet(); // "Hello Bob!"
  • 18. 18th of December, 2014 A word about this... var greeter = { nameToGreet: "Roger", greet: function () { console.log("Hello " + this.nameToGreet + "!"); } }; var semiGreeter = { nameToGreet: "Bob" }; semiGreeter.greet = greeter.greet; semiGreeter.greet(); // "Hello Bob!"
  • 19. 18th of December, 2014 A word about this... var greeter = { nameToGreet: "Roger", greet: function () { console.log("Hello " + this.nameToGreet + "!"); } }; var semiGreeter = { nameToGreet: "Bob" }; semiGreeter.greet = greeter.greet; semiGreeter.greet(); // "Hello Bob!"
  • 20. 18th of December, 2014 Outline ● The Javascript object ● Adding behaviour ● Inheritance without classes ● OOP concepts in JS
  • 21. 18th of December, 2014 Prototypal inheritance Do not have classes ? Extend objects !
  • 22. 18th of December, 2014 Prototypal inheritance var baseObject = { name: "baseObject" }; var childObject = { __proto__: baseObject }; childObject.name === "baseObject";
  • 23. 18th of December, 2014 Prototypal inheritance var baseObject = { name: "baseObject" }; var childObject = { __proto__: baseObject }; childObject.name === "baseObject";
  • 24. 18th of December, 2014 Prototypal inheritance var baseObject = { name: "baseObject" }; var childObject = { __proto__: baseObject }; childObject.name === "baseObject";
  • 25. 18th of December, 2014 Prototypal inheritance var baseObject = { name: "baseObject" }; var childObject = { __proto__: baseObject }; childObject.name === "baseObject";
  • 26. 18th of December, 2014 Prototypal inheritance var baseObject = { name: "baseObject" }; var childObject = { __proto__: baseObject }; childObject.name === "baseObject";
  • 27. 18th of December, 2014 Prototypal inheritance var baseObject = { name: "baseObject" }; var childObject = { __proto__: baseObject }; childObject.name === "baseObject"; childObject.name = "childObject"; childObject.name === "childObject"; Overrides baseObject. name
  • 28. 18th of December, 2014 Prototype with constructor var baseObject = { name: "baseObject" }; var ChildObject = function () {}; ChildObject.prototype = baseObject; var childObject = new ChildObject(); childObject.name === "baseObject";
  • 29. 18th of December, 2014 Prototype with constructor var baseObject = { name: "baseObject" }; var ChildObject = function () {}; ChildObject.prototype = baseObject; var childObject = new ChildObject(); childObject.name === "baseObject";
  • 30. 18th of December, 2014 Outline ● The Javascript object ● Adding behaviour ● Inheritance without classes ● OOP concepts in JS
  • 31. 18th of December, 2014 Classes function Greeter(name) { this.name = name; } Greeter.prototype = { greet: function () { console.log("Hello " + this.name + "!"); } }; var greeter = new Greeter("Roger"); greeter.greet(); // "Hello Roger!"
  • 32. 18th of December, 2014 Classes function Greeter(name) { this.name = name; } Greeter.prototype = { greet: function () { console.log("Hello " + this.name + "!"); } }; var greeter = new Greeter("Roger"); greeter.greet(); // "Hello Roger!" Initialize instance
  • 33. 18th of December, 2014 Classes function Greeter(name) { this.name = name; } Greeter.prototype = { greet: function () { console.log("Hello " + this.name + "!"); } }; var greeter = new Greeter("Roger"); greeter.greet(); // "Hello Roger!" Methods
  • 34. 18th of December, 2014 Static fields function Greeter(name) { this.name = name || Greeter.DEFAULT_NAME; } Greeter.DEFAULT_NAME = "Sir"; Greeter.prototype = { // ... }; var greeter = new Greeter(); greeter.greet(); // "Hello Sir!"
  • 35. 18th of December, 2014 Inheritance function AwesomeGreeter(name) { Greeter.call(this, name); } AwesomeGreeter.prototype = new Greeter(); AwesomeGreeter.prototype.superGreet = function () { this.greet(); console.log("You are awesome!"); }; var greeter = new AwesomeGreeter("Chuck"); greeter.superGreet(); // "Hello Chuck!" "You are awesome!"
  • 36. 18th of December, 2014 Inheritance function AwesomeGreeter(name) { Greeter.call(this, name); } AwesomeGreeter.prototype = new Greeter(); AwesomeGreeter.prototype.superGreet = function () { this.greet(); console.log("You are awesome!"); }; var greeter = new AwesomeGreeter("Chuck"); greeter.superGreet(); // "Hello Chuck!" "You are awesome!" Call parent’s constructor
  • 37. 18th of December, 2014 Inheritance function AwesomeGreeter(name) { Greeter.call(this, name); } AwesomeGreeter.prototype = new Greeter(); AwesomeGreeter.prototype.superGreet = function () { this.greet(); console.log("You are awesome!"); }; var greeter = new AwesomeGreeter("Chuck"); greeter.superGreet(); // "Hello Chuck!" "You are awesome!" Inherit parent’s methods
  • 38. 18th of December, 2014 Inheritance function AwesomeGreeter(name) { Greeter.call(this, name); } AwesomeGreeter.prototype = new Greeter(); AwesomeGreeter.prototype.superGreet = function () { this.greet(); console.log("You are awesome!"); }; var greeter = new AwesomeGreeter("Chuck"); greeter.superGreet(); // "Hello Chuck!" "You are awesome!" Add new methods
  • 39. 18th of December, 2014 Private fields function Greeter(name) { this.greet = function () { console.log('Hello ' + name + '!'); }; } var greeter = new Greeter("Roger"); greeter.greet(); // "Hello Roger!" console.log(greeter.name); // undefined
  • 40. 18th of December, 2014 Private fields function Greeter(name) { this.greet = function () { console.log('Hello ' + name + '!'); }; } var greeter = new Greeter("Roger"); greeter.greet(); // "Hello Roger!" console.log(greeter.name); // undefined Define greet as a closure
  • 41. 18th of December, 2014 Private fields function Greeter(name) { function buildMessage() { return 'Hello ' + name + '!'; } this.greet = function () { console.log(buildMessage()); }; } var greeter = new Greeter("Roger"); greeter.greet(); // "Hello Roger!" console.log(greeter.name); // undefined Private method
  • 42. 18th of December, 2014 What did we learn ? With: ● Objects
  • 43. 18th of December, 2014 What did we learn ? With: ● Objects ● Functions
  • 44. 18th of December, 2014 What did we learn ? With: ● Objects ● Functions ● Prototypes
  • 45. 18th of December, 2014 What did we learn ? With: ● Objects ● Functions ● Prototypes We got: ● Classes ● Methods ● Inheritance ● Static fields ● Private fields
  • 46. 18th of December, 2014 What did we learn ? With: ● Objects ● Functions ● Prototypes We got: ● Classes ● Methods ● Inheritance ● Static fields ● Private fields So Javascript is cool !
  • 47. 18th of December, 2014 Questions ? For online questions, please leave a comment on the article.
  • 48. 18th of December, 2014 Join the community ! (in Paris) Social networks : ● Follow us on Twitter : https://twitter.com/steamlearn ● Like us on Facebook : https://www.facebook.com/steamlearn SteamLearn is an Inovia initiative : inovia.fr You wish to be in the audience ? Join the meetup group! http://www.meetup.com/Steam-Learn/
  • 49. 18th of December, 2014 References ● MDN - Introduction to object-oriented Javascript ● 2ality - JavaScript’s “this”: how it works, where it can trip you up ● Ecmascript 6 specification draft