SlideShare une entreprise Scribd logo
1  sur  71
Télécharger pour lire hors ligne
JavaScript Patterns
Stoyan Stefanov, Yahoo!
@stoyanstefanov




Ajax Experience, Boston 2009
3:25 p.m. Sept 15, 2009
About me
•  Yahoo! Search
•  Yahoo! Exceptional
   Performance
•  YSlow 2.0 architect
•  http://smush.it
•  Books, articles
•  http://phpied.com
Types of patterns

•  OO Design Patterns
 (gang of four)
•  JavaScript-specific
   coding patterns
•  Anti-patterns
JavaScript Patterns
In this session…
•  Object creation patterns
•  Code reuse patterns
•  Functional patterns
•  More on object creation
•  Design patterns
Object creation patterns
#
Two ways to create objects
•  Object literal
•  Constructor functions



  {}      vs.   new
Object literal
var adam = {}; // clean 
slate 

adam.name = “Adam”; 
adam.say = function() { 
  return “I am ” + 
this.name; 
}; 
Object literal
var adam = { 
  name: “Adam”, 
  say: function() { 
    return “I am ” + this.name; 
  } 
}; 
Using a constructor


var adam = new Person(“Adam”); 
adam.say(); // “I am Adam” 
Constructor functions
var Person = function(name) { 

  this.name = name; 
  this.say = function() { 
    return “I am ” + this.name; 
  }; 

}; 
Constructor functions
var Person = function(name) { 
  // var this = {}; 
  this.name = name; 
  this.say = function() { 
    return “I am ” + this.name; 
  }; 
  // return this; 
}; 
Naming convention

MyConstructor 
myFunction 
Enforcing new 
function Person() {  
  var that = (this === window) ? {} : this; 


  that.name = name; 
  that.say = function() { 
    return “I am ” + that.name; 
  }; 

  return that;  
}  
Enforcing new 
this instanceof Person 

this instanceof arguments.callee 



                           ES5
                           FTW
Prototype
var Person = function(name) { 
  this.name = name; 
}; 
Person.prototype.say = function() { 
  return “I am ” + this.name; 
}; 
How is the prototype used?

>>> var adam = new Person('Adam'); 
>>> adam.name; 
"Adam" 
>>> adam.say(); 
"I am Adam" 
If you want to reuse it,
add it to the prototype
Code reuse patterns
Inheritance – friend or foe


“Prefer object composition
to class inheritance”
Gang of 4
JavaScript Patterns
Borrowing methods pattern

•  call() and apply() 

notmyobj.doStuff.call(myobj, param1, p2, p3) 
notmyobj.doStuff.apply(myobj, [param1, p2, p3])
                                               
Example: borrowing from Array
function f() { 
   var args = [].slice.call(arguments, 1, 3); 
   return args; 
} 

>>> f(1, 2, 3, 4, 5, 6) 
2,3 


[].slice.call  
can also be
Array.prototype.slice.call 
Inheritance by copying properties
function extend(parent, child) { 
  var i, child = child || {}; 
  for (i in parent) { 
    child[i] = parent[i]; 
  } 
  return child; 
} 
Mixins
function mixInThese() { 
  var arg, prop, child = {}; 
  for (arg = 0; arg < arguments.length; arg++) { 
    for (prop in arguments[arg]) { 
      child[prop] = arguments[arg][prop]; 
    } 
  } 
  return child; 
} 
var cake = mixInThese( 
 {eggs: 2, large: true},  
 {butter: 1, salted: true}, 
 {flour: “3 cups”}, 
 {sugar: “sure!”} 
); 
Classical inheritance
function Parent(){ 
  this.name = 'Adam'; 
} 
Parent.prototype.say = function(){ 
  return this.name; 
}; 

function Child(){} 

inherit(Child, Parent); 
Option 1

function inherit(C, P) { 
  C.prototype = new P(); 
} 

ECMA standard
Option 2 – rent-a-constructor
function C(a, c, b, d) { 
  P.call(this, arguments); 
} 
•  Advantage – passes arguments
when creating an object
•  Drawback – won’t inherit from the
prototype
Option 3 – rent + prototype
function C(a, c, b, d) { 
  P.call(this, arguments); 
} 
C.prototype = new P(); 
Option 4
function inherit(C, P) { 
  C.prototype = P.prototype; 
} 
•  Advantage: everybody shares the
same prototype
•  Drawback: everybody shares the
same prototype 
Option 5
function inherit(C, P) { 
  var F = function(){}; 
  F.prototype = P.prototype; 
  C.prototype = new F(); 
} 
•  Only inherits properties/
methods of the prototype
Option 5 + super

function inherit(C, P) { 
  var F = function(){}; 
  F.prototype = P.prototype; 
  C.prototype = new F(); 
  C.uber = P.prototype; 
} 
Option 5 + super + constructor
reset
function inherit(C, P) { 
  var F = function(){}; 
  F.prototype = P.prototype; 
  C.prototype = new F(); 
  C.uber = P.prototype; 
  C.prototype.constructor = C; 
} 
Prototypal inheritance

•  by Douglas Crockford
•  no class-like constructors
•  objects inherit from objects
•  via the prototype
Prototypal inheritance
function object(o) { 
  function F(){} 
  F.prototype = o; 
  return new F(); 
                     ES5
}                    FTW
Prototypal inheritance

>>> var parent = {a: 1}; 
>>> var child = object(parent); 
>>> child.a; 
1 
>>> child.hasOwnProperty(“a”); 
false 
Functions
Functions are objects
Self-executable functions

(function(){ 
   var a = 1; 
   var b = 2; 
   alert(a + b); 
})(); 
Self-executable functions

(function(a, b){ 
  var c = a + b; 
  alert(c); 
})(1, 2); 
Callbacks
function test(a, b, fn) { 
    fn(a, b); 
} 

test(1, 2, myFunc); 

test(1, 2, function(one, two){ 
    console.log(arguments); 
}); 
Callback pattern example

document.addEventListener( 
   'click',  
   animateAndWowUser,  
   false 
); 
Callback pattern example
var thePlotThickens = function(){ 
  console.log('500ms later...'); 
}; 
setTimeout(thePlotThickens, 500); 

// anti‐pattern 
setTimeout("thePlotThickens()", 
500); 
Returning functions
function setup() { 
    alert(1); 
    return function() { 
        alert(2); 
    }; 
} 
var my = setup(); // alerts 1
                             
my(); // alerts 2 
Returning functions
function setup() { 
    var count = 0; 
    return function() { 
        return ++count; 
    }; 
} 
var next = setup(); 
next(); // 1 
next(); // 2 
Self-overwriting functions
function next() { 
    var count = 1; 
    next = function() { 
        return ++count; 
    }; 
    return count; 
} 
next(); // 1 
next(); // 2 
Lazy function definition
function lazy() { 
    var result = 2 + 2; 
    lazy = function() { 
        return result; 
    }; 
    return lazy(); 
} 
lazy(); // 4 
lazy(); // 4 
Function properties
function myFunc(param){ 
    if (!myFunc.cache) { 
        myFunc.cache = {}; 
    } 
    if (!myFunc.cache[param]) { 
        var result = {}; // … 
        myFunc.cache[param] = result; 
    } 
    return myFunc.cache[param]; 
} 
Init-time branching
// BEFORE 
var addListener = function(el, type, fn) {  

  // w3c 
  if (typeof window.addEventListener === 'function') {  
    el.addEventListener(type, fn, false);  

  // IE 
  } else if (typeof document.attachEvent === 'function') { 
    el.attachEvent('on' + type, fn);  

  // older browsers 
  } else {   
    el['on' + type] = fn;  
  }  
};  
Init-time branching
var addListener;  

if (typeof window.addEventListener === 'function') {  
  addListener = function(el, type, fn) {  
    el.addEventListener(type, fn, false);  
  };  
} else if (typeof document.attachEvent === 'function') 
{ 
  addListener = function(el, type, fn) {  
    el.attachEvent('on' + type, fn); 
  };  
} else { 
  addListener = function(el, type, fn) {    
    el['on' + type] = fn; 
  };  
}  
More object creation patterns
Private/privileged
function MyConstr() { 
    var a = 1; 
    this.sayAh = function() { 
        return a; 
    }; 
} 

>>> new MyConstr().sayAh(); 
1 
Declaring dependencies
YAHOO.properties.foo = function() 
{ 
  var Event = YAHOO.util.Event, 
      Dom   = YAHOO.util.Dom; 

  // ... 

}(); 
Namespacing

var myApp = {}; 
myApp.someObj = {}; 
myApp.someObj.someFunc =  
              function()
{}; 
Namespacing

function namespace(){…} 

>>> namespace(‘my.name.space’)
                              
>>> typeof my.name.space 
“object” 
Chaining
var o = { 
  v: 1, 
  increment: function() { 
    this.v++; 
    return this; 
  }, 
  add: function(v) { 
    this.v += v; 
    return this; 
  }, 
  shout: function(){ 
    alert(this.v); 
  } 
}; 

>>> o.increment().add(3).shout() // 5 
Configuration objects
myPerson(last, first, dob, 
address) 

vs.

var conf = { 
    first: 'Bruce', 
    last: 'Wayne' 
}; 
myPerson(conf); 
Static members – public
function MyMath() { 
  // math here... 
} 

MyMath.PI = 3.14; 
MyMath.E  = 2.7; 
Module pattern
MYAPP.namespace('modules.foo'); 
MYAPP.modules.foo = function() { 
  var a = 1; 
  return { 
    getA: function(){ 
      return a; 
    } 
  }; 
}(); 
Design Patterns
Singleton

var mysingleton = {}; 

•  It’s as simple as that
Singleton v.2 (classical)
var my1 = new Single(); 
var my2 = new Single(); 
>>> my1 === my2 
true 

•  How to make this work?
Singleton v.2 - option 1
var Single = function() { 
  if (typeof Single.instance === “object”) { 
    return Single.instance; 
  } 
  Single.instance = this; 
}; 


•  Drawback – the instance property
is public
… option 2 (closure)
function Single() { 

  var instance = this;  

  // add more to this… 

  Single = function (){ 
    return instance; 
  }; 
} 
Factory
var Polygon = function() {}; 
var triangle = Polygon.factory(‘Triangle’); 
var circle   = Polygon.factory(‘Circle’); 

Polygon.Triangle = function(){}; 
Polygon.Circle   = function(){}; 

Polygon.factory = function(name) { 
  if (typeof Polygon[name] === “function”) { 
    return new Polygon[name]();  
  } 
}; 
And one more thing…
Run JSLint




•  http://jslint.com
•  Integrate with your editor
JSLint
•  missing semi-colons
•  missing curly brackets
•  undeclared vars
•  trailing commas
•  unreachable code
•  for-in loops
•  …
Thank you!

More…
http://jspatterns.com
http://slideshare.net/stoyan
http://jsmag.com column

Contenu connexe

Tendances

Scalable JavaScript Application Architecture
Scalable JavaScript Application ArchitectureScalable JavaScript Application Architecture
Scalable JavaScript Application ArchitectureNicholas Zakas
 
Capabilities for Resources and Effects
Capabilities for Resources and EffectsCapabilities for Resources and Effects
Capabilities for Resources and EffectsMartin Odersky
 
Closures in Javascript
Closures in JavascriptClosures in Javascript
Closures in JavascriptDavid Semeria
 
Idiomatic Kotlin
Idiomatic KotlinIdiomatic Kotlin
Idiomatic Kotlinintelliyole
 
Java 8 Lambda Expressions & Streams
Java 8 Lambda Expressions & StreamsJava 8 Lambda Expressions & Streams
Java 8 Lambda Expressions & StreamsNewCircle Training
 
Advanced javascript
Advanced javascriptAdvanced javascript
Advanced javascriptDoeun KOCH
 
React state
React  stateReact  state
React stateDucat
 
Object Oriented Programming in JavaScript
Object Oriented Programming in JavaScriptObject Oriented Programming in JavaScript
Object Oriented Programming in JavaScriptzand3rs
 
ZIO: Powerful and Principled Functional Programming in Scala
ZIO: Powerful and Principled Functional Programming in ScalaZIO: Powerful and Principled Functional Programming in Scala
ZIO: Powerful and Principled Functional Programming in ScalaWiem Zine Elabidine
 
TestNG - The Next Generation of Unit Testing
TestNG - The Next Generation of Unit TestingTestNG - The Next Generation of Unit Testing
TestNG - The Next Generation of Unit TestingBethmi Gunasekara
 
Kiss PageObjects [01-2017]
Kiss PageObjects [01-2017]Kiss PageObjects [01-2017]
Kiss PageObjects [01-2017]Iakiv Kramarenko
 
Reflection in java
Reflection in javaReflection in java
Reflection in javaupen.rockin
 
Dynamically Generate a CRUD Admin Panel with Java Annotations
Dynamically Generate a CRUD Admin Panel with Java AnnotationsDynamically Generate a CRUD Admin Panel with Java Annotations
Dynamically Generate a CRUD Admin Panel with Java AnnotationsBroadleaf Commerce
 
Introduction to Kotlin Language and its application to Android platform
Introduction to Kotlin Language and its application to Android platformIntroduction to Kotlin Language and its application to Android platform
Introduction to Kotlin Language and its application to Android platformEastBanc Tachnologies
 
ZIO Schedule: Conquering Flakiness & Recurrence with Pure Functional Programming
ZIO Schedule: Conquering Flakiness & Recurrence with Pure Functional ProgrammingZIO Schedule: Conquering Flakiness & Recurrence with Pure Functional Programming
ZIO Schedule: Conquering Flakiness & Recurrence with Pure Functional ProgrammingJohn De Goes
 
Core java concepts
Core java  conceptsCore java  concepts
Core java conceptsRam132
 

Tendances (20)

Scalable JavaScript Application Architecture
Scalable JavaScript Application ArchitectureScalable JavaScript Application Architecture
Scalable JavaScript Application Architecture
 
JavaScript Inheritance
JavaScript InheritanceJavaScript Inheritance
JavaScript Inheritance
 
Capabilities for Resources and Effects
Capabilities for Resources and EffectsCapabilities for Resources and Effects
Capabilities for Resources and Effects
 
Demystifying Prototypes
Demystifying PrototypesDemystifying Prototypes
Demystifying Prototypes
 
Closures in Javascript
Closures in JavascriptClosures in Javascript
Closures in Javascript
 
Idiomatic Kotlin
Idiomatic KotlinIdiomatic Kotlin
Idiomatic Kotlin
 
Java 8 Lambda Expressions & Streams
Java 8 Lambda Expressions & StreamsJava 8 Lambda Expressions & Streams
Java 8 Lambda Expressions & Streams
 
Advanced javascript
Advanced javascriptAdvanced javascript
Advanced javascript
 
React state
React  stateReact  state
React state
 
Broadleaf Presents Thymeleaf
Broadleaf Presents ThymeleafBroadleaf Presents Thymeleaf
Broadleaf Presents Thymeleaf
 
Object Oriented Programming in JavaScript
Object Oriented Programming in JavaScriptObject Oriented Programming in JavaScript
Object Oriented Programming in JavaScript
 
ZIO: Powerful and Principled Functional Programming in Scala
ZIO: Powerful and Principled Functional Programming in ScalaZIO: Powerful and Principled Functional Programming in Scala
ZIO: Powerful and Principled Functional Programming in Scala
 
TestNG - The Next Generation of Unit Testing
TestNG - The Next Generation of Unit TestingTestNG - The Next Generation of Unit Testing
TestNG - The Next Generation of Unit Testing
 
Kiss PageObjects [01-2017]
Kiss PageObjects [01-2017]Kiss PageObjects [01-2017]
Kiss PageObjects [01-2017]
 
Reflection in java
Reflection in javaReflection in java
Reflection in java
 
Dynamically Generate a CRUD Admin Panel with Java Annotations
Dynamically Generate a CRUD Admin Panel with Java AnnotationsDynamically Generate a CRUD Admin Panel with Java Annotations
Dynamically Generate a CRUD Admin Panel with Java Annotations
 
Introduction to Kotlin Language and its application to Android platform
Introduction to Kotlin Language and its application to Android platformIntroduction to Kotlin Language and its application to Android platform
Introduction to Kotlin Language and its application to Android platform
 
ZIO Schedule: Conquering Flakiness & Recurrence with Pure Functional Programming
ZIO Schedule: Conquering Flakiness & Recurrence with Pure Functional ProgrammingZIO Schedule: Conquering Flakiness & Recurrence with Pure Functional Programming
ZIO Schedule: Conquering Flakiness & Recurrence with Pure Functional Programming
 
Core java concepts
Core java  conceptsCore java  concepts
Core java concepts
 
Java 9 Features
Java 9 FeaturesJava 9 Features
Java 9 Features
 

En vedette

JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing UpDavid Padbury
 
Javascript Module Patterns
Javascript Module PatternsJavascript Module Patterns
Javascript Module PatternsNicholas Jansma
 
Scalable JavaScript Design Patterns
Scalable JavaScript Design PatternsScalable JavaScript Design Patterns
Scalable JavaScript Design PatternsAddy Osmani
 
CS6201 Software Reuse - Design Patterns
CS6201 Software Reuse - Design PatternsCS6201 Software Reuse - Design Patterns
CS6201 Software Reuse - Design PatternsKwangshin Oh
 
Test Patterns - What is a Pattern?
Test Patterns - What is a Pattern?Test Patterns - What is a Pattern?
Test Patterns - What is a Pattern?Rafael Pires
 
Software Testing: Models, Patterns, Tools
Software Testing: Models, Patterns, ToolsSoftware Testing: Models, Patterns, Tools
Software Testing: Models, Patterns, ToolsBob Binder
 
JavaScript Modules Done Right
JavaScript Modules Done RightJavaScript Modules Done Right
JavaScript Modules Done RightMariusz Nowak
 
The many facets of code reuse in JavaScript
The many facets of code reuse in JavaScriptThe many facets of code reuse in JavaScript
The many facets of code reuse in JavaScriptLeonardo Borges
 
Demystifying Communication in a Digital World: Social Media 101
Demystifying Communication in a Digital World: Social Media 101Demystifying Communication in a Digital World: Social Media 101
Demystifying Communication in a Digital World: Social Media 101Shonali Burke
 
Who's afraid of the iPad
Who's afraid of the iPadWho's afraid of the iPad
Who's afraid of the iPadRichard Sedley
 
Mobile security services brampton
Mobile security services bramptonMobile security services brampton
Mobile security services bramptonanderson_blake
 
Software Test Patterns: Successes and Challenges
Software Test Patterns: Successes and ChallengesSoftware Test Patterns: Successes and Challenges
Software Test Patterns: Successes and ChallengesBob Binder
 
August 2016 HUG: Open Source Big Data Ingest with StreamSets Data Collector
August 2016 HUG: Open Source Big Data Ingest with StreamSets Data Collector August 2016 HUG: Open Source Big Data Ingest with StreamSets Data Collector
August 2016 HUG: Open Source Big Data Ingest with StreamSets Data Collector Yahoo Developer Network
 

En vedette (19)

JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing Up
 
Javascript Module Patterns
Javascript Module PatternsJavascript Module Patterns
Javascript Module Patterns
 
Patterns In-Javascript
Patterns In-JavascriptPatterns In-Javascript
Patterns In-Javascript
 
Scalable JavaScript Design Patterns
Scalable JavaScript Design PatternsScalable JavaScript Design Patterns
Scalable JavaScript Design Patterns
 
Javascript Best Practices
Javascript Best PracticesJavascript Best Practices
Javascript Best Practices
 
GUI Test Patterns
GUI Test PatternsGUI Test Patterns
GUI Test Patterns
 
CS6201 Software Reuse - Design Patterns
CS6201 Software Reuse - Design PatternsCS6201 Software Reuse - Design Patterns
CS6201 Software Reuse - Design Patterns
 
Test Patterns - What is a Pattern?
Test Patterns - What is a Pattern?Test Patterns - What is a Pattern?
Test Patterns - What is a Pattern?
 
Software Testing: Models, Patterns, Tools
Software Testing: Models, Patterns, ToolsSoftware Testing: Models, Patterns, Tools
Software Testing: Models, Patterns, Tools
 
JavaScript Modules Done Right
JavaScript Modules Done RightJavaScript Modules Done Right
JavaScript Modules Done Right
 
The many facets of code reuse in JavaScript
The many facets of code reuse in JavaScriptThe many facets of code reuse in JavaScript
The many facets of code reuse in JavaScript
 
WebShoppers 20ª Edição
WebShoppers 20ª EdiçãoWebShoppers 20ª Edição
WebShoppers 20ª Edição
 
Demystifying Communication in a Digital World: Social Media 101
Demystifying Communication in a Digital World: Social Media 101Demystifying Communication in a Digital World: Social Media 101
Demystifying Communication in a Digital World: Social Media 101
 
Who's afraid of the iPad
Who's afraid of the iPadWho's afraid of the iPad
Who's afraid of the iPad
 
Mobile security services brampton
Mobile security services bramptonMobile security services brampton
Mobile security services brampton
 
Software Test Patterns: Successes and Challenges
Software Test Patterns: Successes and ChallengesSoftware Test Patterns: Successes and Challenges
Software Test Patterns: Successes and Challenges
 
jQuery PPT
jQuery PPTjQuery PPT
jQuery PPT
 
August 2016 HUG: Open Source Big Data Ingest with StreamSets Data Collector
August 2016 HUG: Open Source Big Data Ingest with StreamSets Data Collector August 2016 HUG: Open Source Big Data Ingest with StreamSets Data Collector
August 2016 HUG: Open Source Big Data Ingest with StreamSets Data Collector
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 

Similaire à JavaScript Patterns

ECMA5 approach to building JavaScript frameworks with Anzor Bashkhaz
ECMA5 approach to building JavaScript frameworks with Anzor BashkhazECMA5 approach to building JavaScript frameworks with Anzor Bashkhaz
ECMA5 approach to building JavaScript frameworks with Anzor BashkhazFITC
 
Object Oriented JavaScript
Object Oriented JavaScriptObject Oriented JavaScript
Object Oriented JavaScriptMichael Girouard
 
JavaScript For CSharp Developer
JavaScript For CSharp DeveloperJavaScript For CSharp Developer
JavaScript For CSharp DeveloperSarvesh Kushwaha
 
Object Oriented JavaScript
Object Oriented JavaScriptObject Oriented JavaScript
Object Oriented JavaScriptJulie Iskander
 
Front end fundamentals session 1: javascript core
Front end fundamentals session 1: javascript coreFront end fundamentals session 1: javascript core
Front end fundamentals session 1: javascript coreWeb Zhao
 
JavaScript - Programming Languages course
JavaScript - Programming Languages course JavaScript - Programming Languages course
JavaScript - Programming Languages course yoavrubin
 
JavaScript in 2016
JavaScript in 2016JavaScript in 2016
JavaScript in 2016Codemotion
 
JavaScript in 2016 (Codemotion Rome)
JavaScript in 2016 (Codemotion Rome)JavaScript in 2016 (Codemotion Rome)
JavaScript in 2016 (Codemotion Rome)Eduard Tomàs
 
Prototype & Inheritance in JavaScript
Prototype & Inheritance in JavaScriptPrototype & Inheritance in JavaScript
Prototype & Inheritance in JavaScriptSunny Sharma
 
Property Based Testing in PHP
Property Based Testing in PHPProperty Based Testing in PHP
Property Based Testing in PHPvinaikopp
 
Awesomeness of JavaScript…almost
Awesomeness of JavaScript…almostAwesomeness of JavaScript…almost
Awesomeness of JavaScript…almostQuinton Sheppard
 
OOPs Concepts - Android Programming
OOPs Concepts - Android ProgrammingOOPs Concepts - Android Programming
OOPs Concepts - Android ProgrammingPurvik Rana
 
2012 oct-12 - java script inheritance
2012 oct-12 - java script inheritance2012 oct-12 - java script inheritance
2012 oct-12 - java script inheritancepedro.carvalho
 
Introduction to web programming for java and c# programmers by @drpicox
Introduction to web programming for java and c# programmers by @drpicoxIntroduction to web programming for java and c# programmers by @drpicox
Introduction to web programming for java and c# programmers by @drpicoxDavid Rodenas
 
Design patterns in javascript
Design patterns in javascriptDesign patterns in javascript
Design patterns in javascriptMiao Siyu
 

Similaire à JavaScript Patterns (20)

Ajaxworld
AjaxworldAjaxworld
Ajaxworld
 
ECMA5 approach to building JavaScript frameworks with Anzor Bashkhaz
ECMA5 approach to building JavaScript frameworks with Anzor BashkhazECMA5 approach to building JavaScript frameworks with Anzor Bashkhaz
ECMA5 approach to building JavaScript frameworks with Anzor Bashkhaz
 
Object Oriented JavaScript
Object Oriented JavaScriptObject Oriented JavaScript
Object Oriented JavaScript
 
JavaScript For CSharp Developer
JavaScript For CSharp DeveloperJavaScript For CSharp Developer
JavaScript For CSharp Developer
 
Object Oriented JavaScript
Object Oriented JavaScriptObject Oriented JavaScript
Object Oriented JavaScript
 
Front end fundamentals session 1: javascript core
Front end fundamentals session 1: javascript coreFront end fundamentals session 1: javascript core
Front end fundamentals session 1: javascript core
 
JavaScript - Programming Languages course
JavaScript - Programming Languages course JavaScript - Programming Languages course
JavaScript - Programming Languages course
 
JavaScript in 2016
JavaScript in 2016JavaScript in 2016
JavaScript in 2016
 
JavaScript in 2016 (Codemotion Rome)
JavaScript in 2016 (Codemotion Rome)JavaScript in 2016 (Codemotion Rome)
JavaScript in 2016 (Codemotion Rome)
 
JavaScript Abstraction
JavaScript AbstractionJavaScript Abstraction
JavaScript Abstraction
 
Core concepts-javascript
Core concepts-javascriptCore concepts-javascript
Core concepts-javascript
 
Prototype & Inheritance in JavaScript
Prototype & Inheritance in JavaScriptPrototype & Inheritance in JavaScript
Prototype & Inheritance in JavaScript
 
Property Based Testing in PHP
Property Based Testing in PHPProperty Based Testing in PHP
Property Based Testing in PHP
 
Awesomeness of JavaScript…almost
Awesomeness of JavaScript…almostAwesomeness of JavaScript…almost
Awesomeness of JavaScript…almost
 
JavaScript OOP
JavaScript OOPJavaScript OOP
JavaScript OOP
 
OOPs Concepts - Android Programming
OOPs Concepts - Android ProgrammingOOPs Concepts - Android Programming
OOPs Concepts - Android Programming
 
2012 oct-12 - java script inheritance
2012 oct-12 - java script inheritance2012 oct-12 - java script inheritance
2012 oct-12 - java script inheritance
 
Introduction to web programming for java and c# programmers by @drpicox
Introduction to web programming for java and c# programmers by @drpicoxIntroduction to web programming for java and c# programmers by @drpicox
Introduction to web programming for java and c# programmers by @drpicox
 
Design patterns in javascript
Design patterns in javascriptDesign patterns in javascript
Design patterns in javascript
 
Class introduction in java
Class introduction in javaClass introduction in java
Class introduction in java
 

Plus de Stoyan Stefanov

JavaScript Performance Patterns
JavaScript Performance PatternsJavaScript Performance Patterns
JavaScript Performance PatternsStoyan Stefanov
 
JavaScript performance patterns
JavaScript performance patternsJavaScript performance patterns
JavaScript performance patternsStoyan Stefanov
 
High Performance Social Plugins
High Performance Social PluginsHigh Performance Social Plugins
High Performance Social PluginsStoyan Stefanov
 
JavaScript навсякъде
JavaScript навсякъдеJavaScript навсякъде
JavaScript навсякъдеStoyan Stefanov
 
JavaScript is everywhere
JavaScript is everywhereJavaScript is everywhere
JavaScript is everywhereStoyan Stefanov
 
JavaScript shell scripting
JavaScript shell scriptingJavaScript shell scripting
JavaScript shell scriptingStoyan Stefanov
 
JavaScript for PHP developers
JavaScript for PHP developersJavaScript for PHP developers
JavaScript for PHP developersStoyan Stefanov
 
Progressive Downloads and Rendering - take #2
Progressive Downloads and Rendering - take #2Progressive Downloads and Rendering - take #2
Progressive Downloads and Rendering - take #2Stoyan Stefanov
 
Progressive Downloads and Rendering
Progressive Downloads and RenderingProgressive Downloads and Rendering
Progressive Downloads and RenderingStoyan Stefanov
 
Voices that matter: High Performance Web Sites
Voices that matter: High Performance Web SitesVoices that matter: High Performance Web Sites
Voices that matter: High Performance Web SitesStoyan Stefanov
 
Psychology of performance
Psychology of performancePsychology of performance
Psychology of performanceStoyan Stefanov
 
CSS and image optimization
CSS and image optimizationCSS and image optimization
CSS and image optimizationStoyan Stefanov
 
High-performance DOM scripting
High-performance DOM scriptingHigh-performance DOM scripting
High-performance DOM scriptingStoyan Stefanov
 

Plus de Stoyan Stefanov (20)

Reactive JavaScript
Reactive JavaScriptReactive JavaScript
Reactive JavaScript
 
YSlow hacking
YSlow hackingYSlow hacking
YSlow hacking
 
Liking performance
Liking performanceLiking performance
Liking performance
 
JavaScript Performance Patterns
JavaScript Performance PatternsJavaScript Performance Patterns
JavaScript Performance Patterns
 
JavaScript performance patterns
JavaScript performance patternsJavaScript performance patterns
JavaScript performance patterns
 
High Performance Social Plugins
High Performance Social PluginsHigh Performance Social Plugins
High Performance Social Plugins
 
Social Button BFFs
Social Button BFFsSocial Button BFFs
Social Button BFFs
 
JavaScript навсякъде
JavaScript навсякъдеJavaScript навсякъде
JavaScript навсякъде
 
JavaScript is everywhere
JavaScript is everywhereJavaScript is everywhere
JavaScript is everywhere
 
JavaScript shell scripting
JavaScript shell scriptingJavaScript shell scripting
JavaScript shell scripting
 
JavaScript for PHP developers
JavaScript for PHP developersJavaScript for PHP developers
JavaScript for PHP developers
 
WPO @ PubCon 2010
WPO @ PubCon 2010WPO @ PubCon 2010
WPO @ PubCon 2010
 
Progressive Downloads and Rendering - take #2
Progressive Downloads and Rendering - take #2Progressive Downloads and Rendering - take #2
Progressive Downloads and Rendering - take #2
 
Progressive Downloads and Rendering
Progressive Downloads and RenderingProgressive Downloads and Rendering
Progressive Downloads and Rendering
 
Performance patterns
Performance patternsPerformance patterns
Performance patterns
 
Voices that matter: High Performance Web Sites
Voices that matter: High Performance Web SitesVoices that matter: High Performance Web Sites
Voices that matter: High Performance Web Sites
 
Psychology of performance
Psychology of performancePsychology of performance
Psychology of performance
 
3-in-1 YSlow
3-in-1 YSlow3-in-1 YSlow
3-in-1 YSlow
 
CSS and image optimization
CSS and image optimizationCSS and image optimization
CSS and image optimization
 
High-performance DOM scripting
High-performance DOM scriptingHigh-performance DOM scripting
High-performance DOM scripting
 

Dernier

UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
Things you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceThings you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceMartin Humpolec
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...DianaGray10
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAshyamraj55
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UbiTrack UK
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopBachir Benyammi
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.francesco barbera
 
RAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AIRAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AIUdaiappa Ramachandran
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 

Dernier (20)

UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
Things you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceThings you didn't know you can use in your Salesforce
Things you didn't know you can use in your Salesforce
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 Workshop
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.
 
RAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AIRAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AI
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 

JavaScript Patterns