shared app_code folder

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Howard

    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


  • Juan T. Llibre

    #2
    Re: shared app_code folder

    re:[color=blue]
    > if there is a way to let two websites share the same app_code[/color]

    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:[color=blue]
    > how do I set it up so that I only have one app_code folder?[/color]

    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...a nd 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" <howdy0909@yaho o.com> wrote in message news:uC6FX8TiGH A.4204@TK2MSFTN GP02.phx.gbl...[color=blue]
    >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
    >[/color]


    Comment

    • chris.withers@gmail.com

      #3
      Re: shared app_code folder


      Juan T. Llibre wrote:[color=blue]
      > re:[color=green]
      > > if there is a way to let two websites share the same app_code[/color]
      >
      > 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:[color=green]
      > > how do I set it up so that I only have one app_code folder?[/color]
      >
      > 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...a nd 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" <howdy0909@yaho o.com> wrote in message news:uC6FX8TiGH A.4204@TK2MSFTN GP02.phx.gbl...[color=green]
      > >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
      > >[/color][/color]

      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.

      Comment

      • Juan T. Llibre

        #4
        Re: shared app_code folder

        re:[color=blue]
        > 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.[/color]

        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/
        =============== =============== =====
        <chris.withers@ gmail.com> wrote in message
        news:1149600913 .375923.235360@ u72g2000cwu.goo glegroups.com.. .

        Juan T. Llibre wrote:[color=blue]
        > re:[color=green]
        > > if there is a way to let two websites share the same app_code[/color]
        >
        > 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:[color=green]
        > > how do I set it up so that I only have one app_code folder?[/color]
        >
        > 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...a nd 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" <howdy0909@yaho o.com> wrote in message news:uC6FX8TiGH A.4204@TK2MSFTN GP02.phx.gbl...[color=green]
        > >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
        > >[/color][/color]

        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.


        Comment

        Working...