Hi all, Looking for some guidance on how to structure/architect an app and I'm having some difficulties. Please feel free to NOT limit answers to tech details, as I'm not sure I'm doing things the most efficient way. I'm giving examples in VB.NET, but please feel free to use c#, as that's our official target language. I just know vb better. Also, we're using Visual Studio 2008.
So , the scenario: We're writing a web based app that (hopefully) will be customizable for several customers. For the sake of brevity and to not give away the farm, let's say it's a Personnel app.
So, I am going to have a Person base class. This will have very general methods only. It has a public property Name in class Class1.
Just for arguments sake, I will next create a NEW project/assembly Person.Employee
Now, since I might want to sell this app to Modeling agencies or Construction companies, maybe I want to add some very odd properties. CheekStructure or CanOperateHeavyMachinery
So, I will create New Projects in studio called Person.Employee.TinasModeling & Person.Employee.TomsConstructionCompany that will contain code for a specific company only.
You may assume that each of these assemblies will ONLY contain Business Logic appropriate to the level of the assembly within the hierarchy.
Remember, this is targeted to be a CUSTOM app for many different companies, but all dealing with Personnel. So this is why I came up with this model. If we find a bug in a lower level, I just want to be able to fix it and ship a dll or 2. This structure is targeted very heavily at us possibly having 20 or more Customized Applications. Distribution and Maintenance are the PARAMOUNT concerns here. There are not many developers. More than me, but less than 3 -grin-.
Now, the problem.
For simplicity' sake, I have Class1 in Person.
Up in my web app, I have a reference to Person.Employee.TinasModeling This web app project is just for Tinas Modeling.
If I have
Imports Person.Employee.TinasModeling
...
Dim this As New Class1
this.Name = "Some Value"
This will not compile unless I have a reference to Person also.
Question 1. Do I really need a ref to the base class Person( and Probably to Person.Employee also ), or is there some way of doing without it? I don't want anyone to accidentally create classes at lower levels of the inheritance chain. I'm not sure I want them creating them at lower levels at all, but maybe my concern is moot?
Question 2. Is this the best way of architecting this? Please remember, Maint and Distribution are the Primary concerns here. Picture finding a bug at a low level and having to open up 20 solutions, build each one, test ( even if automated ), build and distribute. I really want the ability to send out 1 Dll ( or maybe the one that got updated, and the dependant ones also? ) and be done, if that lower level dll passes it's tests
If I have to have refs to all lower levels of the inheritance tree, maybe I ought to just put all of this into one assembly under different namespaces?
Cripes, hope this is clear enough. I've been searching google all day for inheritance samples trying to find something useful. Hopefully someone here can clear the fog from my brain.
Thanks in advance, Bob