Create a 3-teir Project

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi guys, I have been working with .net for nearly a year now, and I would
like to move forward and start to learn how to create proper projects, i.e.
3-teir.

I have read extensively about the mechanics of 3-tier architecture but have
yet not stumbled upon any information regarding setting up a 3-tier app in vs.

I have had a stab at it though, but I have a few questions.

Here is what I have done to date:

Created a solution (eg - myproj)
Created 3 class library projects one called myprojWeb, one called myprojDb,
and the other called myprojBusiness.

I create a project reference between web and business and business to db.

Question #1:
All seems to be ok inside of visual studio, but inside IIS, i get four
virtual directories, one each for each class library created.

I am not sure if this is correct and would be more than greatful for some
guidance/examples of setting up a 3-tier project properly.

Kind regards

Watherton

The
 
Hello Watherton,


Watherton said:
Here is what I have done to date:

Created a solution (eg - myproj)
Created 3 class library projects one called myprojWeb, one called myprojDb,
and the other called myprojBusiness.

I create a project reference between web and business and business to db.

Question #1:
All seems to be ok inside of visual studio, but inside IIS, i get four
virtual directories, one each for each class library created.

this happens when your class library projects are actually web projects.
When you add a new project to your solution, if it is really a class
library, you won't get a seperate virtual directory for it. It will be
created in a totally different place on your hard drive (usually) and that
is OK. Your references will take care of pulling it all together when you
compile.

My advice: add two more projects to your solution: real class libraries, not
web projects. Move the code from the extraneous web projects to the class
libraries and delete the two extra web projects. (then go into IIS, and
delete the virtual directories).

Hope this helps,
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
 
Back
Top