Hi,
I am working on a project that is getting too big and we would like to split
it in many DLLs Projects.
In that way some dlls should be written in C# and some in VB.NET.
The problem we got to do that is that if we cut a part of code from the main
project (Project1) and if we put it in a new DLL project (Project2) it is
not possible to compile Project2 because it need to declare some classes
that are defined in Project1.
To resolve that problem, in project 2 we add a reference to Project1.
But now, because some functions called by Project1 have been moved to
project2, we need to add a reference to project2 in the main project
(project1).
And we got circular references and it is impossible to build the solution
!!!
So what is the correct way to organize an oo project in many DLLs ?
Thanks
Sebastien 2 2698
Sebastien, And we got circular references and it is impossible to build the solution !!!
The normal way to avoid circular references between assemblies that require
a circular reference is the Separated Interface Pattern. http://www.martinfowler.com/eaaCatal...Interface.html
However this is not always as easy as it appears.
The problem we got to do that is that if we cut a part of code from the
main project (Project1) and if we put it in a new DLL project (Project2) it is not possible to compile Project2 because it need to declare some classes that are defined in Project1.
Normally what I do is move the code that both Project1 & Project2 depend on
into Project3.
Then Project1 references both Project2 & Project3, while Project2 references
only Project3.
Normally I call this Project3 MySolution.Framework. What I wind up with is
very little code in Project1 as most of it is in Project2 type assemblies
with all the common stuff in Project3 type assemblies.
If you do not start out organizing you classes into projects from the start,
it can be challenging as you are finding to get classes that have no
dependencies into their own assemblies, I know I've been there.
Hope this helps
Jay
"ABC - Sébastien Beaugrand" <be*******@activebaseconcept.com> wrote in
message news:3f***********************@news.free.fr... Hi,
I am working on a project that is getting too big and we would like to
split it in many DLLs Projects. In that way some dlls should be written in C# and some in VB.NET.
The problem we got to do that is that if we cut a part of code from the
main project (Project1) and if we put it in a new DLL project (Project2) it is not possible to compile Project2 because it need to declare some classes that are defined in Project1.
To resolve that problem, in project 2 we add a reference to Project1.
But now, because some functions called by Project1 have been moved to project2, we need to add a reference to project2 in the main project (project1).
And we got circular references and it is impossible to build the solution !!!
So what is the correct way to organize an oo project in many DLLs ?
Thanks Sebastien
Jay,
Thank you for your answer that will really help me.
By
"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> a écrit dans le
message de news:uu**************@tk2msftngp13.phx.gbl... Sebastien, And we got circular references and it is impossible to build the
solution !!! The normal way to avoid circular references between assemblies that
require a circular reference is the Separated Interface Pattern.
http://www.martinfowler.com/eaaCatal...Interface.html
However this is not always as easy as it appears.
The problem we got to do that is that if we cut a part of code from the main project (Project1) and if we put it in a new DLL project (Project2) it
is not possible to compile Project2 because it need to declare some classes that are defined in Project1. Normally what I do is move the code that both Project1 & Project2 depend
on into Project3.
Then Project1 references both Project2 & Project3, while Project2
references only Project3.
Normally I call this Project3 MySolution.Framework. What I wind up with is very little code in Project1 as most of it is in Project2 type assemblies with all the common stuff in Project3 type assemblies.
If you do not start out organizing you classes into projects from the
start, it can be challenging as you are finding to get classes that have no dependencies into their own assemblies, I know I've been there.
Hope this helps Jay
"ABC - Sébastien Beaugrand" <be*******@activebaseconcept.com> wrote in message news:3f***********************@news.free.fr... Hi,
I am working on a project that is getting too big and we would like to split it in many DLLs Projects. In that way some dlls should be written in C# and some in VB.NET.
The problem we got to do that is that if we cut a part of code from the main project (Project1) and if we put it in a new DLL project (Project2) it
is not possible to compile Project2 because it need to declare some classes that are defined in Project1.
To resolve that problem, in project 2 we add a reference to Project1.
But now, because some functions called by Project1 have been moved to project2, we need to add a reference to project2 in the main project (project1).
And we got circular references and it is impossible to build the
solution !!!
So what is the correct way to organize an oo project in many DLLs ?
Thanks Sebastien
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Vagif Abilov |
last post by:
We decided to adopt .NET coding guidelines posted by Brad Abrams from
Microsoft:
http://blogs.msdn.com/brada/archive/2005/01/26/361369.aspx
Here is what Brad (and AFAIK Microsoft) suggests...
|
by: raffe |
last post by:
I'm working on an Web Application. Visual Studio has a great support for
that. But as my application grows in functionality I'd like to split it into
modules. I can't see any othrer possibility...
|
by: Just Me |
last post by:
I have a solution containing many usercontrol projects.
When I wish to reference a usercontrol in another project I can select
either the project or the assembly.
Does it make a difference which...
|
by: jojobar |
last post by:
In vs.net 2005 you can build the entire website, entire solution or a single
page. The project I am working on has more than 1000 pages spread over 50-60
directories. We work on one or two of the...
|
by: Jerad Rose |
last post by:
This is regarding Visual Studio 2003 (framework 1.1). We have several
projects/libraries. Of course, many of these reference each other. If we
only had one solution, we would simply add all of...
| |
by: Vlado Jasovic |
last post by:
Hello,
We're developing application in VS2005 using vb.net.
Our application exe file is ~20mb when compiled.
Recently, we have developed auto-update feature that goes on our web-site,...
|
by: nyhetsgrupper |
last post by:
Hi,
Which project type do you prefer? Is the web site or web application
project the best solution? The application I am about to write is
completly new so migrating from vs 2003 is not an issue,...
|
by: |
last post by:
I have learned about compartmentalizing my code base using Class Libraries.
I have my common code such as my ORM framework broken out into their own
Class Libraries, which are referenced as...
|
by: Alan Mailer |
last post by:
Again, I'm new to VB.net and there is something I need help with:
Like (I assume) many of us, over time I want to be able to create some
VB.net classes that I might want to use in more than one...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |