March 2008 Entries

Rhino Mocks is the most popular Mock Object Framework for .NET. The purpose of this blog entry is to provide a brief introduction to Rhino Mocks. In particular, I want to describe how you...

Posted Sunday, March 23, 2008 1:26 AM

The purpose of this blog entry is to explain how you can create unit tests by using Visual Studio 2008. I’m not interested in unit tests in general -- I’m interested in building a particular type of unit test. I want to build unit tests that can be used when following good Test-Driven Development (TDD) practices when building ASP.NET MVC Web Application projects. Not all unit tests are good TDD tests. In order for a unit test to be useful for Test-Driven Development, you must be able to execute the unit test very quickly. Not all unit tests meet this requirement. For...

Posted Thursday, March 20, 2008 5:20 AM

The purpose of this blog entry is to describe, in painful detail, each step in the life of an ASP.NET MVC request from birth to death. I want to understand everything that happens when you type a URL in a browser and hit the enter key when requesting a page from an ASP.NET MVC website.

Posted Tuesday, March 18, 2008 3:30 AM

Typemock Isolator is often referred to the most powerful Mock Object Framework for .NET. I’ve heard people talk about it as “The Big Guns”, “The Nuclear Weapon”, the “Cleanup Guy”. In this blog entry, I’m going to provide you with a brief introduction to Typemock Isolator. In the first section, I’m going to explain the purpose of Mock Object Frameworks and why you should care about them (ASP.NET MVC developers, pay attention). Next, I’m going to provide you with some toy-simple samples of using TypeMock Isolator so you get the idea of how to use the framework. One of the samples...

Posted Sunday, March 16, 2008 8:34 AM

I stumbled across The Art of Unit Testing by Roy Osherove while researching Mock Object frameworks that can be used with ASP.NET MVC. Even though the author is still in the process of writing the book, you can download an early draft of this book

Posted Friday, March 14, 2008 10:21 AM

Yes, you can use ASP.NET AJAX with ASP.NET MVC. Several people have asked me recently how you can use ASP.NET AJAX in an ASP.NET MVC view. In this blog entry, I’m going to explain the problem and the solution. The Problem Normally, if you want to use ASP.NET AJAX in an ASP.NET page, you add a ScriptManager control to the page. The ScriptManager control requires a server-side form control. Therefore, in order to use a ScriptManager control, you must include a server-side form control in a page. Here’s the problem. You should not include a server-side form control in an ASP.NET MVC view....

Posted Friday, March 14, 2008 8:20 AM

The goal of this blog entry is simple: I want to understand everything about ASP.NET AJAX Application events. I want to know how application events work under the covers by performing a close examination of the Microsoft AJAX Library source code for the Application object.

Posted Friday, March 07, 2008 8:04 PM

The goal of the blog entry is simple: I want to understand everything happening under the covers when you take advantage of ASP.NET AJAX inheritance. So, let’s start with a simple code sample: Listing 1...

Posted Thursday, March 06, 2008 5:53 AM

In this blog entry, I examine different methods of building new JavaScript objects from existing JavaScript objects. For lack of better names, I’m calling the first method the Prototype Inheritance method and the second...

Posted Wednesday, March 05, 2008 9:17 PM

There are two mistakes in Chapter 31, Using Server-Side ASP.NET AJAX, both related to a last minute change to the ListView control. Microsoft changed the ListView control to require an itemPlaceholder instead of an itemContainer element in its LayoutTemplate.

Posted Monday, March 03, 2008 7:31 PM

I want to build “pure” client-side ASP.NET AJAX web applications and I want to get the full benefits of a declarative framework. Currently, the ASP.NET AJAX framework does not support a good method of creating declarative client-side controls. In this blog entry, I examine different strategies for implementing declarative client-side controls that target the Microsoft ASP.NET AJAX framework.

Posted Monday, March 03, 2008 11:33 AM