Skip to main content

Posts

Showing posts from 2013

ExtJS - Creating Development Standards in the Enterprise

Creating Development Standards in the Enterprise Working with the Enterprise Working at the enterprise-level can be both very cool and very frustrating. On the one hand, I get to build really challenging apps; but on the other hand, enterprise applications often target legacy browsers and are prohibited from using cutting-edge technologies. Having said that, I am starting to see many of our enterprise customers rethinking their development strategies and IT infrastructures: workstations are being upgraded to modern versions of Windows, and workers are being given more choices for a web browser. In some cases support for IE6 and IE7 are being dropped completely! More importantly, I am noticing that enterprises are standardizing their development platforms to create an ecosystem of applications that can be maintained by a diverse team of developers. Because Sencha tools and frameworks are becoming the preferred development platform in this ecosystem, the Professional Service

EXTJS4 mixins, dynamic loading Examples

List of classes to mix into other classes. For example: // app.js file  // if Musician don't have a sing method? Example1: Ext.define('Musician', { mixins: ['CanSing'] }); Ext.define('CanSing', { sing: function() { console.log("sing method called in CanSing class..."); } }); // TODO - to mix in two classes, both of which define sing? Ext.define('Musician', { constructor:function(){ console.log('Musician constructor'); }, initComponent:function(){ console.log('Musician initCom'); }, mixins: { canSing: 'CanSing' }, sing: function() { console.log("sing method called in Musician class.."); // delegate singing operation to mixin this.mixins.canSing.sing.call(this); } }); // Example2: Ext.define('CanPlayGuitar', {

Advanced concepts of Sencha Ext JS

- Ext.create Instantiate a class by either full name, alias or alternate name. If Ext.Loader is enabled and the class has not been defined yet, it will attempt to load the class via synchronous loading. // alias var window = Ext . create ( 'widget.window' , { width : 600 , height : 800 , ... }); // alternate name var window = Ext . create ( ' Ext.Window ' , { width : 600 , height : 800 , ... }); // full class name var window = Ext . create ( ' Ext.window.Window ' , { width : 600 , height : 800 , ... }); // single object with xclass property: var window = Ext . create ({ xclass : ' Ext.window.Window ' , // any valid value for 'name' (above) width : 600 , height : 800 , ... }); - Ext.define define( className, data, createdFn ) : Ext.Base Defines a class or override. A basic class is defined like this: Ext