Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Referencing Projects Question

Reply
Thread Tools

Referencing Projects Question

 
 
=?Utf-8?B?Sm9l?=
Guest
Posts: n/a
 
      11-07-2005
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?U3JlZWppdGggUmFt?=
Guest
Posts: n/a
 
      11-07-2005
> 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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sm9l?=
Guest
Posts: n/a
 
      11-07-2005
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

 
Reply With Quote
 
Bruce Barker
Guest
Posts: n/a
 
      11-07-2005
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" <> wrote in message
news:94873A67-719A-4049-90D6-...
> 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



 
Reply With Quote
 
=?Utf-8?B?Sm9l?=
Guest
Posts: n/a
 
      11-07-2005
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" <> wrote in message
> news:94873A67-719A-4049-90D6-...
> > 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

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Having issues with Referencing a DLL in a Solution with multiple Projects pete@weruniq.com ASP .Net 0 03-06-2007 04:50 PM
Referencing other web projects within Visual Studio 2005 =?Utf-8?B?TWF0dEJlbGw=?= ASP .Net 3 01-12-2006 08:52 PM
Can't create projects / open projects jaredea ASP .Net 4 08-10-2005 07:01 PM
ASP.NET projects aren’t 'real' projects in VS.NET 2005 Patrick Olurotimi Ige ASP .Net 0 06-09-2005 12:31 PM
referencing classes in other projects Andy G ASP .Net 2 01-20-2005 10:27 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57