PDA

View Full Version : How to reduce Complexity



pravin_bluebird
10 Aug 2007, 3:14 AM
Hello All,

My application contains lots of form and dialogs.
And most of my forms get open in Dialog..

I feel that ,writing a separate script for each dialog and form is not the right way of coding..

So, Can anyone suggest me the better way of achieving this.....So that both complexity and code will be reduce........

Any help will be greatly appreciated.


Regards

BernardChhun
10 Aug 2007, 5:09 AM
make a global dialog maker function that takes a body template, title and callback function that will run once the dialog is made.

will you need multiple dialogs open at the same time? if not, use the same dialog everytime by changing its content. if it's the case, count the number of dialogs that needs to be open at the same time and reduce its number to a minimum.