By Darren J. McLeod Based on Microsoft Full web sample eShopOnWeb
eShopOnWeb is a sample ASP.NET Core reference application, powered by Microsoft, demonstrating a single-process (monolithic) application architecture and deployment model. I refactored the Web project of this app to demonstrate my idea of having IOCO as described in my blog post IOCO to organize the code based on the UI/API. I hope developers find it useful, and start organizing their code around the UI/API to make code more modular, cohesive and easier to navigate.
I refactored most of the Web project code into the following top level folders of the Web project
- Admin
- Basket
- Catalog
- Error
- Manage
- Order
- Privacy
- User
These folders were based on the URL, for example Manage comes from https://localhost:44315/manage/my-account, or the page title in the case of Catalog which is the default page and has just the site url https://localhost:44315/. In the process I removed the Extensions, Interfaces, Pages, Services, ViewModels\Manage, Views\Manage, and Views\Order folders.
I left the Areas folder because it is hard coded in the .NET source code and can't be customized.
I left the Account code as I didn't think it would be easy to change.