|
-
Jun 4th, 2003, 05:20 AM
#1
Thread Starter
New Member
How to work around circular dependencies
Hi all,
I'm working on a fairly huge project for a compagny; (not that i'm part of that compagny, I'm just slave labouring for free as a school trainee ).
Because of it's huge nature, it's being considered placing the programming in several project under one solution. BUT, the projects need to work toghether. Access each others forms, etc.
So, you compile the projects as class libraries, reference to each other.
This works great, as long as it's in one direction.
So assume you have 3 projects. Project A is a startup project compiled as an executable.
Project B & C are both class libraries.
Project A has a reference to both B and C, so it can open their forms. Project B has a reference to C, so that can open C's forms as well..... BUT Project C should be able to access the forms of Project B......................
But that's impossible, because then you have a circular dependency...
How do you folk deal with this? Is there are way to work around this problem? (except putting it all ine one project)
Thankies
-
Jun 4th, 2003, 11:43 AM
#2
If they all have to call each others stuff then I would leave them as one project. Usually you seperate into tiers or layers based on an objects role (i.e. Data, Presentation, Business) which still has all the forms in one layer or tier.
-
Jun 4th, 2003, 12:31 PM
#3
Put classes they have in common into its own library.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|