This is just a public draft, containing mvc related links…
Best Practices / Richtlinien
Model-Binding entweder mit Parameter-Blacklist, oder über Whitelist
http://blog.maartenballiauw.be/post/2009/05/06/More-ASPNET-MVC-Best-Practices.aspx
Put your controllers on a diet
Controllers should be really thin: they only accept an incoming request, dispatch an action to a service- or business layer and eventually respond to the incoming request with the result from service- or business layer, nicely wrapped and translated in a simple view model object.
In short: don’t put business logic in your controller!
Link list
- http://stackoverflow.com/questions/1317431/best-practices-for-asp-net-mvc
- http://www.codeplex.com/oxite – Sample project: Blog / CMS, good sample
Link list in ScottGu’s Blog
ScottGu’s Blog ASP.NET MVC Framework
- http://weblogs.asp.net/scottgu/archive/2007/11/13/asp-net-mvc-framework-part-1.aspx
- http://weblogs.asp.net/scottgu/archive/2007/12/03/asp-net-mvc-framework-part-2-url-routing.aspx
- http://weblogs.asp.net/scottgu/archive/2007/12/06/asp-net-mvc-framework-part-3-passing-viewdata-from-controllers-to-views.aspx
- http://weblogs.asp.net/scottgu/archive/2009/04/28/free-asp-net-mvc-nerddinner-tutorial-now-in-html.aspx
Compile-time View Checking
Form validation
- MVC 2 – http://weblogs.asp.net/scottgu/archive/2010/01/15/asp-net-mvc-2-model-validation.aspx
- http://blog.codeville.net/2009/01/10/xval-a-validation-framework-for-aspnet-mvc/
- http://www.asp.net/learn/mvc/tutorial-36-cs.aspx
- http://www.asp.net/Learn/mvc/tutorial-37-cs.aspx
- Castle validator anschauen http://www.castleproject.org/components/validator/index.html
MVC Best Practices
- http://codebetter.com/blogs/jeremy.miller/archive/2008/10/23/our-opinions-on-the-asp-net-mvc-introducing-the-thunderdome-principle.aspx
- http://blog.maartenballiauw.be/post/2009/05/06/More-ASPNET-MVC-Best-Practices.aspx
Caching
- http://haacked.com/archive/2008/11/05/donut-caching-in-asp.net-mvc.aspx
- http://stackoverflow.com/questions/790774/caching-best-practices
Mehrsprachigkeit – Best practices
todo
One response to “ASP.NET MVC”
the way I learned MVC was using the Models, Controllers and View fleodrs and data access being separate.To me, this example is very confusing, since in your Repository, you have ListEmployeesViewModel there is no model for the controller in the model folder. I have a very hard time distinguishing how the parts all fit together.