programmed myself into a corner? architecture question.

  • Thread starter Thread starter George Hardy
  • Start date Start date
G

George Hardy

Hi all,
This is a bit of an academic question for you smarties out there....

I inherited this application that had 40 forms, 120 datasets, and no dll's.
I am starting to separate this app (ie: myapp.exe) into functional areas
(like product.dll, invoice.dll, customer.dll, etc.). Hopefully, this will
make the functional areas more encapsulated and manageable.

The thing is, I have yet to put the invoicing functionality in the
invoice.dll project, because there are so many global variables in
myapp.exe, it will take a little time to unhook all of the stuff and make it
work independently.

So, i do have the customer.dll working (which has customerlist,
customerdetail, etc.), but I need this dll to launch a screen back in
myapp.exe. However, I am unable reference it because it is not a DLL, and I
can't figure out how I will launch it.
 
George Hardy said:
Hi all,
This is a bit of an academic question for you smarties out there....

I inherited this application that had 40 forms, 120 datasets, and no
dll's. I am starting to separate this app (ie: myapp.exe) into functional
areas (like product.dll, invoice.dll, customer.dll, etc.). Hopefully,
this will make the functional areas more encapsulated and manageable.

The thing is, I have yet to put the invoicing functionality in the
invoice.dll project, because there are so many global variables in
myapp.exe, it will take a little time to unhook all of the stuff and make
it work independently.

So, i do have the customer.dll working (which has customerlist,
customerdetail, etc.), but I need this dll to launch a screen back in
myapp.exe. However, I am unable reference it because it is not a DLL, and
I can't figure out how I will launch it.

Split out the form(and any other important code) into a dll and make
myapp.exe a simple shell.
 
i wnat to make the main app a simple shell...but i can't leave a couple of
the forms in the main app, until can get them detached? my problem is that
i want to kind of do this piece-meal. there are all sorts of stupid global
variables, stuctures, public bas modules, etc...but i guess if i cant do it
slowly, then all at once.

later release date then.
george
 
Why break things into seprate dll's just for the sake of organization?
I don't understand why people do this, it just complicates referenceing
issues. Like you are are experienceing. Use Namespacing that is what it
is good for. Sit down and plan out a good detailed namespace. In fact
while you are at it plan it for the whole company.

Then decide to break up the dlls based on dependancies. You you
probably find that you don't have very few or none at all.
 
perhaps i am confused as to your response...

i understand the concept of namespaces, and i am not sure why you don't like
to use separate class libraries. As far as I know, you cant have more than
one namespace per project, so NOT breaking out the app into separate dll's
would actually prevent me from creating more than one namespace.

Yes, if I have separate functional dll's in the project, I can give them the
SAME namespace as my main project, and yes, the referencing issue is
avoided. As a matter of fact, this may be the approach I take with this, is
that all my dlls are in the [myapp] namespace. The namespace hierarchy is
inherently flat, due to the nature of the application, so there really aint
much planning.

The only problem with this approach is, from what I can tell, is
encapsulation and privatizing the scope of each dll.

Comments? Suggestions?

george hardy
 
i guess you weren't saying that you dont like dlls, you just like to break
them out afterwards....

thanks..
 
George said:
to use separate class libraries. As far as I know, you cant have more than
one namespace per project, so NOT breaking out the app into separate dll's
would actually prevent me from creating more than one namespace.

You can have as many namespaces per project as you like, no limit.
 
sorry, i must have had the "root namespace" from the project properties
dialog confused with having public classes in the project. is this what you
mean by having unlimited namespaces in a project--unlimited classes? if so,
this newbie's terminology is messed up.

wish i worked in a shop with other programmers....sucks trying to bounce
ideas of myself.

thanks,
george hardy
 
George Hardy said:
i wnat to make the main app a simple shell...but i can't leave a couple of
the forms in the main app, until can get them detached? my problem is that
i want to kind of do this piece-meal. there are all sorts of stupid global
variables, stuctures, public bas modules, etc...but i guess if i cant do it
slowly, then all at once.

Not really, you are going to have to have some top level library to avoid
circular references. You could build some a class that that let you load
forms and the like via its members, but its messy and is probably be
unattractive.
 
let me ask you guys this...

is there a good book that would show good .net application design on a
high-level scale? Back in my VB5 days, there was a good book for this (I
thought) called Doing objects in VB 5 by Deborah Kurata....

Is there a book like this now?

thanks,
george hardy
 
Back
Top