Semi-OT: Programming Question

Brian Densmore DensmoreB at ctbsonline.com
Fri Mar 11 14:17:12 CST 2005


> -----Original Message-----
> From: Charles, Joshua Micah (UMKC-Student)
> 
>  
> I've got an object model that is monolithic right now, but I want to
> make it more flexible.  I guess what I'm trying to figure out is how I
> would implement a totally dynamic program, where everything 
> from the gui
> to the datalayer is decided at runtime.  The lines I'm thinking of now
Well first off. You want to separate the gui from form data processing.
By separating the gui you can "drop in" different interfaces on the fly even
within the same OS and not have to worry about messing with the data processing
logic (aka business logic).

> is creating some high level interface, perhaps something 
> along the lines
> of a IMenuItem, which would contain methods for access the information
> needed to create a menu dynamically.  I could then search through the
> plugin dll's and load all the objects that implement that 
> interface.  Of
> course, I realize that this is a big performance hit, but I think the
Why would you want to or need to do this? I guess, I'm not following what you want
to do. Building a menu dynamically is easily implemented as a file or db table with
an item number,  menu name, quick key, interface type, parent item, menu position,
and maybe access level or/and other features. I just rewrote somebody's menu routine
and increased the speed of generation from 30+ seconds to less than 5, so
performance hits can get quite large if you're not careful. Of course the
5 second menu building might seem slow, but remember in order to build the menu
tree you have to traverse the entire tree. I could improve this even more
by completely rewriting the code using a b-tree type algorithm, but that would
require redesigning the existing table also. Something they didn't want to do
and 5 seconds is acceptable in this instance. As it is, I am mimicking a b-tree
as best as possible based on the data source. So you see the design of the back-end
data structure is very important.

> flexibility of the software will overshadow that.  The clients I'm
> working with now are always changing the requirements of the 
> software,
> even after deployment, and it seems that my framework would make those
> changes easier to implement (especially since even the most 
> minor change
> wouldn't require a re-compile (or re-translation, if you want).
Ah, yes ... I've dealt with clients like this.



More information about the Kclug mailing list