Loading
 
What's Next: View All Tutorial →

Extjs MVC, Ext.define() and Ext.create()

Ext.define() is used to create a class. Ext.create() is used to create a object of the class. With relate to Java,  Ext.define is like creating class   public class Employee{ private String empName; } Ext.create is like ...

Published Date: 17/09/2014  Last Modified Date: 17/09/2014    New Post



Ext.define() is used to create a class.

Ext.create() is used to create a object of the class.


With relate to Java,  Ext.define is like creating class
 
public class  Employee{
    private String empName;
}
Ext.create is like initializing object
 
Employee e= new Employee();
 

Syntax in EXT js

 
Ext.Define("App.view.Employee",{
   empName:null,
   getName: function(){
      alert(this.empName)
    }   
});
var e= Ext.create('Employee');
e.empName='John';
e.getName();



 
Awaiting for Administrator approval





Tags: Basic Oops Concept

← Back to list


Related Post




×