Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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 Dec 28 '11 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. – Wayne M Dec 28 '11 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. – Wayne M Dec 28 '11 at 14:43
up vote 3 down vote accepted

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
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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