473,403 Members | 2,071 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,403 software developers and data experts.

shared app_code folder

I have two websites that basically use the same data access layer. the code
in the app_code folder are identical for these two website. Each has a
different presentation layer (html stuff). It's a lot of work keeping the
two up to date when making changes in the data access layer.
Im wondering if there is a way to let two websites share the same app_code
or something to that effect.
Has anyone done this
Is this even possible? If so how do I set it up so that I only have one
app_code folder?

Thanks,
Howard
Jun 6 '06 #1
3 3079
re:
if there is a way to let two websites share the same app_code
No, there isn't.

An application cannot use a different application's special directories.
It *must* always refer to it's own special directories.

re: how do I set it up so that I only have one app_code folder?
Do you have an absolute need to have them setup as separate applications ?

Often, what we think are two separate applications, particularly if they use the same data,
are really two facets of a larger application and can work fine as sub-applications,
i.e. residing in different subdirectories of the same application...and sharing the
same app_code folder because they are not separate applications.

It might be worthwhile for you to consider that type of solution.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Howard" <ho*******@yahoo.com> wrote in message news:uC**************@TK2MSFTNGP02.phx.gbl...I have two websites that basically use the same data access layer. the code in the app_code folder
are identical for these two website. Each has a different presentation layer (html stuff). It's a
lot of work keeping the two up to date when making changes in the data access layer.
Im wondering if there is a way to let two websites share the same app_code or something to that
effect.
Has anyone done this
Is this even possible? If so how do I set it up so that I only have one app_code folder?

Thanks,
Howard

Jun 6 '06 #2

Juan T. Llibre wrote:
re:
if there is a way to let two websites share the same app_code


No, there isn't.

An application cannot use a different application's special directories.
It *must* always refer to it's own special directories.

re:
how do I set it up so that I only have one app_code folder?


Do you have an absolute need to have them setup as separate applications ?

Often, what we think are two separate applications, particularly if they use the same data,
are really two facets of a larger application and can work fine as sub-applications,
i.e. residing in different subdirectories of the same application...and sharing the
same app_code folder because they are not separate applications.

It might be worthwhile for you to consider that type of solution.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Howard" <ho*******@yahoo.com> wrote in message news:uC**************@TK2MSFTNGP02.phx.gbl...
I have two websites that basically use the same data access layer. the code in the app_code folder
are identical for these two website. Each has a different presentation layer (html stuff). It's a
lot of work keeping the two up to date when making changes in the data access layer.
Im wondering if there is a way to let two websites share the same app_code or something to that
effect.
Has anyone done this
Is this even possible? If so how do I set it up so that I only have oneapp_code folder?

Thanks,
Howard


Something I might add is that I have two projects which use the same
data access layer. This layer is encapsulated in a dll which I added to
the GAC so both could use it.

Jun 6 '06 #3
re:
Something I might add is that I have two projects which use the same
data access layer. This layer is encapsulated in a dll which I added to
the GAC so both could use it.
That is an excellent suggestion, although it involves a bit more coding effort.

Encapsulating a data access layer will provide additional benefits beyond simply sharing data.

Thanks for pitching in!


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
<ch***********@gmail.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...

Juan T. Llibre wrote: re:
if there is a way to let two websites share the same app_code


No, there isn't.

An application cannot use a different application's special directories.
It *must* always refer to it's own special directories.

re:
how do I set it up so that I only have one app_code folder?


Do you have an absolute need to have them setup as separate applications ?

Often, what we think are two separate applications, particularly if they use the same data,
are really two facets of a larger application and can work fine as sub-applications,
i.e. residing in different subdirectories of the same application...and sharing the
same app_code folder because they are not separate applications.

It might be worthwhile for you to consider that type of solution.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Howard" <ho*******@yahoo.com> wrote in message news:uC**************@TK2MSFTNGP02.phx.gbl...
I have two websites that basically use the same data access layer. the code in the app_code
folder
are identical for these two website. Each has a different presentation layer (html stuff). It's a
lot of work keeping the two up to date when making changes in the data access layer.
Im wondering if there is a way to let two websites share the same app_code or something to that
effect.
Has anyone done this
Is this even possible? If so how do I set it up so that I only have one app_code folder?

Thanks,
Howard


Something I might add is that I have two projects which use the same
data access layer. This layer is encapsulated in a dll which I added to
the GAC so both could use it.
Jun 6 '06 #4

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

Similar topics

5
by: Jay Douglas | last post by:
I have a set of pages that inherit from a base class in the App_Code folder. The class looks something like: public class MyBaseClass : System.Web.UI.Page In various stages of the life cycle I...
0
by: John Lau | last post by:
Hello, In Asp.Net 1.1, I am using a single code behind file that is shared by multiple Aspx pages and a second shared code behind file for Ascx user controls. The VS 2003 IDE is a bit quirky,...
2
by: walter | last post by:
Hi, when I add a new page in my asp.net 2 project and put some controls there, everything works fine until I move the code behind into App_Code folder.--When I compile , it tells me that control...
3
by: Jed | last post by:
I have a quick question about asp.net 2.0 compile options. Here's the scenario: I want to share some code among several websites on the same server, but I don't want to precompile anything. ...
2
by: pradeep_TP | last post by:
Hello, I am trying to use APP_CODE folder for all my class files under VS 2005. After adding APP_CODE in the solution explorer, I added a new web page by right clicking project and selecting add...
5
by: Daniel | last post by:
Hey guys I had a site in .net 1.1 and have just moved it to .net 2.0. A strange thing, in .net 1 when you create a project it puts it in a namespace, in 2.0 it doesn't? Also when in a...
1
by: matt.merchant | last post by:
All, When publishing a site with the "Used Fixed Naming and Single Page Assemblies" option checked, only one of my two App_Code folders are compiled into .DLL's. The original code (DotNetNuke...
5
by: Web Search Store | last post by:
Hello, I made a web page using visual studio. I also made a public class in the app_code folder called 'allvars' In the main web page durning the page startup, I can refer to public shared...
1
Frinavale
by: Frinavale | last post by:
I created a custom class that inherits from the CheckBoxList. I placed the the code for this in the App_Code folder because it's used through out my web application. I ran into a namespace...
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: 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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.