Sep 302013
 

After using Visual Studio 2012 even more one of the things that I’ve come to appreciate is the new project types and the new things that are included with them.

The first type of project that I started once I started using Visual Studio 2012 was MVC. Now I have used MVC before but I have to say that this is the first time that I’ve really been impressed with what it has to offer out of the box. Microsoft has put a lot of effort into making MVC something that is very user friendly, flexible and something that can can be widely accepted. It also has a lot higher reliance on JavaScript libraries for doing more things client site which I think is a great progression for where the web is heading. 

One of the things I saw that went along with MVC 4 was the Web API. The Web API allowed you to create interfaces and services that you can interact with on the client side without having to do a lot of programming in service logic on the back end. This makes it quicker and easier to write business logic that can then be reused throughout different parts of the application. It also makes it a lot easier to eventually externalize that API to allow third party applications access.

When starting a MVC project I came across a new view engine type that I’d never heard of before called Razor. As I came to learn more about Razor I found out it is a front end programming language similar to classic ASP. It’s goal is to simplify the front end development experience. With that being said I have to say that is a very good at doing just that. Razor front end code is very clean and very precise at getting straight down to the point. The file type on these files is also different. Normally you have an ASPX file. Now the extension for these file types cshtml.

One of the other things I found in the .NET framework 4.5 is the JavaScript and CSS bundling as well as minification. When I first looked into this I was a little bit skeptical as all I thought it really did was combined the files together. But when I dove in deeper into the underlying caching aspect of it I came to realize that they spent a lot of effort into making this flushed out and future proof. When you change a JavaScript and CSS file in a bundle it will automatically update the bundle and update the URL that is referenced in the application for the bundle. This technique takes caching out of the equation entirely, since the URL will change when the file is updated. The minification is also nice the fact that it will remove almost all the unnecessary whitespace from JavaScript and CSS files to greatly reduce the size. Combine the two and you got a winning combination for making web sites perform better using MVC and the.NET framework 4.5.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.