SlideShare a Scribd company logo
Dibyendu Shankar Tiwary Javascript Unleashed (Javascript that you need to know but might not!!)
What is Javascript ? Introduction
It makes the wall to talk Introduction
What’s behind the scene? Introduction
Equation
I know it all Tell me something which I don’t know
Why are we here? JavaScript as a prototype-based language  JavaScript Objects Are Dictionaries   JavaScript Functions Are First Class   Constructor Functions but No Classes   Prototypes   Object-oriented programming with JavaScript Static Properties and Methods   Closures   Simulating Private Properties  Inheriting from Classes Coding tricks with JavaScript   Simulating Namespaces  Classes and Reflection Future of Javascript   Should You Code JavaScript This Way?  Putting It into Perspective
JavaScript Objects Are Dictionaries   Code Demo JavaScript Functions Are First Class   Code Demo Constructor Functions but No Classes Code Demo (Dog spot = new Dog(); ) Prototypes (I deserve to be a header of a slide) As you wish, but be sure you gonna use it. JavaScript as a prototype-based language
Every Function’s Prototype Has a Constructor Property  The prototype object is a central concept in object-oriented programming with JavaScript. Name comes from the idea that in JavaScript, an object is created as a copy of an existing example (that is, a prototype) object every function has a property named "prototype" that refers to a prototype object prototype object in turn has a property named "constructor," which refers back to the function itself (Confused ??) Code Demo : var buddy = new Dog(“Buddy“);  Prototypes (Happy   )
Objects Appear to Have Their Prototype’s Properties  Code Demo Prototypes (Another slide conquered)
Resolving toString() Method in the Prototype Chain Prototypes (Are you kinda hittin on me ??)
Inheriting from a Prototype Changes made to a prototype object are immediately visible to the objects that inherit from it, even after these objects are created. If you define a property/method X in an object, a property/method of the same name will be hidden in that object’s prototype. For instance, you can override Object.prototype’s toString method by defining a toString method in Dog.prototype. Changes only go in one direction, from prototype to its derived objects, but not vice versa. Code Demo Prototypes (Name the session after me)
Static Properties and Methods   Code Demo Closure   A closure is a runtime phenomenon that comes about when an inner function (or in C#, an inner anonymous method) is bound to the local variables of its outer function.  Confused?? ( Code demo is for the rescue) Simulating Private Properties A local variable in a function is normally not accessible from outside the function However, when that local variable is captured by an inner function’s closure, it lives on. Code Demo javascript.crockford.com Inheriting from Classes (Even I deserve a slide, Ok whatever!!) Oops in Javascript
Constructor functions and prototype objects allow you to simulate classes Can simulate private members of a class using closures  You haven’t seen how you can derive from your class A local variable in a function is normally not accessible from outside the function However, when that local variable is captured by an inner function’s closure, it lives on. Code Demo javascript.crockford.com You have a base class Pet, with one derived class Dog.  Stop talking show me the code. Inheritance from Classes (Happy   )
Simulating Namespaces In C++ and C#, namespaces are used to minimize the probability of name collisions Code Demo Classes and Reflection  there is no way to know the name of a function.  it wouldn’t help us in most situations as a class constructor is typically built by assigning an anonymous function to a namespaced variable. The reflection APIs in ASP.NET AJAX work over any type. Coding tips and Tricks in JavaScript
Should You Code JavaScript This Way? Should you code in JavaScript the way you code in C# or C++? Best practices for one language may not be the best practices for another Maybe, as Douglas Crockford says in his article " Prototypal Inheritance in JavaScript ", the JavaScript way of programming is to make prototype objects, and use the simple object function below to make new objects, which inherit from that original object: function object(o) { function F() {} F.prototype = o; return new F(); } Putting It into Perspective   I have found my JavaScript journey a rewarding experience.  Although not entirely without frustration along the way Registering Class Hierarchies and Calling Base.  It’s a journey not a destination. Future of Javscript
Thank you  ( If you are confused now I have done a good job, if not then an exceptional job   )

More Related Content

What's hot (20)

All of javascript
All of javascriptAll of javascript
All of javascript
Togakangaroo
 
JavaScript Patterns
JavaScript PatternsJavaScript Patterns
JavaScript Patterns
Stoyan Stefanov
 
Js fwdays unit tesing javascript(by Anna Khabibullina)
Js fwdays unit tesing javascript(by Anna Khabibullina)Js fwdays unit tesing javascript(by Anna Khabibullina)
Js fwdays unit tesing javascript(by Anna Khabibullina)
Anna Khabibullina
 
JS Frameworks Day April,26 of 2014
JS Frameworks Day April,26 of 2014JS Frameworks Day April,26 of 2014
JS Frameworks Day April,26 of 2014
DA-14
 
Effective Scala: Programming Patterns
Effective Scala: Programming PatternsEffective Scala: Programming Patterns
Effective Scala: Programming Patterns
Vasil Remeniuk
 
Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)
Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)
Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)
raja kvk
 
Effective Scala (SoftShake 2013)
Effective Scala (SoftShake 2013)Effective Scala (SoftShake 2013)
Effective Scala (SoftShake 2013)
mircodotta
 
“Insulin” for Scala’s Syntactic Diabetes
“Insulin” for Scala’s Syntactic Diabetes“Insulin” for Scala’s Syntactic Diabetes
“Insulin” for Scala’s Syntactic Diabetes
Tzach Zohar
 
Douglas Crockford Presentation Goodparts
Douglas Crockford Presentation GoodpartsDouglas Crockford Presentation Goodparts
Douglas Crockford Presentation Goodparts
Ajax Experience 2009
 
JavaScript - From Birth To Closure
JavaScript - From Birth To ClosureJavaScript - From Birth To Closure
JavaScript - From Birth To Closure
Robert Nyman
 
Comparing Golang and understanding Java Value Types
Comparing Golang and understanding Java Value TypesComparing Golang and understanding Java Value Types
Comparing Golang and understanding Java Value Types
Péter Verhás
 
All of Javascript
All of JavascriptAll of Javascript
All of Javascript
Togakangaroo
 
Effective Scala (JavaDay Riga 2013)
Effective Scala (JavaDay Riga 2013)Effective Scala (JavaDay Riga 2013)
Effective Scala (JavaDay Riga 2013)
mircodotta
 
JavaScript in Object-Oriented Way
JavaScript in Object-Oriented WayJavaScript in Object-Oriented Way
JavaScript in Object-Oriented Way
Chamnap Chhorn
 
Javascript
JavascriptJavascript
Javascript
theacadian
 
Dependency Injection Why is it awesome and Why should I care?
Dependency Injection Why is it awesome and Why should I care?Dependency Injection Why is it awesome and Why should I care?
Dependency Injection Why is it awesome and Why should I care?
ColdFusionConference
 
TypeScript Best Practices
TypeScript Best PracticesTypeScript Best Practices
TypeScript Best Practices
felixbillon
 
Goodparts
GoodpartsGoodparts
Goodparts
damonjablons
 
Clean Code: Stop wasting my time
Clean Code: Stop wasting my timeClean Code: Stop wasting my time
Clean Code: Stop wasting my time
Edorian
 
Scalable JavaScript Design Patterns
Scalable JavaScript Design PatternsScalable JavaScript Design Patterns
Scalable JavaScript Design Patterns
Addy Osmani
 
Js fwdays unit tesing javascript(by Anna Khabibullina)
Js fwdays unit tesing javascript(by Anna Khabibullina)Js fwdays unit tesing javascript(by Anna Khabibullina)
Js fwdays unit tesing javascript(by Anna Khabibullina)
Anna Khabibullina
 
JS Frameworks Day April,26 of 2014
JS Frameworks Day April,26 of 2014JS Frameworks Day April,26 of 2014
JS Frameworks Day April,26 of 2014
DA-14
 
Effective Scala: Programming Patterns
Effective Scala: Programming PatternsEffective Scala: Programming Patterns
Effective Scala: Programming Patterns
Vasil Remeniuk
 
Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)
Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)
Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)
raja kvk
 
Effective Scala (SoftShake 2013)
Effective Scala (SoftShake 2013)Effective Scala (SoftShake 2013)
Effective Scala (SoftShake 2013)
mircodotta
 
“Insulin” for Scala’s Syntactic Diabetes
“Insulin” for Scala’s Syntactic Diabetes“Insulin” for Scala’s Syntactic Diabetes
“Insulin” for Scala’s Syntactic Diabetes
Tzach Zohar
 
Douglas Crockford Presentation Goodparts
Douglas Crockford Presentation GoodpartsDouglas Crockford Presentation Goodparts
Douglas Crockford Presentation Goodparts
Ajax Experience 2009
 
JavaScript - From Birth To Closure
JavaScript - From Birth To ClosureJavaScript - From Birth To Closure
JavaScript - From Birth To Closure
Robert Nyman
 
Comparing Golang and understanding Java Value Types
Comparing Golang and understanding Java Value TypesComparing Golang and understanding Java Value Types
Comparing Golang and understanding Java Value Types
Péter Verhás
 
Effective Scala (JavaDay Riga 2013)
Effective Scala (JavaDay Riga 2013)Effective Scala (JavaDay Riga 2013)
Effective Scala (JavaDay Riga 2013)
mircodotta
 
JavaScript in Object-Oriented Way
JavaScript in Object-Oriented WayJavaScript in Object-Oriented Way
JavaScript in Object-Oriented Way
Chamnap Chhorn
 
Dependency Injection Why is it awesome and Why should I care?
Dependency Injection Why is it awesome and Why should I care?Dependency Injection Why is it awesome and Why should I care?
Dependency Injection Why is it awesome and Why should I care?
ColdFusionConference
 
TypeScript Best Practices
TypeScript Best PracticesTypeScript Best Practices
TypeScript Best Practices
felixbillon
 
Clean Code: Stop wasting my time
Clean Code: Stop wasting my timeClean Code: Stop wasting my time
Clean Code: Stop wasting my time
Edorian
 
Scalable JavaScript Design Patterns
Scalable JavaScript Design PatternsScalable JavaScript Design Patterns
Scalable JavaScript Design Patterns
Addy Osmani
 

Viewers also liked (11)

Ch 7 interpersonal
Ch 7   interpersonalCh 7   interpersonal
Ch 7 interpersonal
akn4fotos
 
Plan de entrenamiento ef
Plan de entrenamiento efPlan de entrenamiento ef
Plan de entrenamiento ef
school
 
Chapter 13: Using Good Language Skills
Chapter 13: Using Good Language SkillsChapter 13: Using Good Language Skills
Chapter 13: Using Good Language Skills
akn4fotos
 
Facil y dificil
Facil y dificilFacil y dificil
Facil y dificil
mmonica merida
 
4) Resume Of Chaudhary Attique
4) Resume Of Chaudhary Attique4) Resume Of Chaudhary Attique
4) Resume Of Chaudhary Attique
Chaudhary Attique
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
akn4fotos
 
CH 6: Adapting Our Speech
CH 6: Adapting Our SpeechCH 6: Adapting Our Speech
CH 6: Adapting Our Speech
akn4fotos
 
Worksheethealthyhabits 100207070236-phpapp02
Worksheethealthyhabits 100207070236-phpapp02Worksheethealthyhabits 100207070236-phpapp02
Worksheethealthyhabits 100207070236-phpapp02
school
 
MANIPULACION DE CARPETAS
MANIPULACION DE CARPETASMANIPULACION DE CARPETAS
MANIPULACION DE CARPETAS
efrain19
 
Worksheetunhealthyhabits 100207070228-phpapp01
Worksheetunhealthyhabits 100207070228-phpapp01Worksheetunhealthyhabits 100207070228-phpapp01
Worksheetunhealthyhabits 100207070228-phpapp01
school
 
MY RESUME
MY RESUMEMY RESUME
MY RESUME
Muhammad Akid Mohamad Ashari
 
Ch 7 interpersonal
Ch 7   interpersonalCh 7   interpersonal
Ch 7 interpersonal
akn4fotos
 
Plan de entrenamiento ef
Plan de entrenamiento efPlan de entrenamiento ef
Plan de entrenamiento ef
school
 
Chapter 13: Using Good Language Skills
Chapter 13: Using Good Language SkillsChapter 13: Using Good Language Skills
Chapter 13: Using Good Language Skills
akn4fotos
 
4) Resume Of Chaudhary Attique
4) Resume Of Chaudhary Attique4) Resume Of Chaudhary Attique
4) Resume Of Chaudhary Attique
Chaudhary Attique
 
CH 6: Adapting Our Speech
CH 6: Adapting Our SpeechCH 6: Adapting Our Speech
CH 6: Adapting Our Speech
akn4fotos
 
Worksheethealthyhabits 100207070236-phpapp02
Worksheethealthyhabits 100207070236-phpapp02Worksheethealthyhabits 100207070236-phpapp02
Worksheethealthyhabits 100207070236-phpapp02
school
 
MANIPULACION DE CARPETAS
MANIPULACION DE CARPETASMANIPULACION DE CARPETAS
MANIPULACION DE CARPETAS
efrain19
 
Worksheetunhealthyhabits 100207070228-phpapp01
Worksheetunhealthyhabits 100207070228-phpapp01Worksheetunhealthyhabits 100207070228-phpapp01
Worksheetunhealthyhabits 100207070228-phpapp01
school
 
Ad

Similar to Java script unleashed (20)

OOPS JavaScript Interview Questions PDF By ScholarHat
OOPS JavaScript Interview Questions PDF By ScholarHatOOPS JavaScript Interview Questions PDF By ScholarHat
OOPS JavaScript Interview Questions PDF By ScholarHat
Scholarhat
 
Object oriented javascript
Object oriented javascriptObject oriented javascript
Object oriented javascript
Usman Mehmood
 
JavaScript Beyond jQuery
JavaScript Beyond jQueryJavaScript Beyond jQuery
JavaScript Beyond jQuery
Bobby Bryant
 
Intro to OOP
Intro to OOPIntro to OOP
Intro to OOP
Gant Laborde
 
Javascript Prototypal Inheritance - Big Picture
Javascript Prototypal Inheritance - Big PictureJavascript Prototypal Inheritance - Big Picture
Javascript Prototypal Inheritance - Big Picture
Manish Jangir
 
JavaScript OOPS Implimentation
JavaScript OOPS ImplimentationJavaScript OOPS Implimentation
JavaScript OOPS Implimentation
Usman Mehmood
 
Modeling Patterns for JavaScript Browser-Based Games
Modeling Patterns for JavaScript Browser-Based GamesModeling Patterns for JavaScript Browser-Based Games
Modeling Patterns for JavaScript Browser-Based Games
Ray Toal
 
JavaScript Programming
JavaScript ProgrammingJavaScript Programming
JavaScript Programming
Sehwan Noh
 
Java scriptforjavadev part2a
Java scriptforjavadev part2aJava scriptforjavadev part2a
Java scriptforjavadev part2a
Makarand Bhatambarekar
 
Oop java
Oop javaOop java
Oop java
Minal Maniar
 
Master in javascript
Master in javascriptMaster in javascript
Master in javascript
Robbin Zhao
 
"Javascript" por Tiago Rodrigues
"Javascript" por Tiago Rodrigues"Javascript" por Tiago Rodrigues
"Javascript" por Tiago Rodrigues
Núcleo de Electrónica e Informática da Universidade do Algarve
 
Javascriptinobject orientedway-090512225827-phpapp02
Javascriptinobject orientedway-090512225827-phpapp02Javascriptinobject orientedway-090512225827-phpapp02
Javascriptinobject orientedway-090512225827-phpapp02
Sopheak Sem
 
A Deeper look into Javascript Basics
A Deeper look into Javascript BasicsA Deeper look into Javascript Basics
A Deeper look into Javascript Basics
Mindfire Solutions
 
How to not suck at JavaScript
How to not suck at JavaScriptHow to not suck at JavaScript
How to not suck at JavaScript
tmont
 
Modern JavaScript Development @ DotNetToscana
Modern JavaScript Development @ DotNetToscanaModern JavaScript Development @ DotNetToscana
Modern JavaScript Development @ DotNetToscana
Matteo Baglini
 
ClassJS
ClassJSClassJS
ClassJS
Michael Barrett
 
Java Script Patterns
Java Script PatternsJava Script Patterns
Java Script Patterns
Allan Huang
 
Your java script library
Your java script libraryYour java script library
Your java script library
jasfog
 
JavaScript Workshop
JavaScript WorkshopJavaScript Workshop
JavaScript Workshop
Pamela Fox
 
OOPS JavaScript Interview Questions PDF By ScholarHat
OOPS JavaScript Interview Questions PDF By ScholarHatOOPS JavaScript Interview Questions PDF By ScholarHat
OOPS JavaScript Interview Questions PDF By ScholarHat
Scholarhat
 
Object oriented javascript
Object oriented javascriptObject oriented javascript
Object oriented javascript
Usman Mehmood
 
JavaScript Beyond jQuery
JavaScript Beyond jQueryJavaScript Beyond jQuery
JavaScript Beyond jQuery
Bobby Bryant
 
Javascript Prototypal Inheritance - Big Picture
Javascript Prototypal Inheritance - Big PictureJavascript Prototypal Inheritance - Big Picture
Javascript Prototypal Inheritance - Big Picture
Manish Jangir
 
JavaScript OOPS Implimentation
JavaScript OOPS ImplimentationJavaScript OOPS Implimentation
JavaScript OOPS Implimentation
Usman Mehmood
 
Modeling Patterns for JavaScript Browser-Based Games
Modeling Patterns for JavaScript Browser-Based GamesModeling Patterns for JavaScript Browser-Based Games
Modeling Patterns for JavaScript Browser-Based Games
Ray Toal
 
JavaScript Programming
JavaScript ProgrammingJavaScript Programming
JavaScript Programming
Sehwan Noh
 
Master in javascript
Master in javascriptMaster in javascript
Master in javascript
Robbin Zhao
 
Javascriptinobject orientedway-090512225827-phpapp02
Javascriptinobject orientedway-090512225827-phpapp02Javascriptinobject orientedway-090512225827-phpapp02
Javascriptinobject orientedway-090512225827-phpapp02
Sopheak Sem
 
A Deeper look into Javascript Basics
A Deeper look into Javascript BasicsA Deeper look into Javascript Basics
A Deeper look into Javascript Basics
Mindfire Solutions
 
How to not suck at JavaScript
How to not suck at JavaScriptHow to not suck at JavaScript
How to not suck at JavaScript
tmont
 
Modern JavaScript Development @ DotNetToscana
Modern JavaScript Development @ DotNetToscanaModern JavaScript Development @ DotNetToscana
Modern JavaScript Development @ DotNetToscana
Matteo Baglini
 
Java Script Patterns
Java Script PatternsJava Script Patterns
Java Script Patterns
Allan Huang
 
Your java script library
Your java script libraryYour java script library
Your java script library
jasfog
 
JavaScript Workshop
JavaScript WorkshopJavaScript Workshop
JavaScript Workshop
Pamela Fox
 
Ad

Recently uploaded (20)

Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
EduSkills OECD
 
Strengthened Senior High School - Landas Tool Kit.pptx
Strengthened Senior High School - Landas Tool Kit.pptxStrengthened Senior High School - Landas Tool Kit.pptx
Strengthened Senior High School - Landas Tool Kit.pptx
SteffMusniQuiballo
 
Nice Dream.pdf /
Nice Dream.pdf                              /Nice Dream.pdf                              /
Nice Dream.pdf /
ErinUsher3
 
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptxPests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Arshad Shaikh
 
Rai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptx
Rai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptxRai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptx
Rai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptx
Dr. Ravi Shankar Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
How to Create Time Off Request in Odoo 18 Time Off
How to Create Time Off Request in Odoo 18 Time OffHow to Create Time Off Request in Odoo 18 Time Off
How to Create Time Off Request in Odoo 18 Time Off
Celine George
 
Coleoptera: The Largest Insect Order.pptx
Coleoptera: The Largest Insect Order.pptxColeoptera: The Largest Insect Order.pptx
Coleoptera: The Largest Insect Order.pptx
Arshad Shaikh
 
What are the benefits that dance brings?
What are the benefits that dance brings?What are the benefits that dance brings?
What are the benefits that dance brings?
memi27
 
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Celine George
 
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
SweetytamannaMohapat
 
Adam Grant: Transforming Work Culture Through Organizational Psychology
Adam Grant: Transforming Work Culture Through Organizational PsychologyAdam Grant: Transforming Work Culture Through Organizational Psychology
Adam Grant: Transforming Work Culture Through Organizational Psychology
Prachi Shah
 
State institute of educational technology
State institute of educational technologyState institute of educational technology
State institute of educational technology
vp5806484
 
Pfeiffer "Secrets to Changing Behavior in Scholarly Communication: A 2025 NIS...
Pfeiffer "Secrets to Changing Behavior in Scholarly Communication: A 2025 NIS...Pfeiffer "Secrets to Changing Behavior in Scholarly Communication: A 2025 NIS...
Pfeiffer "Secrets to Changing Behavior in Scholarly Communication: A 2025 NIS...
National Information Standards Organization (NISO)
 
Optimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptxOptimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptx
UrmiPrajapati3
 
Hemiptera & Neuroptera: Insect Diversity.pptx
Hemiptera & Neuroptera: Insect Diversity.pptxHemiptera & Neuroptera: Insect Diversity.pptx
Hemiptera & Neuroptera: Insect Diversity.pptx
Arshad Shaikh
 
Parenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independenceParenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independence
Pooky Knightsmith
 
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptxDiptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Arshad Shaikh
 
How to Create a Stage or a Pipeline in Odoo 18 CRM
How to Create a Stage or a Pipeline in Odoo 18 CRMHow to Create a Stage or a Pipeline in Odoo 18 CRM
How to Create a Stage or a Pipeline in Odoo 18 CRM
Celine George
 
june 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptxjune 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptx
roger malina
 
How to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 SalesHow to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 Sales
Celine George
 
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
EduSkills OECD
 
Strengthened Senior High School - Landas Tool Kit.pptx
Strengthened Senior High School - Landas Tool Kit.pptxStrengthened Senior High School - Landas Tool Kit.pptx
Strengthened Senior High School - Landas Tool Kit.pptx
SteffMusniQuiballo
 
Nice Dream.pdf /
Nice Dream.pdf                              /Nice Dream.pdf                              /
Nice Dream.pdf /
ErinUsher3
 
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptxPests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Arshad Shaikh
 
How to Create Time Off Request in Odoo 18 Time Off
How to Create Time Off Request in Odoo 18 Time OffHow to Create Time Off Request in Odoo 18 Time Off
How to Create Time Off Request in Odoo 18 Time Off
Celine George
 
Coleoptera: The Largest Insect Order.pptx
Coleoptera: The Largest Insect Order.pptxColeoptera: The Largest Insect Order.pptx
Coleoptera: The Largest Insect Order.pptx
Arshad Shaikh
 
What are the benefits that dance brings?
What are the benefits that dance brings?What are the benefits that dance brings?
What are the benefits that dance brings?
memi27
 
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Celine George
 
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
SweetytamannaMohapat
 
Adam Grant: Transforming Work Culture Through Organizational Psychology
Adam Grant: Transforming Work Culture Through Organizational PsychologyAdam Grant: Transforming Work Culture Through Organizational Psychology
Adam Grant: Transforming Work Culture Through Organizational Psychology
Prachi Shah
 
State institute of educational technology
State institute of educational technologyState institute of educational technology
State institute of educational technology
vp5806484
 
Optimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptxOptimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptx
UrmiPrajapati3
 
Hemiptera & Neuroptera: Insect Diversity.pptx
Hemiptera & Neuroptera: Insect Diversity.pptxHemiptera & Neuroptera: Insect Diversity.pptx
Hemiptera & Neuroptera: Insect Diversity.pptx
Arshad Shaikh
 
Parenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independenceParenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independence
Pooky Knightsmith
 
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptxDiptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Arshad Shaikh
 
How to Create a Stage or a Pipeline in Odoo 18 CRM
How to Create a Stage or a Pipeline in Odoo 18 CRMHow to Create a Stage or a Pipeline in Odoo 18 CRM
How to Create a Stage or a Pipeline in Odoo 18 CRM
Celine George
 
june 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptxjune 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptx
roger malina
 
How to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 SalesHow to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 Sales
Celine George
 

Java script unleashed

  • 1. Dibyendu Shankar Tiwary Javascript Unleashed (Javascript that you need to know but might not!!)
  • 2. What is Javascript ? Introduction
  • 3. It makes the wall to talk Introduction
  • 4. What’s behind the scene? Introduction
  • 6. I know it all Tell me something which I don’t know
  • 7. Why are we here? JavaScript as a prototype-based language JavaScript Objects Are Dictionaries JavaScript Functions Are First Class Constructor Functions but No Classes Prototypes Object-oriented programming with JavaScript Static Properties and Methods Closures Simulating Private Properties Inheriting from Classes Coding tricks with JavaScript Simulating Namespaces Classes and Reflection Future of Javascript Should You Code JavaScript This Way? Putting It into Perspective
  • 8. JavaScript Objects Are Dictionaries Code Demo JavaScript Functions Are First Class Code Demo Constructor Functions but No Classes Code Demo (Dog spot = new Dog(); ) Prototypes (I deserve to be a header of a slide) As you wish, but be sure you gonna use it. JavaScript as a prototype-based language
  • 9. Every Function’s Prototype Has a Constructor Property  The prototype object is a central concept in object-oriented programming with JavaScript. Name comes from the idea that in JavaScript, an object is created as a copy of an existing example (that is, a prototype) object every function has a property named "prototype" that refers to a prototype object prototype object in turn has a property named "constructor," which refers back to the function itself (Confused ??) Code Demo : var buddy = new Dog(“Buddy“); Prototypes (Happy  )
  • 10. Objects Appear to Have Their Prototype’s Properties Code Demo Prototypes (Another slide conquered)
  • 11. Resolving toString() Method in the Prototype Chain Prototypes (Are you kinda hittin on me ??)
  • 12. Inheriting from a Prototype Changes made to a prototype object are immediately visible to the objects that inherit from it, even after these objects are created. If you define a property/method X in an object, a property/method of the same name will be hidden in that object’s prototype. For instance, you can override Object.prototype’s toString method by defining a toString method in Dog.prototype. Changes only go in one direction, from prototype to its derived objects, but not vice versa. Code Demo Prototypes (Name the session after me)
  • 13. Static Properties and Methods Code Demo Closure A closure is a runtime phenomenon that comes about when an inner function (or in C#, an inner anonymous method) is bound to the local variables of its outer function. Confused?? ( Code demo is for the rescue) Simulating Private Properties A local variable in a function is normally not accessible from outside the function However, when that local variable is captured by an inner function’s closure, it lives on. Code Demo javascript.crockford.com Inheriting from Classes (Even I deserve a slide, Ok whatever!!) Oops in Javascript
  • 14. Constructor functions and prototype objects allow you to simulate classes Can simulate private members of a class using closures You haven’t seen how you can derive from your class A local variable in a function is normally not accessible from outside the function However, when that local variable is captured by an inner function’s closure, it lives on. Code Demo javascript.crockford.com You have a base class Pet, with one derived class Dog. Stop talking show me the code. Inheritance from Classes (Happy  )
  • 15. Simulating Namespaces In C++ and C#, namespaces are used to minimize the probability of name collisions Code Demo Classes and Reflection there is no way to know the name of a function. it wouldn’t help us in most situations as a class constructor is typically built by assigning an anonymous function to a namespaced variable. The reflection APIs in ASP.NET AJAX work over any type. Coding tips and Tricks in JavaScript
  • 16. Should You Code JavaScript This Way? Should you code in JavaScript the way you code in C# or C++? Best practices for one language may not be the best practices for another Maybe, as Douglas Crockford says in his article " Prototypal Inheritance in JavaScript ", the JavaScript way of programming is to make prototype objects, and use the simple object function below to make new objects, which inherit from that original object: function object(o) { function F() {} F.prototype = o; return new F(); } Putting It into Perspective I have found my JavaScript journey a rewarding experience. Although not entirely without frustration along the way Registering Class Hierarchies and Calling Base. It’s a journey not a destination. Future of Javscript
  • 17. Thank you ( If you are confused now I have done a good job, if not then an exceptional job  )

Editor's Notes

  • #2: Hi, welcome everybody. Today let’s discuss about virtualization and how it helps to improve our productivity during day to day software development.
  • #3: . How the javascript evolution came to the being of what it is today, we have always designated javascript as a second fiddle language in our programming careers.
  • #4: The web becomes interactive and the wall talks back, it powers the web pages which start listening to your needs.
  • #5: Javascript sits with HTML abd CSS as one of the three pieces of modern web page construction. One must follow the trail of the structure (HTML), to style (CSS), and then to action (Javascript)
  • #9: So we’ve seen ways to create an object, complete with its properties and methods. But if you notice all the snippets above, the properties and methods are hardcoded within the object definition itself. What if you need more control over the object creation? For example, you may need to calculate the values of the object’s properties based on some parameters. Or you may need to initialize the object’s properties to the values that you’ll only have at run time. Or you may need to create more than one instance of the object, which is a very common requirement. In C#, we use classes to instantiate object instances. But JavaScript is different since it doesn’t have classes. Instead, as you’ll see in the next section, you take advantage of the fact that functions act as constructors when used together with the "new" operator.
  • #10: The prototype object is a central concept in object-oriented programming with JavaScript. Name comes from the idea that in JavaScript, an object is created as a copy of an existing example (that is, a prototype) object every function has a property named "prototype" that refers to a prototype object prototype object in turn has a property named "constructor," which refers back to the function itself (Confused ??) Code Demo : var buddy = new Dog(“Buddy“);
  • #12: Refer to the code in 4Prototype.aspx