SlideShare a Scribd company logo
JQUERY โ€“ INTERMEDIATE
1
ROAD MAP
2
1. JS - Present, Past & Future
2. Javascript Vs jQuery
3. JS Engine
4. Value & Identity
5. Class Vs Prototype
6. Object
7. Delegation
8. Closures
9. DOM & Left things (Next Time)
ALLONGE (FRENCH) = ELONGATE
3
4
JS โ€“ PRESENT, PAST & FUTURE
jQuery, Mootools, YUI etc(Client Side Framework)
Client Side Server Side
Angular JS(By Google)
Backbone JS
etc
Node JS
Narwhal
etc
WHAT WE CAN NOT DO IN JS
- File I/O
- Using Ajax, JavaScript can send a request to the server. This
request can read a file in XML or plain text format but it cannot write
to a file unless the file called on the server actually runs as a script
to do the file write for you.
- Networking
- DB APIs
- unless you use Ajax and have a server side script perform the
database accesses for you.
- So, Node or other JSs has come.
5
6
WHAT IS JAVASCRIPT ENGINE ?
A JavaScript engine is process virtual machine which interprets
and executes JavaScript (also known as ECMAScript).
Source โ€“ WiKi
Web Browsers Engine Used
FF SpiderMonkey
Chrome V8
Safari JavascriptCore
IE Chakra
7
VALUES & IDENTITY
var n = "1";
console.log(n==1);
console.log(n===1);
8
JAVASCRIPT BY OOPS, BUT NOT
"CLASS"-ICAL LANGUAGES.
- Object-Oriented
- Class โ€“ Object Relation
- But there are no classes in JavaScript. Functions can be
used to somewhat simulate classes.
- And when it comes to inheritance, objects inherit from
objects, not classes from classes as in the "class"-ical
languages.
- So, Java Script is NOT a "class"-ical languages.
9
CLASS VS PROTOTYPE
- Yes, there are no classes in JavaScript.
- But Functions can be used to somewhat simulate classes.
- A drawback of CLASS is that the method getInfo() is
recreated every time you create a new object.
- A more inexpensive way is to add getInfo() to the
prototype of the constructor function.
- Class - Based :
- Code reuse through Inheritance
- Class - Object communication
- Prototype - Based :
- Code reuse through delegation
- Class - Object communication
10
OBJECT
11
DELEGATION
12
DELEGATION OF MESSAGES
13
VARIABLE SCOPE
14
CLOSURES
15
EXAMPLE FOR CLOSURES
16
HOW CLOSURES WORKS?
17
18

More Related Content

PDF
Model with actors and implement with Akka
PPTX
Actor-based concurrency and Akka Fundamentals
PDF
Metaprogramming with javascript
PPT
Web development basics (Part-7)
PDF
Scala the-good-parts
PPTX
JavaScript Basics
KEY
Object oriented javascript
PPTX
Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)
Model with actors and implement with Akka
Actor-based concurrency and Akka Fundamentals
Metaprogramming with javascript
Web development basics (Part-7)
Scala the-good-parts
JavaScript Basics
Object oriented javascript
Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)

What's hot (20)

PDF
Continuations in scala ๏ผˆincomplete version๏ผ‰
PPTX
Object Oriented JavaScript - II
PPTX
Scala - the good, the bad and the very ugly
PPTX
Teaching old java script new tricks
PPTX
TypeScript Overview
PDF
Ustream vs Legacy, It's never too late to start your fight! #Jsist 2014
KEY
Actors and Threads
ย 
KEY
Hybrid concurrency patterns
PDF
JavaScript, quรฉ hermoso eres
PPTX
Introducing type script
PDF
Multithreading and Actors
PDF
Ruby is dying. What languages are cool now?
PDF
Java 8 new features
PDF
Javascript for Intermediates
PDF
Back to the future: Isomorphic javascript applications
PDF
Not So Foreign Functions
ย 
PDF
"Scala in Goozy", Alexey Zlobin
PDF
Lets talk-about-js
ย 
PDF
Kevin Whinnery: Write Better JavaScript
Continuations in scala ๏ผˆincomplete version๏ผ‰
Object Oriented JavaScript - II
Scala - the good, the bad and the very ugly
Teaching old java script new tricks
TypeScript Overview
Ustream vs Legacy, It's never too late to start your fight! #Jsist 2014
Actors and Threads
ย 
Hybrid concurrency patterns
JavaScript, quรฉ hermoso eres
Introducing type script
Multithreading and Actors
Ruby is dying. What languages are cool now?
Java 8 new features
Javascript for Intermediates
Back to the future: Isomorphic javascript applications
Not So Foreign Functions
ย 
"Scala in Goozy", Alexey Zlobin
Lets talk-about-js
ย 
Kevin Whinnery: Write Better JavaScript
Ad

Similar to jQuery (intermediate) (20)

PPTX
JavaScript in Object-Oriented Way
PDF
JavaScript Core
PPTX
You Don't Know Javascript
PDF
Javascript
PPTX
Javascriptinobject orientedway-090512225827-phpapp02
PDF
JavaScript No longer A โ€œtoyโ€ Language
PPTX
WT Unit-3 PPT.pptx
PDF
Hsc IT Chap 3. Advanced javascript-1.pdf
PDF
Evolving js
ย 
PPT
Introduction to Javascript
PDF
High quality Front-End
PPTX
Java script
PDF
Basics of JavaScript
PDF
Lecture7
ODP
Object Oriented Javascript
PDF
HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
PDF
WEB MODULE 3.pdf
PPTX
WT Module-3.pptx
PDF
Intro to javascript (4 week)
PPTX
js.pptx
JavaScript in Object-Oriented Way
JavaScript Core
You Don't Know Javascript
Javascript
Javascriptinobject orientedway-090512225827-phpapp02
JavaScript No longer A โ€œtoyโ€ Language
WT Unit-3 PPT.pptx
Hsc IT Chap 3. Advanced javascript-1.pdf
Evolving js
ย 
Introduction to Javascript
High quality Front-End
Java script
Basics of JavaScript
Lecture7
Object Oriented Javascript
HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
WEB MODULE 3.pdf
WT Module-3.pptx
Intro to javascript (4 week)
js.pptx
Ad

Recently uploaded (20)

PDF
WebRTC in SignalWire - troubleshooting media negotiation
PDF
Introduction to the IoT system, how the IoT system works
ย 
PPTX
Introuction about WHO-FIC in ICD-10.pptx
PDF
๐Ÿ’ฐ ๐”๐Š๐“๐ˆ ๐Š๐„๐Œ๐„๐๐€๐๐†๐€๐ ๐Š๐ˆ๐๐„๐‘๐Ÿ’๐ƒ ๐‡๐€๐‘๐ˆ ๐ˆ๐๐ˆ ๐Ÿ๐ŸŽ๐Ÿ๐Ÿ“ ๐Ÿ’ฐ
ย 
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PDF
Vigrab.top โ€“ Online Tool for Downloading and Converting Social Media Videos a...
PPTX
Power Point - Lesson 3_2.pptx grad school presentation
ย 
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
ย 
PPT
tcp ip networks nd ip layering assotred slides
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PDF
Slides PDF The World Game (s) Eco Economic Epochs.pdf
PPTX
Introduction to Information and Communication Technology
PDF
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
PPTX
INTERNET------BASICS-------UPDATED PPT PRESENTATION
PPTX
international classification of diseases ICD-10 review PPT.pptx
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PPTX
Funds Management Learning Material for Beg
PPTX
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
PPTX
Introuction about ICD -10 and ICD-11 PPT.pptx
WebRTC in SignalWire - troubleshooting media negotiation
Introduction to the IoT system, how the IoT system works
ย 
Introuction about WHO-FIC in ICD-10.pptx
๐Ÿ’ฐ ๐”๐Š๐“๐ˆ ๐Š๐„๐Œ๐„๐๐€๐๐†๐€๐ ๐Š๐ˆ๐๐„๐‘๐Ÿ’๐ƒ ๐‡๐€๐‘๐ˆ ๐ˆ๐๐ˆ ๐Ÿ๐ŸŽ๐Ÿ๐Ÿ“ ๐Ÿ’ฐ
ย 
Design_with_Watersergyerge45hrbgre4top (1).ppt
Job_Card_System_Styled_lorem_ipsum_.pptx
Vigrab.top โ€“ Online Tool for Downloading and Converting Social Media Videos a...
Power Point - Lesson 3_2.pptx grad school presentation
ย 
RPKI Status Update, presented by Makito Lay at IDNOG 10
ย 
tcp ip networks nd ip layering assotred slides
Module 1 - Cyber Law and Ethics 101.pptx
Slides PDF The World Game (s) Eco Economic Epochs.pdf
Introduction to Information and Communication Technology
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
INTERNET------BASICS-------UPDATED PPT PRESENTATION
international classification of diseases ICD-10 review PPT.pptx
Decoding a Decade: 10 Years of Applied CTI Discipline
Funds Management Learning Material for Beg
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
Introuction about ICD -10 and ICD-11 PPT.pptx

jQuery (intermediate)

  • 2. ROAD MAP 2 1. JS - Present, Past & Future 2. Javascript Vs jQuery 3. JS Engine 4. Value & Identity 5. Class Vs Prototype 6. Object 7. Delegation 8. Closures 9. DOM & Left things (Next Time)
  • 3. ALLONGE (FRENCH) = ELONGATE 3
  • 4. 4 JS โ€“ PRESENT, PAST & FUTURE jQuery, Mootools, YUI etc(Client Side Framework) Client Side Server Side Angular JS(By Google) Backbone JS etc Node JS Narwhal etc
  • 5. WHAT WE CAN NOT DO IN JS - File I/O - Using Ajax, JavaScript can send a request to the server. This request can read a file in XML or plain text format but it cannot write to a file unless the file called on the server actually runs as a script to do the file write for you. - Networking - DB APIs - unless you use Ajax and have a server side script perform the database accesses for you. - So, Node or other JSs has come. 5
  • 6. 6
  • 7. WHAT IS JAVASCRIPT ENGINE ? A JavaScript engine is process virtual machine which interprets and executes JavaScript (also known as ECMAScript). Source โ€“ WiKi Web Browsers Engine Used FF SpiderMonkey Chrome V8 Safari JavascriptCore IE Chakra 7
  • 8. VALUES & IDENTITY var n = "1"; console.log(n==1); console.log(n===1); 8
  • 9. JAVASCRIPT BY OOPS, BUT NOT "CLASS"-ICAL LANGUAGES. - Object-Oriented - Class โ€“ Object Relation - But there are no classes in JavaScript. Functions can be used to somewhat simulate classes. - And when it comes to inheritance, objects inherit from objects, not classes from classes as in the "class"-ical languages. - So, Java Script is NOT a "class"-ical languages. 9
  • 10. CLASS VS PROTOTYPE - Yes, there are no classes in JavaScript. - But Functions can be used to somewhat simulate classes. - A drawback of CLASS is that the method getInfo() is recreated every time you create a new object. - A more inexpensive way is to add getInfo() to the prototype of the constructor function. - Class - Based : - Code reuse through Inheritance - Class - Object communication - Prototype - Based : - Code reuse through delegation - Class - Object communication 10
  • 18. 18