Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > shared app_code folder

Reply
Thread Tools

shared app_code folder

 
 
Howard
Guest
Posts: n/a
 
      06-06-2006
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


 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      06-06-2006
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" <> wrote in message news:...
>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
>



 
Reply With Quote
 
 
 
 
chris.withers@gmail.com
Guest
Posts: n/a
 
      06-06-2006

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" <> wrote in message news:...
> >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.

 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      06-06-2006
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/
===================================
<> wrote in message
news: 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" <> wrote in message news:...
> >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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
refer to a public shared class in app_code folder Web Search Store ASP .Net 5 08-23-2008 11:56 AM
refer to a public shared class in app_code folder Web Search Store ASP .Net Web Services 5 08-23-2008 11:56 AM
refer to a public shared class in app_code folder Web Search Store ASP .Net Web Controls 5 08-23-2008 11:56 AM
SOLVED - windows xp rename folder within shared folder, notrefreshing window jameshanley39@yahoo.co.uk Computer Information 0 07-30-2008 06:33 PM
First time at using shared code in App_Code directory bissatch@yahoo.co.uk ASP .Net 3 02-18-2007 08:46 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57