Basics of JavaScript Classes (ECMASCRIPT)

Basics of JavaScript Classes (ECMASCRIPT)

ECMASCRIPT is a method of (concept of) using JavaScript as Object Oriented designing.  Knowing about this; help you to work on SharePoint Client Object Development, SharePoint Apps Development as well as any web development that involves JavaScript Objects)

There are few concepts you need to know. I will compare those using general OOP language (C#) and ECMASCRIPT. (C# vs. JavaScript)

Creating a Class

image image

Creating a Object

image image

Public and Private Properties

image image

Method Definition (in best way)

 image image

(NotePrototype is something like a template; we are assigning method save() to  the template thus it will not recreate the everything in the browser memory every type we are creating a object. so assigning the method to the prototype is the best way to do it.)

Inheritance

image image

Leave a Comment
  • Please add 4 and 1 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • I think, its good comparision. As a SharePoint developer, this mandatory to know these difference

  • Thanks SekThang!

Page 1 of 1 (2 items)