Download - J query (intermediate)
![Page 1: J query (intermediate)](https://reader036.vdocuments.site/reader036/viewer/2022062418/555e2414d8b42a6a4c8b4dba/html5/thumbnails/1.jpg)
1
JQUERY – INTERMEDIATE
![Page 2: J query (intermediate)](https://reader036.vdocuments.site/reader036/viewer/2022062418/555e2414d8b42a6a4c8b4dba/html5/thumbnails/2.jpg)
2
ROAD MAP
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)
![Page 3: J query (intermediate)](https://reader036.vdocuments.site/reader036/viewer/2022062418/555e2414d8b42a6a4c8b4dba/html5/thumbnails/3.jpg)
3ALLONGE (FRENCH) = ELONGATE
![Page 4: J query (intermediate)](https://reader036.vdocuments.site/reader036/viewer/2022062418/555e2414d8b42a6a4c8b4dba/html5/thumbnails/4.jpg)
4
JS – PRESENT, PAST & FUTUREJava Script
jQuery, Mootools, YUI etc(Client Side Framework)
MVC (Model, View & Controller)
Client Side Server Side
Angular JS(By Google)Backbone JS
etc
Node JSNarwhal
etc
![Page 5: J query (intermediate)](https://reader036.vdocuments.site/reader036/viewer/2022062418/555e2414d8b42a6a4c8b4dba/html5/thumbnails/5.jpg)
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.
![Page 6: J query (intermediate)](https://reader036.vdocuments.site/reader036/viewer/2022062418/555e2414d8b42a6a4c8b4dba/html5/thumbnails/6.jpg)
6
![Page 7: J query (intermediate)](https://reader036.vdocuments.site/reader036/viewer/2022062418/555e2414d8b42a6a4c8b4dba/html5/thumbnails/7.jpg)
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
![Page 8: J query (intermediate)](https://reader036.vdocuments.site/reader036/viewer/2022062418/555e2414d8b42a6a4c8b4dba/html5/thumbnails/8.jpg)
8
VALUES & IDENTITY
var n = "1";
console.log(n==1);
console.log(n===1);
![Page 9: J query (intermediate)](https://reader036.vdocuments.site/reader036/viewer/2022062418/555e2414d8b42a6a4c8b4dba/html5/thumbnails/9.jpg)
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.
![Page 10: J query (intermediate)](https://reader036.vdocuments.site/reader036/viewer/2022062418/555e2414d8b42a6a4c8b4dba/html5/thumbnails/10.jpg)
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
![Page 11: J query (intermediate)](https://reader036.vdocuments.site/reader036/viewer/2022062418/555e2414d8b42a6a4c8b4dba/html5/thumbnails/11.jpg)
11
OBJECT
![Page 12: J query (intermediate)](https://reader036.vdocuments.site/reader036/viewer/2022062418/555e2414d8b42a6a4c8b4dba/html5/thumbnails/12.jpg)
12
DELEGATION
![Page 13: J query (intermediate)](https://reader036.vdocuments.site/reader036/viewer/2022062418/555e2414d8b42a6a4c8b4dba/html5/thumbnails/13.jpg)
13
DELEGATION OF MESSAGES
![Page 14: J query (intermediate)](https://reader036.vdocuments.site/reader036/viewer/2022062418/555e2414d8b42a6a4c8b4dba/html5/thumbnails/14.jpg)
14
VARIABLE SCOPE
![Page 15: J query (intermediate)](https://reader036.vdocuments.site/reader036/viewer/2022062418/555e2414d8b42a6a4c8b4dba/html5/thumbnails/15.jpg)
15
CLOSURES
![Page 16: J query (intermediate)](https://reader036.vdocuments.site/reader036/viewer/2022062418/555e2414d8b42a6a4c8b4dba/html5/thumbnails/16.jpg)
16
EXAMPLE FOR CLOSURES
![Page 17: J query (intermediate)](https://reader036.vdocuments.site/reader036/viewer/2022062418/555e2414d8b42a6a4c8b4dba/html5/thumbnails/17.jpg)
17
HOW CLOSURES WORKS?
![Page 18: J query (intermediate)](https://reader036.vdocuments.site/reader036/viewer/2022062418/555e2414d8b42a6a4c8b4dba/html5/thumbnails/18.jpg)
18