lundi 27 octobre 2014

Window scoped variables in Ext JS

Ours is a Ext JS 4 application and there a lot of global variables over period of time.

We have requirement of supporting modal windows wherein entire new page can be rendered in modal window.

We would obviously want to reuse majority of existing rendering logic since modal window layout will be identical.

Also we would want to use Ext windows instead of JS windows and since Ext windows have access to global variables, I guess we need a way of isolating the global variables to have window scope.

What is best way to approach this with existing set of global variables? Re factoring current application to put globals in singleton is better but still wouldn't solve problem of window scoped variables.

How to create window scoped variables, is using Ext Namespace feasible or do we need to maintain stack of window specific variables.


Any thoughts much appreciated...






Window scoped variables in Ext JS

Aucun commentaire:

Enregistrer un commentaire