473,395 Members | 1,468 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Referencing Projects Question

Joe
Hello All:

I need some help understanding project references. I have two projects that
are giving me grief. They are called Business and Messaging.

The Business proejct contains classes that handle the business layer. These
handle database calls that return data from the system's databases. It
contains classes like Policy, Unit and Vehicle. Currently, the Business
project has no reference to the Messaging project.

The Messaging project handles calls to a third-party system and uses
Business' classes (Unit, Policy and Vehicle). For example, The Messaging
class will use a Business.Vehicle class which holds information about a
Vehicle to request information from the third-party system about that
vehicle. Currently, the Messaging project has a reference to the Business
project.

If I delete the Messaging project's reference to the Business project and
create a reference to the Messaging project in the Business project, the
Messaging classes' method calls can not use the Policy, Unit or Vehicle
classes. An example of the message that is displayed is "Type
Business.Policy is not defined."

Why?

Finally, I need to architect this such that the Business project references
the Messaging project. I want to be able to pass Busienss classes to
Messaging classes so that the Messaging classes can retrieve data from the
third-party and pass that data back to the Business classes (i.e. act as a
database layer). Does anyone have an idea how I could do this?

I hope that I have been somewhat clear.

TIA,
--
Joe

VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
Nov 19 '05 #1
4 984
> If I delete the Messaging project's reference to the Business project and
create a reference to the Messaging project in the Business project, the
Messaging classes' method calls can not use the Policy, Unit or Vehicle
classes. An example of the message that is displayed is "Type
Business.Policy is not defined."
I believe, you have already identified that a circular
reference between projects is not allowed. Meaning ,if bussiness references
messaging, messaging cannot have a refernce back to bussiness.
I want to be able to pass Busienss classes to
Messaging classes so that the Messaging classes can retrieve data from the
third-party and pass that data back to the Business classes (i.e. act as a
database layer). Does anyone have an idea how I could do this?
while waiting to hear from experts, One simple method to handle this
is to define your data structure (c# struct) (the data you pass between
message & bussiness) in a seperate proj so both message & bussiness can
reference and pass it between calls.. Doesnt hurt if used in small projects.
I am sure there will be another systematic, efficient design approch...
"Joe" wrote:
Hello All:

I need some help understanding project references. I have two projects that
are giving me grief. They are called Business and Messaging.

The Business proejct contains classes that handle the business layer. These
handle database calls that return data from the system's databases. It
contains classes like Policy, Unit and Vehicle. Currently, the Business
project has no reference to the Messaging project.

The Messaging project handles calls to a third-party system and uses
Business' classes (Unit, Policy and Vehicle). For example, The Messaging
class will use a Business.Vehicle class which holds information about a
Vehicle to request information from the third-party system about that
vehicle. Currently, the Messaging project has a reference to the Business
project.

If I delete the Messaging project's reference to the Business project and
create a reference to the Messaging project in the Business project, the
Messaging classes' method calls can not use the Policy, Unit or Vehicle
classes. An example of the message that is displayed is "Type
Business.Policy is not defined."

Why?

Finally, I need to architect this such that the Business project references
the Messaging project. I want to be able to pass Busienss classes to
Messaging classes so that the Messaging classes can retrieve data from the
third-party and pass that data back to the Business classes (i.e. act as a
database layer). Does anyone have an idea how I could do this?

I hope that I have been somewhat clear.

TIA,
--
Joe

VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation

Nov 19 '05 #2
Joe
Sreejith,

Thanks for your reply. The idea was to remove the Busienss reference from
Messaging and have in its place a Messaging reference in Business.

Joe
--
Joe

VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
"Sreejith Ram" wrote:
If I delete the Messaging project's reference to the Business project and
create a reference to the Messaging project in the Business project, the
Messaging classes' method calls can not use the Policy, Unit or Vehicle
classes. An example of the message that is displayed is "Type
Business.Policy is not defined."


I believe, you have already identified that a circular
reference between projects is not allowed. Meaning ,if bussiness references
messaging, messaging cannot have a refernce back to bussiness.
I want to be able to pass Busienss classes to
Messaging classes so that the Messaging classes can retrieve data from the
third-party and pass that data back to the Business classes (i.e. act as a
database layer). Does anyone have an idea how I could do this?


while waiting to hear from experts, One simple method to handle this
is to define your data structure (c# struct) (the data you pass between
message & bussiness) in a seperate proj so both message & bussiness can
reference and pass it between calls.. Doesnt hurt if used in small projects.
I am sure there will be another systematic, efficient design approch...
"Joe" wrote:
Hello All:

I need some help understanding project references. I have two projects that
are giving me grief. They are called Business and Messaging.

The Business proejct contains classes that handle the business layer. These
handle database calls that return data from the system's databases. It
contains classes like Policy, Unit and Vehicle. Currently, the Business
project has no reference to the Messaging project.

The Messaging project handles calls to a third-party system and uses
Business' classes (Unit, Policy and Vehicle). For example, The Messaging
class will use a Business.Vehicle class which holds information about a
Vehicle to request information from the third-party system about that
vehicle. Currently, the Messaging project has a reference to the Business
project.

If I delete the Messaging project's reference to the Business project and
create a reference to the Messaging project in the Business project, the
Messaging classes' method calls can not use the Policy, Unit or Vehicle
classes. An example of the message that is displayed is "Type
Business.Policy is not defined."

Why?

Finally, I need to architect this such that the Business project references
the Messaging project. I want to be able to pass Busienss classes to
Messaging classes so that the Messaging classes can retrieve data from the
third-party and pass that data back to the Business classes (i.e. act as a
database layer). Does anyone have an idea how I could do this?

I hope that I have been somewhat clear.

TIA,
--
Joe

VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation

Nov 19 '05 #3
for a project to use classes defined in another project, it needs a
reference. if you want business to reference messaging, and messaging to use
clsses defined in business, yo have two options:

1) merge them into 1 project.
2) create a third project (ref'd by both business and message) that defines
the shared classes. the best approach whould be to define abstact classes
here, and allow the business layer to implement it.

-- bruce (sqlwork.com)
"Joe" <jo******@donotspam.yahoo.com> wrote in message
news:94**********************************@microsof t.com...
Sreejith,

Thanks for your reply. The idea was to remove the Busienss reference from
Messaging and have in its place a Messaging reference in Business.

Joe
--
Joe

VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
"Sreejith Ram" wrote:
> If I delete the Messaging project's reference to the Business project
> and
> create a reference to the Messaging project in the Business project,
> the
> Messaging classes' method calls can not use the Policy, Unit or Vehicle
> classes. An example of the message that is displayed is "Type
> Business.Policy is not defined."


I believe, you have already identified that a circular
reference between projects is not allowed. Meaning ,if bussiness
references
messaging, messaging cannot have a refernce back to bussiness.
> I want to be able to pass Busienss classes to
> Messaging classes so that the Messaging classes can retrieve data from
> the
> third-party and pass that data back to the Business classes (i.e. act
> as a
> database layer). Does anyone have an idea how I could do this?


while waiting to hear from experts, One simple method to handle
this
is to define your data structure (c# struct) (the data you pass between
message & bussiness) in a seperate proj so both message & bussiness can
reference and pass it between calls.. Doesnt hurt if used in small
projects.
I am sure there will be another systematic, efficient design approch...
"Joe" wrote:
> Hello All:
>
> I need some help understanding project references. I have two projects
> that
> are giving me grief. They are called Business and Messaging.
>
> The Business proejct contains classes that handle the business layer.
> These
> handle database calls that return data from the system's databases. It
> contains classes like Policy, Unit and Vehicle. Currently, the
> Business
> project has no reference to the Messaging project.
>
> The Messaging project handles calls to a third-party system and uses
> Business' classes (Unit, Policy and Vehicle). For example, The
> Messaging
> class will use a Business.Vehicle class which holds information about a
> Vehicle to request information from the third-party system about that
> vehicle. Currently, the Messaging project has a reference to the
> Business
> project.
>
> If I delete the Messaging project's reference to the Business project
> and
> create a reference to the Messaging project in the Business project,
> the
> Messaging classes' method calls can not use the Policy, Unit or Vehicle
> classes. An example of the message that is displayed is "Type
> Business.Policy is not defined."
>
> Why?
>
> Finally, I need to architect this such that the Business project
> references
> the Messaging project. I want to be able to pass Busienss classes to
> Messaging classes so that the Messaging classes can retrieve data from
> the
> third-party and pass that data back to the Business classes (i.e. act
> as a
> database layer). Does anyone have an idea how I could do this?
>
> I hope that I have been somewhat clear.
>
> TIA,
> --
> Joe
>
> VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation

Nov 19 '05 #4
Joe
Bruce,

How would option 2 work? Would you please give an example showing how to do
this or do you know of an example online soimewhere?

Thanks,
--
Joe

VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
"Bruce Barker" wrote:
for a project to use classes defined in another project, it needs a
reference. if you want business to reference messaging, and messaging to use
clsses defined in business, yo have two options:

1) merge them into 1 project.
2) create a third project (ref'd by both business and message) that defines
the shared classes. the best approach whould be to define abstact classes
here, and allow the business layer to implement it.

-- bruce (sqlwork.com)
"Joe" <jo******@donotspam.yahoo.com> wrote in message
news:94**********************************@microsof t.com...
Sreejith,

Thanks for your reply. The idea was to remove the Busienss reference from
Messaging and have in its place a Messaging reference in Business.

Joe
--
Joe

VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
"Sreejith Ram" wrote:
> If I delete the Messaging project's reference to the Business project
> and
> create a reference to the Messaging project in the Business project,
> the
> Messaging classes' method calls can not use the Policy, Unit or Vehicle
> classes. An example of the message that is displayed is "Type
> Business.Policy is not defined."

I believe, you have already identified that a circular
reference between projects is not allowed. Meaning ,if bussiness
references
messaging, messaging cannot have a refernce back to bussiness.

> I want to be able to pass Busienss classes to
> Messaging classes so that the Messaging classes can retrieve data from
> the
> third-party and pass that data back to the Business classes (i.e. act
> as a
> database layer). Does anyone have an idea how I could do this?

while waiting to hear from experts, One simple method to handle
this
is to define your data structure (c# struct) (the data you pass between
message & bussiness) in a seperate proj so both message & bussiness can
reference and pass it between calls.. Doesnt hurt if used in small
projects.
I am sure there will be another systematic, efficient design approch...
"Joe" wrote:

> Hello All:
>
> I need some help understanding project references. I have two projects
> that
> are giving me grief. They are called Business and Messaging.
>
> The Business proejct contains classes that handle the business layer.
> These
> handle database calls that return data from the system's databases. It
> contains classes like Policy, Unit and Vehicle. Currently, the
> Business
> project has no reference to the Messaging project.
>
> The Messaging project handles calls to a third-party system and uses
> Business' classes (Unit, Policy and Vehicle). For example, The
> Messaging
> class will use a Business.Vehicle class which holds information about a
> Vehicle to request information from the third-party system about that
> vehicle. Currently, the Messaging project has a reference to the
> Business
> project.
>
> If I delete the Messaging project's reference to the Business project
> and
> create a reference to the Messaging project in the Business project,
> the
> Messaging classes' method calls can not use the Policy, Unit or Vehicle
> classes. An example of the message that is displayed is "Type
> Business.Policy is not defined."
>
> Why?
>
> Finally, I need to architect this such that the Business project
> references
> the Messaging project. I want to be able to pass Busienss classes to
> Messaging classes so that the Messaging classes can retrieve data from
> the
> third-party and pass that data back to the Business classes (i.e. act
> as a
> database layer). Does anyone have an idea how I could do this?
>
> I hope that I have been somewhat clear.
>
> TIA,
> --
> Joe
>
> VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Manny Silva | last post by:
Hi, I'm trying to create a simple managed C++ application that will be a test UI around a couple of ATL COM DLL projects that I have created (all with VS2003). What I am attempting to do is...
4
by: Christopher C. Bernholt | last post by:
We have a solution which contains 2 projects. The first project is a windows control and it references an assembly. The second project is a test windows application used to test the windows...
4
by: Oenone | last post by:
Another VB6 feature that I'm missing in VB.NET is with regard to referencing projects vs. referencing DLLs. In VB6 I can reference my support library, Support.dll, and call its functions. If...
3
by: MattBell | last post by:
We have built a core component set of pages, master pages and other controls that we want to re-use in a number of different web applications. Is there anyway to make a reference to a web project...
2
by: Jan | last post by:
Regarding my post "CSharpCodeProvider: referencing other generated "InMemory" assembly" 4/27/2006 and the blog from Greg Young http://geekswithblogs.net/gyoung/archive/2006/04/27/76533.aspx I...
1
by: Tim F | last post by:
Problem: I'm receiving the error "File or assembly name XXXXX or one of its dependencies, was not found." when trying to execute code in an assmebly that has both a strong-name and has been...
0
by: pete | last post by:
Greetings all, I am going to attempt to describe the issue that I am having in full. I apologize ahead of time that this may be a long posting, however, I have found no other solution to my...
3
by: HaVeN | last post by:
Hello, I'm not to sure if this was the right place to post this question... I am a newbie to the Community. Anyways, I've built 2 Websites that are all in one solution and I am using VB 2005.At...
1
by: Henry Stock | last post by:
I am having trouble referencing a theme in my ASP.NET project. I was following a model that allowed for multiple themes. So The theme that I have is stored in named "Base" under the App_Theme...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.