locked
Create multiple projects in a solution? RRS feed

  • Question

  • User521171331 posted

    Hi,

    If my solution have 4 modules

    • user management
    • e-leave
    • e-claim
    • e-payroll

    should i create multiple projects in one HR solution?

    Tuesday, May 8, 2018 12:25 AM

Answers

  • User-369506445 posted

    you should change your action links below like :

     <li>@Html.ActionLink("eLeave Index", "Index", "Home" , new { area = "eLeave" } , null)</li>
     <li>@Html.ActionLink("ePayroll Index", "Index", "Home", new { area = "ePayroll" }, null)</li>
     <li>@Html.ActionLink("eClaim Index", "Index", "Home", new { area = "eClaim" }, null)</li>

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 9, 2018 9:42 AM

All replies

  • User36583972 posted

    Hi ngaisteve1,

    If my solution have 4 modules

    • user management
    • e-leave
    • e-claim
    • e-payroll

    should i create multiple projects in one HR solution?

    We can create multiple projects in a solution.

    I think it will depend on the design pattern of your project.

    If you separate the Web application into multiple Visual Studio .NET projects, you may find it easier to manage the development of large Web applications. You can separate a large development project into smaller projects, which you can manage and build separately. Your team can work on separate parts of a Web application by working on separate projects. You should still use source control software to coordinate work on project files.

    Please see: How To Create an ASP.NET Application from Multiple Projects for Team Development
    https://support.microsoft.com/en-us/help/307467/how-to-create-an-asp-net-application-from-multiple-projects-for-team-d

    Best Regards,

    Yong Lu

    Tuesday, May 8, 2018 2:09 AM
  • User521171331 posted

    What about using 'area' instead? I just want to login once to access to these three modules within the same template layout.

    Wednesday, May 9, 2018 7:54 AM
  • User-369506445 posted

    hi

    Multiple Areas in the same web application will share the same authentication token. Meaning, after loggin in, a user can browse to the area and not need to login. With different projects you need to do a little bit of work to get this behavior (basically they all have to use the same authenticaion cookie and have the same key). If they don't share the same ticket then each project will have to make users login independently

    Another thing to consider is url customization. With areas you can customize the url of the area controllers and the area itself. You can set up a custom route at the room website level to point to a controller in the areas folder. For example

    Lets say you have http://www.yoursite.com/blog/article/index (article controller of the blog area), you can create a custom route off the root site so that http://www.yoursite.com/article points to the same place. This is much harder, if not impossible to do with sub projects since you are then depending on the folder structure.

    However, a benefit to sub projects is that you can build them in isolation and deploy them without modifying the root site. This can be done with areas through the concept of portable areas.

    http://lostechies.com/erichexter/2010/04/07/mvccontrib-portable-area-visual-studio-project-template/

    Wednesday, May 9, 2018 8:08 AM
  • User521171331 posted

    Hi,

    I managed to setup 'area' for these three modules and manage to setup to use root layout by changing the _ViewStart.cshtml

    But, the problem now is after clicking one of the pages, i can't click the other pages. This is my link in layout:

    <li>@Html.ActionLink("eLeave Index", "Index", "eLeave/Home")</li>
    <li>@Html.ActionLink("ePayroll Index", "Index", "ePayroll/Home")</li>
    <li>@Html.ActionLink("eClaim Index", "Index", "eClaim/Home")</li>

    Wednesday, May 9, 2018 9:14 AM
  • User-369506445 posted

    you should change your action links below like :

     <li>@Html.ActionLink("eLeave Index", "Index", "Home" , new { area = "eLeave" } , null)</li>
     <li>@Html.ActionLink("ePayroll Index", "Index", "Home", new { area = "ePayroll" }, null)</li>
     <li>@Html.ActionLink("eClaim Index", "Index", "Home", new { area = "eClaim" }, null)</li>

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 9, 2018 9:42 AM
  • User521171331 posted

    Thanks bro 

    Wednesday, May 9, 2018 9:44 AM