Excerpt: In this post, I’ll share some of the best practices and guidelines which I have come across while developing ASP.NET MVC web applications. I will not cover all best practices that are available, instead add some specific things that have not been mentioned in any blog post out there.
Excerpt: This is the second part of the series and may be the last, till I find some thing new. My plan was to start with routing, controller, controller to model, controller to view and last of all the view, but some how I missed one important thing in routing, so I will begin with that in this post.
Excerpt: In this post, I will share some of the best practices/guideline in developing ASP.NET MVC applications which I have learned in the hard way. I will not tell you to use DI or Unit Test instead I will assume you are already doing it and you prefer craftsmanship over anything.
Excerpt: Today I was asked to help out with some MVC bit’s as the company I work for are currently building a MVC based CMS. One of the developers had placed a rich html editor inside a form (http://tinymce.moxiecode.com/) but when the form was submitted we all we got back was the YSOD (Yellow screen of death).
Excerpt:
One of the main design principles ASP.NET MVC has been designed with is extensibility. Everything (or most of) in the processing pipeline is replaceable so, if you don’t like the conventions (or lack of them) that ASP.NET MVC uses, you can create your own services to support your conventions and inject them into the main pipeline.
In this post I’m going to show 13 extensibility points that every ASP.NET MVC developer should know, starting from the beginning of the pipeline and going forward till the rendering of the view.
Excerpt:
Previously I gave an overview of new tooling features for ASP.NET MVC Framework that we are hoping to make available during MIX 2008 timeframe. You can read more about Overview of MVC Tooling Features for MIX 2008 here.
Goals: ASP.NET MVC Framework is Microsoft’s implementation of MVC framework which is hugely popular in the industry for best practices and conventions. In lines with best practices one of the goals of this new ASP.NET framework is to enable easy unit testable web applications. To ease unit testing and to make it part of our regular application development workflow Visual Studio is introducing integration of unit test projects with ASP.NET MVC Application. Many in the community are already familiar with and are using test frameworks liked Visual Studio Unit Test, NUnit, MBUnit etc. If you have Visual Studio Unit Test framework on your machine (i.e. in Visual Studio 2008 SKUs Professional and Above) then on creation of ASP.NET MVC Web Application you will automatically be prompted to create a test project. Not only that, due to the popular community request Visual Studio will now also provide a mechanism to extend this test framework system to integrate external unit testing frameworks like NUnit, MBUnit, xUnit etc.
Excerpt: At the heart of this comparison are different philosophies particularly around “Constraints are liberating”. This quote came to my attention from David Heinemeier Hansson presentation in 2005 which is here and the first part which is equally important is “Flexibility is overrated”. Personally I really like this approach and it is what makes Ruby on Rails great to use. However ASP.NET MVC has gone in rather an opposite direction.
Excerpt: I live in Montreal - Canada, and here we have two officials languages, French and English, that’s why every website I build must be available in both languages. Building an ASP.NET MVC Website using Localization/Globalization is fairly simple and is pretty much like doing it on a plain old ASP.NET Website.
Excerpt: I made a lot of search to know how to pass JSON object from client code to MVC control. But I could not find any proper example or guide. So finally I made some research and I found that by serializing the JSON object using json.js, it is possible to send serialized data to MVC control from client side.