Archives
-
ASP.NET MVC Tip #27 – Create ASP.NET MVC Specific Visual Studio Add-Ins
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.
-
ASP.NET MVC Tip #26 – Create a Lightweight Control View Engine
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 of the lightweight controls.
-
ASP.NET MVC Tip #25 – Unit Test Your Views without a Web Server
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.
-
ASP.NET MVC Tip #24 – Retrieve Views from Different Folders
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.
-
ASP.NET MVC Tip #23 – Use POCO LINQ to SQL Entities
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.
-
ASP.NET MVC Tip #22 -- Return a View without Creating a Controller Action
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.
-
ASP.NET MVC Tip #21 – Fake the Data Context
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.
-
ASP.NET MVC CodePlex Preview 4
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.
-
ASP.NET MVC Tip #20 – How to Unit Test Data Access
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.
-
ASP.NET MVC Tip #19 – Use the nVelocity View Engine
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.
-
ASP.NET MVC Tip #18 – Parameterize the HTTP Context
Context is the enemy of testability. In this tip, I demonstrate how you can eliminate, once and for all, the HTTP Context from an ASP.NET MVC application.
-
ASP.NET MVC Tip #17 – How to Run an ASP.NET MVC Application
In this tip, I explain the different options for running an ASP.NET MVC application from Visual Studio 2008. I recommend that you run an ASP.NET MVC application directly from the ASP.NET Development Web Server.
-
ASP.NET MVC Tip #16 – Create ASP.NET MVC Macros
In this tip, I show you how you can create a Visual Studio 2008 macro that creates a new MVC controller, view folder, and controller unit test with a single command.
-
ASP.NET MVC Tip #15 – Pass Browser Cookies and Server Variables as Action Parameters
In this tip, I demonstrate how you can pass browser cookies and HTTP server variables to controller action methods in the same way as you can pass form and query string parameters.
-
ASP.NET MVC Tip #14 – Create a Template Helper Method
In this tip, you learn how to create and use templates in the MVC framework that you can use to display database data. I show you how to create a new MVC Helper method named the RenderTemplate() method.
-
ASP.NET MVC Tip #13 – Unit Test Your Custom Routes
In this tip, I demonstrate how you can create unit tests for the routes in your ASP.NET MVC applications. I show how to test whether a URL is being mapped to the right controller, controller action, and action parameters.
-
ASP.NET MVC Tip #12 – Faking the Controller Context
In this tip, I show you how to test ASP.NET intrinsics when building unit tests for an ASP.NET MVC application. I show you how to create a standard set of fake objects that enables you to fake the current user, the current user roles, the request parameters, session state, and cookies.