shared app_code folder

Discussion in 'ASP .Net' started by Howard, Jun 6, 2006.

  1. Howard

    Howard Guest

    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
     
    Howard, Jun 6, 2006
    #1
    1. Advertising

  2. 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
    >
     
    Juan T. Llibre, Jun 6, 2006
    #2
    1. Advertising

  3. Howard

    Guest

    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.
     
    , Jun 6, 2006
    #3
  4. 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:...

    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.
     
    Juan T. Llibre, Jun 6, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Rilling

    Question about purpose of App_Code folder.

    Peter Rilling, Jul 15, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    445
    Juan T. Llibre
    Jul 15, 2005
  2. Replies:
    3
    Views:
    371
    Teemu Keiski
    Feb 18, 2007
  3. Web Search Store

    refer to a public shared class in app_code folder

    Web Search Store, Jul 3, 2008, in forum: ASP .Net
    Replies:
    5
    Views:
    853
    In therapy
    Aug 23, 2008
  4. Web Search Store

    refer to a public shared class in app_code folder

    Web Search Store, Jul 3, 2008, in forum: ASP .Net Web Controls
    Replies:
    5
    Views:
    178
    In therapy
    Aug 23, 2008
  5. Web Search Store

    refer to a public shared class in app_code folder

    Web Search Store, Jul 3, 2008, in forum: ASP .Net Web Services
    Replies:
    5
    Views:
    203
    In therapy
    Aug 23, 2008
Loading...

Share This Page