Subscribe to this Blog

Subscribe to this Blog

July 2008 - Posts - Stephen Walther on ASP.NET MVC

July 2008 - Posts

9
Comments

ASP.NET MVC Tip #27 – Create ASP.NET MVC Specific Visual Studio Add-Ins by swalther

In this tip, I discuss Eric Hexter’s TDD Class Generator Add-In for Visual Studio. This Add-In enables you to generate a class, an interface, and a test class by entering a single keyboard shortcut. Eric Hexter -- who has done valuable work on the...
Filed under: , , ,
5
Comments

ASP.NET MVC Tip #26 – Create a Lightweight Control View Engine by swalther

In this tip, I show you how to create a custom ASP.NET MVC view engine that supports lightweight, declarative controls. I show you how to create both simple controls and controls that display database data. I also show you how to test the rendered output...
Filed under: , ,
11
Comments

ASP.NET MVC Tip #25 – Unit Test Your Views without a Web Server by swalther

In this tip, I demonstrate how you can unit test ASP.NET MVC views without running a Web server. I show you how to unit test views by creating a custom MVC View Engine and a fake Controller Context. The more of your web application that you can test,...
Filed under: , , ,
7
Comments

ASP.NET MVC Tip #24 – Retrieve Views from Different Folders by swalther

In this tip, I demonstrate how you can retrieve a view from any folder in an ASP.NET MVC application. I show you how to use both specific paths and relative paths. Until today, I thought that a controller action could return a view from only one of two...
Filed under: , ,
9
Comments

ASP.NET MVC Tip #23 – Use POCO LINQ to SQL Entities by swalther

In this tip, I demonstrate how you can create LINQ to SQL entities that do not contain any special attributes. I show you how you can use an external XML file to map LINQ to SQL entities to database objects. I’ve talked to several people recently...
Filed under: , ,
21
Comments

ASP.NET MVC Tip #22 -- Return a View without Creating a Controller Action by swalther

In this tip, I demonstrate how you can eliminate controller methods that simply return views. I show you how to use the HandleUnknownAction method to handle every request against a controller automatically. I saw Phil Haack use the following tip in a...
Filed under: , ,
10
Comments

ASP.NET MVC Tip #21 – Fake the Data Context by swalther

In this tip, I demonstrate how to create an in-memory data context class that you can use when unit testing ASP.NET MVC applications that access a database. In this tip, I explain how you can write unit tests for data access code within an ASP.NET MVC...
Filed under: , ,
3
Comments

ASP.NET MVC CodePlex Preview 4 by swalther

Fantastic! A new version of the ASP.NET MVC framework was released on CodePlex today. This new version of ASP.NET MVC includes support for error handling, authorization, caching, and Ajax.  You can download this release at: http://www.codeplex.com...
Filed under: ,
9
Comments

ASP.NET MVC Tip #20 – How to Unit Test Data Access by swalther

In this tip, I demonstrate how you can write unit tests for MVC controller actions that access a database. I show you how to create unit tests for your LINQ to SQL controller action code. Most ASP.NET MVC applications that I write contain a substantial...
Filed under: , ,
6
Comments

ASP.NET MVC Tip #19 – Use the nVelocity View Engine by swalther

In this tip, I demonstrate how you can use the nVelocity view engine, instead of the normal Web Forms view engine, when displaying views from an ASP.NET MVC application. By default, you build views for an ASP.NET MVC application by creating ASP.NET Web...
Filed under: , ,
More Posts Next page »