ZVenue
ZVenue

Reputation: 5027

Two websites from one original MVC code base

I have a website that runs with AD authentication for all users. I am adding a module to the website that lives as a tab on the main page. There is a new thought that the latest tab can be its own web url/website. But without any AD authentication, open to public. Since everything is originally built in one code base until now, is it easy to create a new website just for one tab content. The tab/module has its own controller, its own views, but has some shared references/service layer code. Whats the best way to approach such a situation. The new tab that will turn into a new url/website will be hosted on a separate server due to security issues.

  1. Are two code bases needed, one with old website code and one with just the new module addition code? or can we just do this two websites with single code base?
  2. If I am separating the new module code into a new code base for the new server, I am guessing I need to copy the original project and prune away any unwanted old modules/controller/views etc.. is this the recommended approach?
  3. In general, how does someone approach this kind of situation, specially with the differences in the way the two parts authenitcate (one with AD and one with no authentication)

Upvotes: 0

Views: 139

Answers (2)

Shyju
Shyju

Reputation: 218722

Why not seprate these modules with ASP.NET MVC Areas. Have your exising code in one area and the new public stuff in second area. You can use the common service layer code in both area's controllers now as it(the areas) belongs to the same UI project.

Upvotes: 1

CodeCaster
CodeCaster

Reputation: 151586

If the module doesn't require authentication, it'll live fine just on its own and you can include it in the site that does require authentication.

But what I get from your question, the module isn't that modular, since it depends on modules that do require authentication. So alter the dependencies so that they too stand on their own.

Upvotes: 0

Related Questions