Project structure recommendation for an opensource asp.net mvc project

后端 未结 3 482
温柔的废话
温柔的废话 2021-01-13 15:00

What do you think of the project structure for an opensource CMS application built on asp.net mvc application? The project nickname is \"Gol\".

The basic requiremen

相关标签:
3条回答
  • 2021-01-13 15:07

    Start with 1 project and build something functional. Only add new projects as growth demands. I've started new projects like this, planning a grandiose VS solution with an impressive-looking number of separate projects, but it ends up being a waste of time. You'll end up trying to fit your design into your project structure, which is stupid - the project structure is there to help you. The only way to know for sure how you'll need to organize your code is by having code to organize. It's much easier to do it incrementally as you build, than try to do it all upfront.

    0 讨论(0)
  • 2021-01-13 15:10

    For bigger applications I'd highly recommend using MVC V2's areas. Modularizing your work lends itself to long term maintainability. You can find out about them here: http://msdn.microsoft.com/en-us/library/ee307987(VS.100).aspx

    From there I'd create a Gol.Areas with all of you area projects in there (they will contain your controllers and views for each area).

    I'd also go with a Gol.Communication layer if your dealing with any web servicing.

    I'm giving you this advice at an "enterprise development" level.

    As for the tests, you might be creating lots of work in trying to seperate your Tests away from the logical tiers. Just a thought.

    0 讨论(0)
  • 2021-01-13 15:30

    I usually structure my MVC projects with the following projects:

     web
        web.Controller
        model
        Business Logic
        Data Access
        Services
        Any Libraries for sessions, caching etc.
    

    You have quite a well structured project although there are a few things I think you can do to improve it.

    Create a test project for each layer that you have so that you can isolate the tests. If you change your presentation layer you can dump any tests associated with them and move your bussiness logic easily. I would also create another project for integration tests for each layer I have. This is so that you can exclude them for quicker continuous integration compiles.

    I would also not have the UI code in Goi.Core.UI. Your UI code is probably for presentation malipulation and should live in Goi.web

    Good luck with your project

    0 讨论(0)
提交回复
热议问题