I’ve always coded in C# MVC3 when developing web applications. But now i wanted to learn a bit more about developing web sites with just ASP.NET.
But now i’m wondering what a good setup for my code would be. For me, an MVC like pattern seems to be a good way to go. But obviously ASP.NET doesn’t have any router and controller classes. So i guess people have a different way of setting up their code when they do ASP.NET.
So i’m looking for more information on how to get started with this. So not really the basics of ASP.NET, but something that focuses on a good code setup.
Any good tutorials/information about this?
In the past, when building ASP.NET applications, I found the Model View Presenter design pattern to be quite useful in extracting all the code-behind to a presentation layer (separate class library with no ties to web assemblies).
That allowed me to unit test all presenters and logic, and just consider ASP.NET as the implementations of the
IViews.In that approach I’d usually have:
And depending on the application you may need a separate business layer between presentation and the data model, and get the logic out of the Presenters.