Articles : Page 1 of 5
-
ASP.NET MVC Now Accepting Pull Requests
Mar 1229Changing a big organizations is a slow endeavor. But when people are passionate and persistent, change does happen. Three years ago, the ASP.NET MVC source code was released under an open source license. But at the time, the team could not accept any code contributions. In my blog post talking about that release, I said the following (emphasis added): Personally (and this is totally my own opinion), I’d like to reach the point where we could accept patches. There are many hurdles in the w...
-
ASP.NET MVC, Web API, Razor and Open Source
Mar 1228Microsoft has made the source code of ASP.NET MVC available under an open source license since the first V1 release. We’ve also integrated a number of great open source technologies into the product, and now ship jQuery, jQuery UI, jQuery Mobile, jQuery Validation, Modernizr.js, NuGet, Knockout.js and JSON.NET as part of it. I’m very excited to announce today that we will also release the source code for ASP.NET Web API and ASP.NET Web Pages (aka Razor) under an open source license (Apache 2...
-
Using QUnit with Razor Layouts
Dec 1111Given how central JavaScript is to many modern web applications, it is important to use unit tests to drive the design and quality of that JavaScript. But I’ve noticed that there are a lot of developers that don’t know where to start. There are many test frameworks out there, but the one I love is QUnit, the jQuery unit test framework. Most of my experience with QUnit is writing tests for a client script library such as a jQuery plugin. Here’s an example of one QUnit test file I wrote a ...
-
Razor Donut Caching
Nov 1126Donut caching, the ability to cache an entire page except for a small region of the page (or set of regions) has been conspicuously absent from ASP.NET MVC since version 2. Mmmmm, donuts! – Photo by Pzado at sxc.hu This is something that’s on our Roadmap for ASP.NET MVC 4, but we have yet to flesh out the design. In the meanwhile, there’s a new NuGet package written by Paul Hiles that brings donut caching to ASP.NET MVC 3. I haven’t tried it myself yet, so be forewarned, but judging by th...
-
Loading jQuery Consistently in a .NET Web App
Oct 1110One thing that frequently comes up in discussions when using jQuery is how to best load the jQuery library (as well as other commonly used and updated libraries) in a Web application. Specifically the issue is the one of versioning and making sure that you can easily update and switch versions of script files with application wide settings in one place and having your script usage reflect those settings in the entire application on all pages that use the script. Although I use jQuery as an exa...
-
7 books for a .NET Summer reading list (2011 version)
Sep 1112In the previous years “n books for a .NET Summer reading list” used to be the title of the book list post. Now, in the last of my 4 posts with books suggestions I am back to the original title. In my introductory post I said I would have listed only a few web development on .NET books. In fact there are only 2. Web Development on .NET Professional ASP.NET MVC 3 While Professional ASP.NET MVC v2 was mainly an update of the original professional MVC1 book, the third remake, due to the nature o...
-
New Ajax Grid Scaffolding NuGet Package for MVC 3
Aug 1118EDITOR’S NOTE: Microsoft has an amazing intern program. For a summer, these bright college students work with a feature crew getting real work done, all the while attending cool events nearly every week that, frankly, make the rest of us jealous! Just look at some of the perks listed in this news article! This summer, the ASP.NET MVC is hosting an intern, Stephen Halter, who while very smart, doesn’t have a blog of his own (booo! hiss!). Being the nice guy that I am (and also being amenable ...
-
Writing an ASP.NET MVC Controller Inspector
Aug 111199.99999% of the time (yes, I measured it), a controller in ASP.NET MVC is a type, and an action is a method — with reflection as the glue that holds it all together. For most folks, that’s the best way to view how ASP.NET MVC works. But some folks like to dig deeper and get their hands dirty a bit by taking a peek under the hood. Doing so reveals that while the reflection based mapping of controllers types and actions to methods is true by default, it can be easily changed to something else...
-
Professional ASP.NET MVC 3 is available!
Aug 1108I hate code samples in technical books! No seriously, this is bile I’m not afraid to give a permalink to (nor am I afraid to end a sentence with a preposition, so there!). Even the shortest code samples are a pain to type in. And if they show anything reasonably interesting, they’re probably too long to type in. Of course, nobody actually types in the sample code, they grab the code from the companion CD (blech!) or download zip files containing the code from the companion website. With ...
-
Text templating using Razor the easy way
Aug 1102As a web guy, I’ve slung more than my fair share of angle brackets over the tubes of the Internet. The Razor syntax quickly became my favorite way of generating those angle brackets soon after its release. But its usefulness is not limited to just the web. The ASP.NET team designed Razor to generate HTML markup without being tightly coupled to ASP.NET. This opens up the possibility to use Razor in many other contexts other than just a web application. For example, the help documentation fo...

