SlideShare a Scribd company logo
JavaScript
Patterns and Techniques
What exactly JS is ?
● Ecma Script implementation
Currently most browsers fully supports EcmaScript-262 5.1 http://kangax.github.io/compat-
table/es5/
Except IE8 - supports EcmaSript 3rd edition (FYI: there was not ES 4)
Previous releases http://www.ecma-international.org/publications/standards/Ecma-262.htm
● Prototype Based
● Dynamically typed
● First Class Functions
● Object Oriented, Functional, Imperative
Creating an object
● Object Literals
● Anonymous Constructor
● Factory method
● Wrappers
creating_object1.js
Setting properties to object
● Dot Notation
● Square brackets notation
● Helper methods from Object
setting_properties1.js
Writing constructors aka defining Classes
● Function vs Constructor
● Function’s prototype
● __proto__
● polimorphism
constructor.js
Privacy in Java Script
● Variables scope in JS
● Private Class Members
privacy.js, privacy2.js
Modules in JavaScript
Module is set of methods and properties, with
or without state.
● Simple module modules.js
● Private state in modules modules2.js
● Revealing Module Pattenr
to be continued
Thank you

More Related Content

PPTX
Nightwatch 101 - Salvador Molina
PDF
PyConUK2013 - Validated documents on MongoDB with Ming
PDF
"The JavaScript Design Patterns You have to Know" by Rashad Majali
PDF
Js design patterns
PPTX
Going offline with JS (DDD Sydney)
PPTX
26csharp
PPTX
Going Offline with JS
PPTX
Core java Classroom training at HarshithaTechnologies
Nightwatch 101 - Salvador Molina
PyConUK2013 - Validated documents on MongoDB with Ming
"The JavaScript Design Patterns You have to Know" by Rashad Majali
Js design patterns
Going offline with JS (DDD Sydney)
26csharp
Going Offline with JS
Core java Classroom training at HarshithaTechnologies

Viewers also liked (20)

PDF
RAII and ScopeGuard
PDF
Infographic: The Dutch Games Market
PPT
2010 bodley and blackwells
PDF
Week10
PDF
MedicReS Animal Experiments
PDF
Presentation
PPT
Presentation for Advanced Detection and Remote Sensing: Radar Systems
PPT
2010 A Strategic Year Of The Jubilee
PPTX
FactorEx - электронный факторинг
PDF
James Caan Business Secrets App
PDF
Cat's anatomy
PPTX
Gor Nishanov, C++ Coroutines – a negative overhead abstraction
PDF
Estilos y paradigmas de la Interacción Humano-Computador
PDF
Cpp17 and Beyond
PDF
How to manage Hortonworks HDB Resources with YARN
PPTX
Unsupervised Feature Learning
PDF
EMRでスポットインスタンスの自動入札ツールを作成する
PDF
Как обосновать затраты на ИБ?
PDF
Microservice Architecture on AWS using AWS Lambda and Docker Containers
PPTX
Customer Success Strategy Template
RAII and ScopeGuard
Infographic: The Dutch Games Market
2010 bodley and blackwells
Week10
MedicReS Animal Experiments
Presentation
Presentation for Advanced Detection and Remote Sensing: Radar Systems
2010 A Strategic Year Of The Jubilee
FactorEx - электронный факторинг
James Caan Business Secrets App
Cat's anatomy
Gor Nishanov, C++ Coroutines – a negative overhead abstraction
Estilos y paradigmas de la Interacción Humano-Computador
Cpp17 and Beyond
How to manage Hortonworks HDB Resources with YARN
Unsupervised Feature Learning
EMRでスポットインスタンスの自動入札ツールを作成する
Как обосновать затраты на ИБ?
Microservice Architecture on AWS using AWS Lambda and Docker Containers
Customer Success Strategy Template
Ad

Similar to JS patterns (20)

PDF
Java SE 9 modules - an introduction (July 2018)
PDF
Jab12 - Joomla! architecture revealed
PDF
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)
PDF
Java SE 9 modules (JPMS) - an introduction
PDF
Module, AMD, RequireJS
ODP
Clean code and refactoring
PDF
PDF
Selenium Online Training.pdf
PDF
JavaScript, qué hermoso eres
PPTX
Byte code manipulation and instrumentalization in Java
PPTX
AngularJS
PDF
Dot Net Training in Chennai
PPTX
06.1 .Net memory management
PPT
Web development basics (Part-7)
PDF
Interop 2015: Hardly Enough Theory, Barley Enough Code
PDF
Selenium Online Training.pdf
PDF
Selenium Online Training.pdf
PDF
Selenium Online Training.pdf
PDF
Selenium Online Training.pdf
PDF
Magento 2 Modules are Easy!
Java SE 9 modules - an introduction (July 2018)
Jab12 - Joomla! architecture revealed
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)
Java SE 9 modules (JPMS) - an introduction
Module, AMD, RequireJS
Clean code and refactoring
Selenium Online Training.pdf
JavaScript, qué hermoso eres
Byte code manipulation and instrumentalization in Java
AngularJS
Dot Net Training in Chennai
06.1 .Net memory management
Web development basics (Part-7)
Interop 2015: Hardly Enough Theory, Barley Enough Code
Selenium Online Training.pdf
Selenium Online Training.pdf
Selenium Online Training.pdf
Selenium Online Training.pdf
Magento 2 Modules are Easy!
Ad

JS patterns

  • 2. What exactly JS is ? ● Ecma Script implementation Currently most browsers fully supports EcmaScript-262 5.1 http://kangax.github.io/compat- table/es5/ Except IE8 - supports EcmaSript 3rd edition (FYI: there was not ES 4) Previous releases http://www.ecma-international.org/publications/standards/Ecma-262.htm ● Prototype Based ● Dynamically typed ● First Class Functions ● Object Oriented, Functional, Imperative
  • 3. Creating an object ● Object Literals ● Anonymous Constructor ● Factory method ● Wrappers creating_object1.js
  • 4. Setting properties to object ● Dot Notation ● Square brackets notation ● Helper methods from Object setting_properties1.js
  • 5. Writing constructors aka defining Classes ● Function vs Constructor ● Function’s prototype ● __proto__ ● polimorphism constructor.js
  • 6. Privacy in Java Script ● Variables scope in JS ● Private Class Members privacy.js, privacy2.js
  • 7. Modules in JavaScript Module is set of methods and properties, with or without state. ● Simple module modules.js ● Private state in modules modules2.js ● Revealing Module Pattenr