SlideShare a Scribd company logo
1 of 43
FrameworkPrototype
purpose of presentation is to write prototypal oop javascript application
prototype framework JavaScript Framework that aims to give  advanced class-driven features
language frameworks reusable set of libraries or classes that is designed to support a language in specific matter
language frameworks reusable set of libraries or classes that is designed to support a language in specific matter    such as  dotNet framework, jquery framework, Zend framework and prototype framework
javascript language object-oriented client-side scripting language
javascript language object-oriented client-side scripting language javascript is leading new era of windows applications
Fierce competition over javascript Prototype JS - Dojotoolkit - Developer.Yahoo - Spry Rico - Mootools - Sproutcore - Qooxdoo Midori JS - ArchetypeJS - SimpleJS - JQuery JS.Fleegix - Uize - Mochikit - Rialto
Fierce competition over javascript Prototype JS - Dojotoolkit - Developer.Yahoo - Spry Rico - Mootools - Sproutcore - Qooxdoo Midori JS - ArchetypeJS - SimpleJS - jQuery JS.Fleegix - Uize - Mochikit - Rialto
Top frameworks
Top frameworks jQuery : the highest functionality Spry : the best ajax framework prototype : the best oop supporter
Top frameworks jQuery : the highest functionality Spry : the best ajax framework prototype : the best oop supporter (this is why..?)
How to install..? http://www.prototypejs.org/ download v1.7.0.1 since November 16, 2010 <script type="text/javascript" src="prototype.js"> </script>
oop concepts 1- Encapsulation or classification 2- Data abstraction 3- Inheritance 4- Polymorphism
oop concepts 1- Encapsulation or classification 2- Data abstraction 3- Inheritance 4- Polymorphism 5- Aggregation or containment
Encapsulation classification of methods and properties that is every class is capsule then the instance of the class is called
Encapsulation classification of methods and properties that is every class is capsule then the instance of the class is called object
javascript Encapsulation class-less .. classes .. methods .. constrictors defined as function no direct access modifiers
class decleration function Class_Name(parameters) { this.property_name = value; this.method_name = methodName;	 }  //or class declaration is the constructor function Class_Name(parameters) { this.property_name = value; this.method_name = function methodName(){...};	 }
prototype class decleration varClass_Name = Class.create(); Class_Name.prototype = {  initialize: function(parameters){ //constructor  this.property_name1 = value1;  this.property_name2 = value2; } method_name:function(parameters)  {......} }
prototype class decleration varClass_Name = Class.create( {  initialize: function(parameters){ //constructor  this.property_name1 = value1;  this.property_name2 = value2; } method_name:function(parameters)  {......} });
instancing varobj = new Class_Name(parameters); var x = obj.property_name; obj.method_name();
javascript modifiers public  private  priviliged
javascript modifiers public: can be accessed from outside the class  function Class_Name(parameters) { this.method_name = methodName;	 } //or function Class_Name(parameters) { Class_Name.prototype.method_name = methodName; obj.method_name();}
javascript modifiers private : can't be accessed from outside the class //basic idea is that the member isn't included by this keyword function Class_Name(parameters) {  function methodName(){}	 } obj.methodName();
javascript modifiers private : can't be accessed from outside the class //basic idea is that the member isn't included by this keyword function Class_Name(parameters) {  function methodName(){}	 } obj.methodName();
javascript modifiers priviliged : public function that is in the class  that can access private methods function Class_Name(parameters) {  function methodName(){...} this.pmethod_name =   function(){methodName();};	 } //or function Class_Name(parameters) {  function methodName(){...} Class_Name.prototype.pmethod_name =   function(){methodName();};	 } obj.pmethod_name();
Data abstraction  the process of making Summarized description  for the common area of properties and methods that is not a class
Data abstraction  the process of making Summarized description  for the common area of properties and methods that is not a class  No real data abstraction in client-scripting
Inheritance relation between classes when a class has  all the properties and methods of the other the small is called parent
javascript Inheritance classical or class-based Inheritance prototypal Inheritance
classical inheritance /* we include the parent in the son  class by the running of the parent  class as part of the son */  function parent(parameters) {...} function son(){ this.inheritFrom = parent; this.inheritFrom(parameters); }
prototypal Inheritance Object.extend(parentobj,sonobj) and if sonobj was not created yet then.... Class.create(Object.extend(parentobj,sonobj))
prototypal Inheritance var parent = Class.create({....}); var son = class.create(Object.extend( new parent(),{......}));
polymorphism the method apperance in many-shapes among inherited classes and every class implements  its own method then only one is called()
polymorphism
polymorphism
polymorphism Only key marking is supported in javascript for accessing the higher polymorphic method  we use $super we need just Class.create() Class.create(parent,sonobj);
polymorphism var parent = Class.create({ method_name:function(parameters){....} }); var son = class.create(parent,{ method_name: function($super,parameters) {$super(parameters)} });
Aggregation the concept that is talking about the  ability of class to contain another object
Key Words mix-in modules  Native extensions Value and refrence in prototype Prototype DOM support Prototype API’s JSON in prototype
Prototype Framework
Prototype Framework Prototype Creator

More Related Content

What's hot

java-06inheritance
java-06inheritancejava-06inheritance
java-06inheritance
Arjun Shanka
 
Classes, objects in JAVA
Classes, objects in JAVAClasses, objects in JAVA
Classes, objects in JAVA
Abhilash Nair
 

What's hot (19)

Oops in Java
Oops in JavaOops in Java
Oops in Java
 
Overloading and overriding in vb.net
Overloading and overriding in vb.netOverloading and overriding in vb.net
Overloading and overriding in vb.net
 
Only oop
Only oopOnly oop
Only oop
 
Seminar on java
Seminar on javaSeminar on java
Seminar on java
 
Multiple inheritance possible in Java
Multiple inheritance possible in JavaMultiple inheritance possible in Java
Multiple inheritance possible in Java
 
java-06inheritance
java-06inheritancejava-06inheritance
java-06inheritance
 
Classes, objects in JAVA
Classes, objects in JAVAClasses, objects in JAVA
Classes, objects in JAVA
 
04 inheritance
04 inheritance04 inheritance
04 inheritance
 
PHP- Introduction to Object Oriented PHP
PHP-  Introduction to Object Oriented PHPPHP-  Introduction to Object Oriented PHP
PHP- Introduction to Object Oriented PHP
 
JavaScript OOPS Implimentation
JavaScript OOPS ImplimentationJavaScript OOPS Implimentation
JavaScript OOPS Implimentation
 
‫Object Oriented Programming_Lecture 3
‫Object Oriented Programming_Lecture 3‫Object Oriented Programming_Lecture 3
‫Object Oriented Programming_Lecture 3
 
Java inheritance
Java inheritanceJava inheritance
Java inheritance
 
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteChapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
 
Inheritance and Polymorphism Java
Inheritance and Polymorphism JavaInheritance and Polymorphism Java
Inheritance and Polymorphism Java
 
Class and object
Class and objectClass and object
Class and object
 
Oops concepts in php
Oops concepts in phpOops concepts in php
Oops concepts in php
 
Object oreinted php | OOPs
Object oreinted php | OOPsObject oreinted php | OOPs
Object oreinted php | OOPs
 
Oops in java
Oops in javaOops in java
Oops in java
 
Java Programming - Inheritance
Java Programming - InheritanceJava Programming - Inheritance
Java Programming - Inheritance
 

Similar to Framework prototype

Object oriented programming in php
Object oriented programming in phpObject oriented programming in php
Object oriented programming in php
Aashiq Kuchey
 
Php object orientation and classes
Php object orientation and classesPhp object orientation and classes
Php object orientation and classes
Kumar
 
Classes and objects
Classes and objectsClasses and objects
Classes and objects
Ashok Kumar
 
OOPS IN PHP.pptx
OOPS IN PHP.pptxOOPS IN PHP.pptx
OOPS IN PHP.pptx
rani marri
 
Introduction to OOP with PHP
Introduction to OOP with PHPIntroduction to OOP with PHP
Introduction to OOP with PHP
Michael Peacock
 
Advance java kvr -satya
Advance java  kvr -satyaAdvance java  kvr -satya
Advance java kvr -satya
Satya Johnny
 

Similar to Framework prototype (20)

Object oriented programming in php
Object oriented programming in phpObject oriented programming in php
Object oriented programming in php
 
Class 7 - PHP Object Oriented Programming
Class 7 - PHP Object Oriented ProgrammingClass 7 - PHP Object Oriented Programming
Class 7 - PHP Object Oriented Programming
 
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
 
Php object orientation and classes
Php object orientation and classesPhp object orientation and classes
Php object orientation and classes
 
Classes and objects
Classes and objectsClasses and objects
Classes and objects
 
OOPS IN PHP.pptx
OOPS IN PHP.pptxOOPS IN PHP.pptx
OOPS IN PHP.pptx
 
Object oriented javascript
Object oriented javascriptObject oriented javascript
Object oriented javascript
 
php_final_sy_semIV_notes_vision.pdf
php_final_sy_semIV_notes_vision.pdfphp_final_sy_semIV_notes_vision.pdf
php_final_sy_semIV_notes_vision.pdf
 
php_final_sy_semIV_notes_vision (3).pdf
php_final_sy_semIV_notes_vision (3).pdfphp_final_sy_semIV_notes_vision (3).pdf
php_final_sy_semIV_notes_vision (3).pdf
 
php_final_sy_semIV_notes_vision.pdf
php_final_sy_semIV_notes_vision.pdfphp_final_sy_semIV_notes_vision.pdf
php_final_sy_semIV_notes_vision.pdf
 
php_final_sy_semIV_notes_vision.pdf
php_final_sy_semIV_notes_vision.pdfphp_final_sy_semIV_notes_vision.pdf
php_final_sy_semIV_notes_vision.pdf
 
Introduction to OOP with PHP
Introduction to OOP with PHPIntroduction to OOP with PHP
Introduction to OOP with PHP
 
Adv kvr -satya
Adv  kvr -satyaAdv  kvr -satya
Adv kvr -satya
 
Advance java kvr -satya
Advance java  kvr -satyaAdvance java  kvr -satya
Advance java kvr -satya
 
Object oriented programming in php 5
Object oriented programming in php 5Object oriented programming in php 5
Object oriented programming in php 5
 
Object oriented programming in php 5
Object oriented programming in php 5Object oriented programming in php 5
Object oriented programming in php 5
 
UNIT III (8).pptx
UNIT III (8).pptxUNIT III (8).pptx
UNIT III (8).pptx
 
UNIT III (8).pptx
UNIT III (8).pptxUNIT III (8).pptx
UNIT III (8).pptx
 
Object Oriented PHP by Dr.C.R.Dhivyaa Kongu Engineering College
Object Oriented PHP by Dr.C.R.Dhivyaa Kongu Engineering CollegeObject Oriented PHP by Dr.C.R.Dhivyaa Kongu Engineering College
Object Oriented PHP by Dr.C.R.Dhivyaa Kongu Engineering College
 
Java Reflection Concept and Working
Java Reflection Concept and WorkingJava Reflection Concept and Working
Java Reflection Concept and Working
 

More from DevMix (15)

Framework prototype
Framework prototypeFramework prototype
Framework prototype
 
Framework prototype
Framework prototypeFramework prototype
Framework prototype
 
Devmix algorithm
Devmix algorithmDevmix algorithm
Devmix algorithm
 
Select your career
Select your careerSelect your career
Select your career
 
Devmix algorithm
Devmix algorithmDevmix algorithm
Devmix algorithm
 
New in html5
New in html5New in html5
New in html5
 
Algorithms
AlgorithmsAlgorithms
Algorithms
 
Intro To DataBase
Intro To DataBaseIntro To DataBase
Intro To DataBase
 
Intro to windows app
Intro to windows appIntro to windows app
Intro to windows app
 
OOP in C#
OOP in C#OOP in C#
OOP in C#
 
Logos samples
Logos samplesLogos samples
Logos samples
 
C sharp fundamentals Part I
C sharp fundamentals Part IC sharp fundamentals Part I
C sharp fundamentals Part I
 
Python
PythonPython
Python
 
Making a presentation
Making a presentationMaking a presentation
Making a presentation
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Recently uploaded (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

Framework prototype

  • 2. purpose of presentation is to write prototypal oop javascript application
  • 3. prototype framework JavaScript Framework that aims to give advanced class-driven features
  • 4. language frameworks reusable set of libraries or classes that is designed to support a language in specific matter
  • 5. language frameworks reusable set of libraries or classes that is designed to support a language in specific matter such as dotNet framework, jquery framework, Zend framework and prototype framework
  • 6. javascript language object-oriented client-side scripting language
  • 7. javascript language object-oriented client-side scripting language javascript is leading new era of windows applications
  • 8. Fierce competition over javascript Prototype JS - Dojotoolkit - Developer.Yahoo - Spry Rico - Mootools - Sproutcore - Qooxdoo Midori JS - ArchetypeJS - SimpleJS - JQuery JS.Fleegix - Uize - Mochikit - Rialto
  • 9. Fierce competition over javascript Prototype JS - Dojotoolkit - Developer.Yahoo - Spry Rico - Mootools - Sproutcore - Qooxdoo Midori JS - ArchetypeJS - SimpleJS - jQuery JS.Fleegix - Uize - Mochikit - Rialto
  • 11. Top frameworks jQuery : the highest functionality Spry : the best ajax framework prototype : the best oop supporter
  • 12. Top frameworks jQuery : the highest functionality Spry : the best ajax framework prototype : the best oop supporter (this is why..?)
  • 13. How to install..? http://www.prototypejs.org/ download v1.7.0.1 since November 16, 2010 <script type="text/javascript" src="prototype.js"> </script>
  • 14. oop concepts 1- Encapsulation or classification 2- Data abstraction 3- Inheritance 4- Polymorphism
  • 15. oop concepts 1- Encapsulation or classification 2- Data abstraction 3- Inheritance 4- Polymorphism 5- Aggregation or containment
  • 16. Encapsulation classification of methods and properties that is every class is capsule then the instance of the class is called
  • 17. Encapsulation classification of methods and properties that is every class is capsule then the instance of the class is called object
  • 18. javascript Encapsulation class-less .. classes .. methods .. constrictors defined as function no direct access modifiers
  • 19. class decleration function Class_Name(parameters) { this.property_name = value; this.method_name = methodName; } //or class declaration is the constructor function Class_Name(parameters) { this.property_name = value; this.method_name = function methodName(){...}; }
  • 20. prototype class decleration varClass_Name = Class.create(); Class_Name.prototype = { initialize: function(parameters){ //constructor this.property_name1 = value1; this.property_name2 = value2; } method_name:function(parameters) {......} }
  • 21. prototype class decleration varClass_Name = Class.create( { initialize: function(parameters){ //constructor this.property_name1 = value1; this.property_name2 = value2; } method_name:function(parameters) {......} });
  • 22. instancing varobj = new Class_Name(parameters); var x = obj.property_name; obj.method_name();
  • 23. javascript modifiers public private priviliged
  • 24. javascript modifiers public: can be accessed from outside the class function Class_Name(parameters) { this.method_name = methodName; } //or function Class_Name(parameters) { Class_Name.prototype.method_name = methodName; obj.method_name();}
  • 25. javascript modifiers private : can't be accessed from outside the class //basic idea is that the member isn't included by this keyword function Class_Name(parameters) { function methodName(){} } obj.methodName();
  • 26. javascript modifiers private : can't be accessed from outside the class //basic idea is that the member isn't included by this keyword function Class_Name(parameters) { function methodName(){} } obj.methodName();
  • 27. javascript modifiers priviliged : public function that is in the class that can access private methods function Class_Name(parameters) { function methodName(){...} this.pmethod_name = function(){methodName();}; } //or function Class_Name(parameters) { function methodName(){...} Class_Name.prototype.pmethod_name = function(){methodName();}; } obj.pmethod_name();
  • 28. Data abstraction the process of making Summarized description for the common area of properties and methods that is not a class
  • 29. Data abstraction the process of making Summarized description for the common area of properties and methods that is not a class No real data abstraction in client-scripting
  • 30. Inheritance relation between classes when a class has all the properties and methods of the other the small is called parent
  • 31. javascript Inheritance classical or class-based Inheritance prototypal Inheritance
  • 32. classical inheritance /* we include the parent in the son class by the running of the parent class as part of the son */ function parent(parameters) {...} function son(){ this.inheritFrom = parent; this.inheritFrom(parameters); }
  • 33. prototypal Inheritance Object.extend(parentobj,sonobj) and if sonobj was not created yet then.... Class.create(Object.extend(parentobj,sonobj))
  • 34. prototypal Inheritance var parent = Class.create({....}); var son = class.create(Object.extend( new parent(),{......}));
  • 35. polymorphism the method apperance in many-shapes among inherited classes and every class implements its own method then only one is called()
  • 38. polymorphism Only key marking is supported in javascript for accessing the higher polymorphic method we use $super we need just Class.create() Class.create(parent,sonobj);
  • 39. polymorphism var parent = Class.create({ method_name:function(parameters){....} }); var son = class.create(parent,{ method_name: function($super,parameters) {$super(parameters)} });
  • 40. Aggregation the concept that is talking about the ability of class to contain another object
  • 41. Key Words mix-in modules Native extensions Value and refrence in prototype Prototype DOM support Prototype API’s JSON in prototype