I have a four projects in a solution AllianceControl

MainMenu Serves as launchboard for all the different projects as refrences them all to get at the controls to launch in a tab control:
BackflowControl -> MainMenu
UMS -> MainMenu
CounterReceipts -> MainMenu


This setup worked perfectly while I had just needed the refrence one way. But I came across a problem when I needed to add a new feature. Say I'm in BackflowControl
and want to load account information off of a datagrid double click. This double click would open a new tab in the collection I have going on. My problem is that the
functionality and collection is stored in my main menu since that is the launching point. I understand of course that you can't refrence the Mainmenu from the controls
(this would cause circular dependancy) but how would I be able to get at the function (or collection of tabs) to create a new tab in that collection?

7 Years
Discussion Span
Last Post by Ketsuekiame

You could sepearte out the data management classes to a seperate dll project.
This will enable access to the data manipulation functions for all processes.
If you need to reference objects from the MainMenu process then that is a totally differenct ball game and will also require cross process channels to transfere the data.


It's good practise in cases like these to keep your DomainObjects (for example a Person would be a DomainObject) and your DataAccessObjects separated.

So I could have a PersonDao and this class has a "GetById(int id)" method. So I can call PersonDao.GetbyId(25) and it will pull back that person for me.

The great thing about DAOs are that you can then implement GetBy<Whatever> and include functionality for that.

The Design pattern is good, but how you implement it will be different :)

DAO Design Pattern

(Separation will remove a lot of the circular dependency you talked about, which is why I'm mentioning it :))

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.