We have several hundred ASPX files (could be more than that, into the thousands, I haven't actually counted) that currently use no architecture and have all the logic/data access in code-behind files. Moving forward I want to push using Model-View-Presenter (probably the "Supervising Controller" version) to try and get some clean separation.

What would be the best approach to logically lay out these files in my Presentation library? Most of the aspx files aren't organized and just thrown into the main directory, but some are grouped (or are misgrouped e.g. having customer-related files in a folder called "orders"). Should I try to group presenters and views by modules (e.g. have Presentation.Views.Customers and/or Presentation.Customers)? The correct approach does not seem to be just have hundreds of XPresenter and XView files thrown into the class library.

  • 1
    Do you mean that you want to take an ASP.NET application and turn it into an ASP.NET MVC application? The codebase sounds like a horrific nightmare. I honestly wouldn't bother unless I was forced to. I think your time might be better spent documenting as many nuances and procedures as possible, and avoid more than trivial changes to the codebase, biding your time until you have the budget and time for a major refactoring effort or rewrite.
    – maple_shaft
    Commented Dec 28, 2011 at 14:35
  • No, I want to implement Model-View-Presenter to clean up the clutter; realistically we cannot ever turn it into an MVC app as it would take an inordinate amount of time to do (something management is not willing to invest in as it takes away from new features). There will never be the budget and time for a major refactoring effort or rewrite, so our goal at the moment is to try and introduce some structure moving forward with the hope that we can slowly but surely fix things as we go. Commented Dec 28, 2011 at 14:41
  • (cont.) The goal is to make things painless for us as we move forward with having to maintain and add features to the codebase; since we can't just drop it for MVC (or even run them side by side as MVC doesn't run with a WebSite, only a Web Application) MVP is the only logical choice to get at least some separation of concerns. Commented Dec 28, 2011 at 14:43

1 Answer 1


I would sort them by logical grouping first, then by category second

So all your Login objects would be in one area, all your Customer Management stuff in another, etc

Some examples would be

  • MyApplication.Login.Views
  • MyApplication.Customers.Presenters
  • MyApplication.Customers.Views
  • MyApplication.Orders.Models

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.