Single Codebase multiple websites

前端 未结 8 1578
庸人自扰
庸人自扰 2021-02-02 17:29

We have developed a system that uses a single code base, consisting of four Visual Studio projects with an admin website, and customer facing website (each system has its own MS

8条回答
  •  离开以前
    2021-02-02 18:00

    Three thoughts, in ascending order of utility and effort:

    1) Honing in on the "the markup is totally different per site (except the admin site, which is just a theme change) but the code bases are the same."

    How much "code" can you move to a DLL project that gets shared? If it's almost all of it, then you can maintain separate projects for each of the sets of markup and those will use the DLLs as reference.

    Obviously if you've got a lot of code that's not in AppCode, this isn't going to be feasible at all. If not, it may be a quick route to less insanity.

    2) Would it be possible to maintain a repository for the shared code with separate repositories for each of the Sites? Then you'll need to create your own deployment script to handle pulling the source code from correct repositories and putting it in the right places.

    Depending on how tightly coupled the code / markup is, this may not be feasible either.

    3) Finally, what about moving the differing code into a database and having the app generate itself on deployment?

    Obviously that's the most involved, but it gets you where you want to be.

提交回复
热议问题