Some General Questions regarding .Net

D

Daniel

I'm a newcomer to .Net and am slowly becoming familiar with it, so I have
some simple questions. Here's the situation:

I created a VB.Net project for my data access layer (DAL), another VB.Net
project for my business logic layer (BLL), and am using ASP.Net web forms as
the front end. So I want by BLL to reference the DAL and the ASP.Net
project to reference the BLL.


Questions:

How does .Net handle the referencing of other dlls and projects?

The ASP.Net project has a bin subdirectory where it looks like it is placing
the referenced dlls, could someone explains how this works?

If I wanted to have a common VB.Net dll used by multiple ASP.Net projects,
would I have to place a copy of the dll in each bin subdirectory for the
different sites?

What if I wanted to add/remove/change some functionality in the dll, how
would I update each site to use the new logic? How is compatibility
handled?

Is there any registering of dlls that needs to take place? Regsvr32.exe
doesn't seem to work, so .Net must handle this differently.

Would I need to do anything special to copy the ASP.Net project to a
different server, or is it as simple as copying files?


Thanks in advance.

Daniel
 
M

Michael Lang

I'm a newcomer to .Net and am slowly becoming familiar with it, so I
have some simple questions. Here's the situation:

I created a VB.Net project for my data access layer (DAL), another
VB.Net project for my business logic layer (BLL), and am using ASP.Net
web forms as the front end. So I want by BLL to reference the DAL and
the ASP.Net project to reference the BLL.


Questions:

How does .Net handle the referencing of other dlls and projects?

The ASP.Net project has a bin subdirectory where it looks like it is
placing the referenced dlls, could someone explains how this works?

If I wanted to have a common VB.Net dll used by multiple ASP.Net
projects, would I have to place a copy of the dll in each bin
subdirectory for the different sites?

What if I wanted to add/remove/change some functionality in the dll,
how would I update each site to use the new logic? How is
compatibility handled?

Is there any registering of dlls that needs to take place?
Regsvr32.exe doesn't seem to work, so .Net must handle this
differently.

Would I need to do anything special to copy the ASP.Net project to a
different server, or is it as simple as copying files?

There is no more DLL Hell with .NET. You can have multiple versions of
the same dll in the GAC (Global Assembly Cache) which is sorta like when
you put a common dll in the windows system folder. However, in order to
put a dll in the GAC you need to assign a strong name to the DLL first.

You can't force an application to use the latest version of a DLL. An
application can be configured to use a specific version even if there is
a later one in the GAC.

If you don't assign a strong name to a dll, then each application must
have it's own copy in the same folder as the executeable.

I say good riddance to regsvr32!!

Michael Lang, MCSD
 
D

Daniel

Thanks for the response. I think I'm starting to get it, but I'm still a
little confused:

So if you don't give the dll a strong name it places a copy of the dll in
the project's bin directory?

How do you give the dll a strong name?

If you do give it a strong name, where does the dll reside? Anywhere you
want?



In the case of a multi-tiered ASP.Net application with a VB.Net BLL and a
VB.Net DAL (Hope this doesn't get too confusing):

If no strong names were used, would the DAL reside in the BLL's bin
directrory?

A copy of the BLL would reside in the ASP.Net project's bin directory, but
would the DAL have to as well? If not, how does the BLL know where the DAL
is and what version to use?


Finally, if I want to update the dll and have all the sites that used the
old dll, upgrade to the new one, how would I do this?

I'm guessing that If it had a strong name it would it do this automatically?

If it didn't have a strong name, would I have to copy it into the bin
directory for each site?

Thanks,
Dan
 

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

Top