Adding reference from one web application to another??

A

Annie

hello guys,

Let is say I have two layers: the GUI web application that has the master
page and web forms. and the DAL - Data access layer
which is another web application and has been created using Strongly Typed
Dataset. I have created the DAL using the tuts explained
in MSDN :
http://msdn.microsoft.com/library/d...et_tutorial04_datawithobjectdatasource_vb.asp

What is the best way to add reference from my GUI page to the DAL. They are
both web applicaitons. I added the DAL to the GUI web
but when i try to add reference I can't see Add reference to DAL project to
be selected and added ...

What is the best way?

thx
 
M

Mark Rae

Let is say I have two layers: the GUI web application that has the master
page and web forms. and the DAL - Data access layer
which is another web application and has been created using Strongly Typed
Dataset. I have created the DAL using the tuts explained
in MSDN :
http://msdn.microsoft.com/library/d...et_tutorial04_datawithobjectdatasource_vb.asp

What is the best way to add reference from my GUI page to the DAL. They
are both web applicaitons. I added the DAL to the GUI web
but when i try to add reference I can't see Add reference to DAL project
to be selected and added ...

What is the best way?

No doubt people will disagree with me, but I wouldn't have created your DAL
as a separate web application. Maybe a separate class library at a push, but
most certainly not a separate web application.

My DAL exists in a single class file, and I use Visual SourceSafe to provide
version control on all my projects.

Therefore, whenever I create a new project which requires the DAL (which is
pretty much all of them), I simply share the class file into the new project
through SourceSafe. That means that if I make and improvements, amendments,
enhancements to the DAL, all my other projects get them automatically next
time I compile them.
 
L

Laurent Bugnion

Hi,

Mark said:
No doubt people will disagree with me, but I wouldn't have created your DAL
as a separate web application. Maybe a separate class library at a push, but
most certainly not a separate web application.

My DAL exists in a single class file, and I use Visual SourceSafe to provide
version control on all my projects.

Therefore, whenever I create a new project which requires the DAL (which is
pretty much all of them), I simply share the class file into the new project
through SourceSafe. That means that if I make and improvements, amendments,
enhancements to the DAL, all my other projects get them automatically next
time I compile them.

Another way to get that with a slightly more elaborate design is to make
the DAL a class library, and to reference the project and not the DLL
from your UI application (WinForms, ASP.NET or WPF...).

I like this kind of design, because it allows me to add a test UI in my
DAL project (Console application, or even simple WinForms application),
so I can develop and test my DAL separately from the other applications.
When it is ready, I just open the Web application solution, and all the
changes are made available to it automatically. It's IME the best way to
solve the versioning problems you get when you use assembly references.

HTH,
Laurent
 
G

Guest

I don't see where Scott Mitchell indicated you should make your Data Access
Layer into a "Web Application". The other comments about having your DAL is a
class library are wise suggestions.

You are certainly on the right track, just remember that web presentation is
by definition an "ASP.NET Application", but business logic and Data Access
are not - nor should they be.
Peter
 
A

Annie

Many thanks guys for all the input

Peter Bromberg said:
I don't see where Scott Mitchell indicated you should make your Data Access
Layer into a "Web Application". The other comments about having your DAL
is a
class library are wise suggestions.

You are certainly on the right track, just remember that web presentation
is
by definition an "ASP.NET Application", but business logic and Data Access
are not - nor should they be.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top