PDA

View Full Version : Advice on approach



zobbo
30 Oct 2010, 12:21 PM
New to Ext JS and playing with the examples and trying to 'grok' stuff. I think I'm well on my way to understanding about 5% so far ;)

Imagine an application which has options on the left - stock, sales, products etc. Pretty standard database application. When the user clicks on the left hand option a grid appear on the right with a related edit form. So each section has a grid and edit form. The user can click multiple times on the left hand side and open up three stock screens for example in different tabs.

So I guess I have a grid subclass which contains the core functionality of all grids on the system. Do I then subclass that so I have a stock grid class, product grid class, sales grid class? Or do I just create instances of the one class and override the columns depending on the store the data is coming from?

Same question with the edit panel. Obviously the panels are all similar in terms of what they do (they edit the underlying record), but very different in the number of fields etc and complexity of the logic behind them.

This would be for an internal system. Currently it's using just plain HTML forms (the backend is Django), but would be nice to be able to use Ext JS for this.

Thanks for any advice.

Ian