Simplifying Objects and Inheritance in JavaScript

Slides:



Advertisements
Similar presentations
Dhananjay Microsoft MVP
Advertisements

Advanced JS The World's Most Misunderstood Programming Language ) Douglas Crockford( Shimon Dahan
Fall 2007ACS-1805 Ron McFadyen1 Programming Concepts Chapter 4 introduces more advanced OO programming techniques. Construction of a programs usually requires:
How to Write Unit Tests in C#
Agenda What is AJAX? What is jQuery? Demonstration/Tutorial Resources Q&A.
SednaSpace A software development platform for all delivers SOA and BPM.
Getting Started with the ASP.NET Web API Dhananjay Kumar Infragistics Consultant Microsoft MVP
Advanced JavaScript Course Introduction SoftUni Team Technical Trainers Software University
DTS Conversion to SSIS Conversion Best Practices Mike Davis
Chapter 8 Browsing and Searching the Web. 2Practical PC 5 th Edition Chapter 8 Getting Started In this Chapter, you will learn: − What is a Web page −
Google Apps (Education Edition) A step guide to a successful deployment January 10 th, 2008 California Technology Assistance Project
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
Working with Forms and Regular Expressions Validating a Web Form with JavaScript.
Prototypal Inheritance. Can We Do Inheritance Without Classes? How do we share behaviour across objects.
Constructors & Garbage Collection Ch. 9 – Head First Java.
Getting started with ASP.NET MVC Dhananjay
Here Comes the Bus. What is Here Comes the Bus? We are pleased to announce the implementation of Synovia, Here Comes the Bus for the school.
New Communication Platform of Our Class.
Rich Internet Applications 2. Core JavaScript. The importance of JavaScript Many choices open to the developer for server-side Can choose server technology.
JavaScript for C# developers Dhananjay Microsoft MVP
Prototype Chain and Inheritance Prototype chain, Inheritance, Accessing Base Members Software University Technical Trainers SoftUni Team.
Simplifying the Code First Approach in the Entity Framework Dhananjay Kumar Infragistics Consultant Microsoft MVP
How to implement the Repository Pattern in an ASP.NET MVC Application Dhananjay Kumar Developer Evangelist – Infragistics Microsoft MVP
Object Oriented JavaScript. JavaScript Really only 4 types in JavaScript – number, string, boolean – Object (includes arrays) Remember that an object.
CPS120: Introduction to Computer Science Lecture 16A Object-Oriented Concepts.
Talks! Tour GrantStation: Your Fast Track to Funding Audio is only available by calling this number: Conference Call: ; Access Code:
UNIT TESTING IN ANGULARJS Dhananjay
Fox Scientific, Inc. ONLINE ORDERING 101. Welcome to our website On our main page you can find current promotions, the vendors we offer, technical references.
Advanced JavaScript Course Introduction SoftUni Team Technical Trainers Software University
Angularjs 2.0 : Getting started
A deep dive into Azure AD B2C
Introduction to ASP.NET Core
Welcome! Back To School for Families.
Kindernews Mrs. Walk – January 9-13 Math Peek-at-the-Week Author Study
Chapter 8 Browsing and Searching the Web
AA Trees.
Welcome to Room 17 Ms. Haukeli.
Development of Internet Applications jQuery, TypeScript, LESS
SPC Developer 6/10/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Introduction to Redux Header Eric W. Greene Microsoft Virtual Academy
Welcome On your index card please write the following information:
Solving the Hard Problems
Game-Changing Features in ES2015
Mrs. Scott’s Classroom News
Mrs. Martin First Grade Room 405
Inheritance and Prototypes
Open the Bundling Module Under Your Tree
KnockoutJS -Pradeep Shet 31st August 2014.
9/11/ :59 PM THR3021 Why Microsoft is updating the new OneDrive sync engine in a different way Hans Brender Cloud Productivity Evangelist Bright.
Student Engagement with Interactive Polling
Displaying Form Validation Info
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
If You Want to Earn All A’s…
Step by Step - AngularJS
Inheritance Constructors & Overriden Functions
Bring existing desktop apps to UWP with the Desktop Bridge
Workflows to Hit the Ground Running (Quote > Win > Deliver)
Input CS 422: UI Design and Programming
Welcome to Kindergarten
My prototype scheduler
Important Transportation Information
My prototype scheduler
POWER POINT ADD YOUR TEXT ADD YOUR TEXT
SAP UI5 Online Training helps you to get experience in the features for real-time implementation by using predefined JavaScript libraries to design new.
Inheritance and Polymorphism
Dear 6th Grade Families, I’d like to welcome you and your child to the 6th grade at ESUMS. This year, the 6th grade team will be using Remind to help.
Angular 2 : CRUD Operations
Welcome to Kindergarten !
02 | Angular Controllers Stacey Mulcahy | Technical Evangelist
Vivek Bavishi aka That API Guy
Presentation transcript:

Simplifying Objects and Inheritance in JavaScript Dhananjay Kumar @debug_mode http://debugmode.net

Important points Tweet your experience about webinar using the hashtag #Infragistics or tag @infragistics to win cool goodies from us. Recording of webinar will be available by Wednesday on Infragistics blog. You will also get Email notification for uploaded recording We welcome all of you to take advantage of a FREE 30 Day Trial by downloading the product at: http://www.infragistics.com/products/ultimate/download Please reach out to us at Sales-India@infragistics.com for any follow up questions you may have. We welcome the opportunity to assist you.

I am Dhananjay Kumar Infragistics Developer Evangelist 6 times Microsoft MVP @debug_mode dkumar@infragistics.com http://debugmode.net

Ignite UI = ig jQuery library http://www.igniteui.com

Agenda Object literal Function constructor Revealing pattern Understanding value of “this” __proto__ property of object Prototype value of function Inheritance using __proto__ and prototype Object.create() method for object construction Creating inheritance chain

Running JavaScript I am using Sublime Text to write JavaScript Running JavaScript using NodeJS Pressing CTRL+B to run JavaScript and see the output in sublime http://debugmode.net/2013/11/07/how-to-setup-javascript-build-in-sublime-text-2/

We are going to write more codes and less PPT

Object in JavaScript Object Object.create Object as literal Function constructor

Object properties Properties can be added to an object at any time. A property can be added to an object after its creation too. In the object’s method, current object is defined by value “this”. Other object can also be passed as value of “this”. Calling a function as method is known as “Method Invocation Pattern”.

Prototype of function Every function has a prototype property A function prototype is the object instance which eventually becomes prototype of all the objects created using that function constructor Object does not have prototype property Function prototype value is an object instance which will become prototype of all the objects created using this function as constructor.

__proto__ of object Every object has a __proto__ property Object __proto__ value is set to the object instance from which object is inherited __proto__ is used for object inheritance Function does not have __proto__ property Object __proto__ is object instance from which the object is inherited.

__proto__ based inheritance JavaScript supports prototype based inheritance In JavaScript objects inherit each other. Parent object is also known as prototype of child object in JavaScript. In JavaScript inheritance is implemented through (for objects) special property __proto__ To access a property, JavaScript first searches objects, if it does not find it, it searches that in __proto__ property of object. In modern browser __proto__ property is also known as prototype property.

JavaScript inheritance Very first it searches property in the current object. If it finds it, it uses it. If it does not find property in the current object, it searches the property in the __proto__ values of the object. It traverse in the tree until __proto__ value becomes null. Value of “this” is always set to current object regardless the value of __proto__ or prototype

Q& A ?

Summary Object literal Function constructor Revealing pattern Understanding value of “this” __proto__ property of object Prototype value of function Inheritance using __proto__ and prototype Object.create() method for object construction Creating inheritance chain

What Infragistics can offer you? We welcome all of you to take advantage of a FREE 30 Day Trial by downloading the product at: http://www.infragistics.com/products/ultimate/download Please reach out to us at Sales-India@infragistics.com for any follow up questions you may have. We welcome the opportunity to assist you. For technical queries send me email at dkumar@infragistics.com