shared app_code folder

H

Howard

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
 
J

Juan T. Llibre

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.
 
C

chris.withers

Juan said:
re:

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:

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.

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.
 
J

Juan T. Llibre

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!





re:

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:

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.

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.
 

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,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top