19 Feb 2011 10:02 AM #1
Class System relative to Non-Component Creation
Is the new class system only for UI type Components or should it be used anytime the "new" keyword would be used; for example in creating a new Model, Store, etc. would it be advisable to use "Ext.define" instead of the "new" keyword instantiation.
It appears that the examples for the new Data package still use the "new" keyword in creating respective classes and therefore defining the namespace with Ext.ns would still be required.
Any thoughts on best practices.
22 Feb 2011 7:53 AM #2
Ext.define is not meant as a replacement for "new". Ext.define defines a class, while "new" creates an instance of a class.Netzke: Ruby on Rails and Ext JS component framework.
22 Feb 2011 9:49 AM #3
Thanks for the reply. I don't know why I was thinking instantiation when I should have been thinking definition as it appears Ext.define is being preferred over Ext.extend.
By extjs_mahendra in forum Ext 3.x: Help & DiscussionReplies: 4Last Post: 22 Dec 2009, 8:47 AM
By ry.extjs in forum Community DiscussionReplies: 119Last Post: 21 Jun 2009, 10:39 AM
By Animal in forum Ext 2.x: BugsReplies: 6Last Post: 18 Dec 2008, 3:55 PM
By bhardwajkumar_pravesh in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 4 Nov 2008, 7:44 AM