StrataFrame Forum

Best practice

http://forum.strataframe.net/Topic10539.aspx

By Teddy Jensen - 7/24/2007

Hi,

I am developing an application with an employee maintenance form that will have about 25 childforms or so. I have done some of the child modules now with the childform dialog, so that the parent (employee form) have its primary bo, a lot of bo's for lookup fields (i.e. city in a zip/city table), the child bo's and the childform dialogs with the bo translations.

All is working but i don't know if this is the best way with a form with so many childforms and thereby so many bo's. (i might end up with more than 50 bo's to one form).

I have checked the helpfile and searched the forum, and i don't see this addressed before.

Can any of you provide me with some info on best practice with SF regarding this or maybe tell a little about the way you do it, when you have a form with several childforms?

TIA.

/Teddy

By Greg McGuffey - 7/24/2007

One thing to consider, if you're users are remote (can't remember if they are or not), but that many BOs has the potential to really slow down the opening of the form.  I'd definitly control when they get loaded (i.e. not load them all when the form opens) if there is any chance of network/database latency.
By StrataFrame Team - 7/25/2007

Other than the startup time considerations as the form instantiates, you can have as many BOs on the form as you need. 
By Greg McGuffey - 7/25/2007

There are two things I've done when managing lots of BOs with there associated controls on a form:



1. use the panelmanager or a tab and then when a page activates, load the data that page needs. Lots of the time, each page is using a single BO, so it's pretty effecient. This is generally a single private function with a select case statement on the page's name, called from the page activated event.



2. externally define pages (I've done panelmanagerpages or wizardpages so far) that have the UI and the BO one them. They are kind of sub forms. I then expose a method like LoadData that loads the BO. I either use parameters to the method or properties of the page (or both) to gather information needed to load the BO. I then use call the LoadData method when the page is activated.



I'm sure there are lots of instances when other technique will work better, but I have several forms that have 20+ BOs (don't forget list/combos use them too) and they work well. My app is also used over a VPN, so I'm always looking to increase speed, so I'll be interested in other's suggestions/ideas.
By Teddy Jensen - 7/26/2007

Ben, okay so it is all about controlling when to load the bo's. It is good to know regarding the design of the application.

Greg, thanks for your input. It gave me some good inspiration.

/Teddy