MVC

Convention-Based Templating in MVC 3

Feb 2, 2011

Today I’m going to explore the templating options available in MVC and try to create a framework to allow you to easily view multiple types of objects.  I’ve never really used the templating options in MVC and I’ve been really impressed with the options available, although some of the lesser-used features are a little counter-intuitive.

Read More →

Dependency Injection in MVC 3

Jan 26, 2011

This post is part of the series I’m doing on the newly released ASP.NET MVC 3.

Read More →

Output Caching in MVC 3

Jan 25, 2011

This post is part of the series I’m doing on the newly released ASP.NET MVC 3.

Read More →

Client-Side Validation in MVC 3

Jan 24, 2011

This post is part of the series I’m doing on the newly released ASP.NET MVC 3.

Read More →

Server-Side Validation in MVC 3

Jan 20, 2011

This post is part of the series I’m doing on the newly released ASP.NET MVC 3.

Read More →

Ajax improvements in MVC 3

Jan 19, 2011

This post is part of the series I’m doing on the newly released ASP.NET MVC 3.

Read More →

Razor View Engine

Jan 18, 2011

This post is part of the series I’m doing on the newly released ASP.NET MVC 3.

Read More →

Using and Testing HTML Helpers in MVC

Jan 17, 2011

If you’ve done any amount of development with MVC you are probably aware that it’s pretty easy to end up with a lot of clutter in your views.  Today I’m going to illustrate how we can use custom helpers to neaten views and also show how we can write unit tests for those helpers.

Read More →

ASP.NET MVC 3 Released

Jan 17, 2011

On Thursday ASP.NET MVC 3 was released.  This was certainly not an unexpected event – the community previews have been available since around July last year, so many of the features have been discussed for quite a while.

Read More →

Authentication with OpenId–Part 2

Jan 14, 2011

I my last post I created a very simple example of how to authenticate users with OpenId.  In that example the user needed to enter the full URL to their OpenId provider.  Today I’m going to modify that example to make the authentication process a little easier on the user.  To give you an idea of what I’m going on about, take a look at the login form for StackOverflow.

Read More →

Authentication with OpenId

Jan 12, 2011

A few weeks ago I blogged about the basics of storing web passwords.  I mentioned that the best solution is to avoid storing web passwords and use OpenId to manage user authentication.  I had the chance to play around with OpenId authentication and found the examples to be rather confusing, so today I’m going to write a very simple example of how to use an OpenId provider for user authentication.

Read More →

Uploading a File with Asp.Net MVC

Jan 11, 2011

I’ve had to write the code for uploading a file to an MVC application quite a few times and every time I seem to struggle to find a decent example.  So, future self, look no further – here is a straightforward example of how to upload a file with MVC.

Read More →

Devs4Devs Presentation – MVC 3

Sep 4, 2010

Thanks to everyone who attended my presentation on MVC 3 at Microsoft Devs4Devs.  As promised, here is the source code for the presentation.

Read More →

Sharpy performance testing

Feb 22, 2010

I recently introduced Sharpy – a view engine designed to allow developers and designers to work together.  Today I’m going to take a look at the performance of the view engine when compared to the default view engine.

Read More →

How to extend Sharpy

Feb 19, 2010

I recently introduced Sharpy – a view engine designed to allow developers and designers to work together.  Today I’m going to show how you can extend Sharpy with your own functions and variable modifiers.

Read More →

Master pages and partial views in Sharpy

Feb 18, 2010

I recently introduced Sharpy – a view engine designed to allow developers and designers to work together.  Today I’m going to take a look at how master pages and partial views are used with this new view engine.

Read More →

Expressions in Sharpy

Feb 17, 2010

I recently introduced Sharpy – a view engine designed to allow developers and designers to work together.  Today I’m going to take a look at how expressions work in Sharpy.

Read More →

Sharpy functions and modifiers

Feb 16, 2010

In my last post I introduced Sharpy – a view engine designed to allow developers and designers to work together.  Today I’m going to list all the different functions and modifiers available and give a short description of how each works.

Read More →

Introducing Sharpy

Feb 15, 2010

Several months ago I blogged about my search for a better view engine for ASP.NET MVC.  I mentioned that the current selection of view engines don’t allow developers and designers to work together – none of the engines are restrictive enough in their syntax.  Today I would like to present my solution to this problem.

Read More →

Permission-based access in ASP.NET MVC

Jan 27, 2010

I recently read an interesting blog about implementing Role-based access in MVC using custom attributes.  I have implemented a similar strategy for Permission-based access by using the session object.

Read More →

How to use View Models

Jan 21, 2010

I’ve had quite a few discussions around view models and the different patterns around using them in MVC.  A while back I read an interesting article by Steve Michelotti about the subject and I would like to expand on his arguments.

Read More →

Use View Models instead of FormCollection

Jan 20, 2010

I have recently been spending quite a bit of time on StackOverflow and I noticed that quite a few of the MVC-related answers make use of the FormCollection class.  If you’re unfamiliar with this class, here is an example of how it gets used:

Read More →

Put JavaScript includes at the bottom of your page

Jan 5, 2010

I was reading the jQuery Cookbook yesterday to try and sharpen my JavaScript skills.  Within the first chapter the book highlights something which I’ve never given much attention to – where in your page to include your JavaScript files.  Here is an excerpt.

Read More →

So you want to learn MVC

Nov 23, 2009

I was recently requested to compile a list of resources on ASP.NET MVC to serve as introduction for newcomers to the MVC framework.  I have recompiled the list here for future reference.

Read More →

Retrieve Views and Submit Forms with Ajax, JQuery and MVC

Nov 19, 2009

In my previous post I was using Ajax to retrieve Json data and update the DOM using JavaScript.  While this is pretty useful you will often find your application quickly becomes JavaScript-heavy and difficult to maintain.  I’m going to illustrate using JQuery and the MVC Ajax libraries to simplify this process.

Read More →

Ajax with JQuery and MVC

Nov 18, 2009

I recently had to explain to a colleague how to do Ajax with JQuery and ASP.NET MVC.  I thought I might put my example here for future reference.

Read More →

The search for a better View Engine – ASP.NET MVC

Aug 20, 2009

I have been evaluating the different view engines available for ASP.NET MVC.  In my last two posts I evaluated Brail and finally dismissed it since it didn’t match up to what I was looking for.

Read More →

Using Brail View Engine with ASP.NET MVC

Aug 18, 2009

In my last post I started to take a look at the Brail View Engine in ASP.NET MVC.  In this post I’m going to take a quick look at some of the other details of using Brail.

Read More →

Using Brail View Engine with ASP.NET MVC – An Introduction

Aug 17, 2009

Over the past 10 months I have done quite a bit of development with ASP.NET MVC, but I have never used any of the custom view engines available.  ASP.NET MVC (like other implementations of the MVC pattern) applies view engine mechanism as a way to replace the rendering methods of the applications.  The built-in view engine is obviously the most commonly used one – the <% tags have become synonymous with ASP.NET and MVC.

Read More →

Building a Bug-tracking website with Windows Workflow Foundation – Part 3

Aug 14, 2009

In my previous post I designed the Bug-tracking workflow and created a custom activity for updating and persisting bugs.  In this post I’m going to try and put it all together.

Read More →

Building a Bug-tracking website with Windows Workflow Foundation – Part 2

Aug 14, 2009

In my previous post I created the outline for the website and introduced Unity as the dependency injection framework.  In this post I’m going to design the actual workflow and show how to manage the persistence of the workflow as well as the domain objects.

Read More →

Building a Bug-tracking website with Windows Workflow Foundation – Part 1

Aug 13, 2009

In the past week or so I have been trying to come to grips with Windows Workflow Foundation (WF).  I have read numerous articles (the good ones are few and far between) and I think I’m finally getting the hang of it.  To this end I’m going to create a Bug-tracking application as an example of creating a workflow-based website.

Read More →

Common Error – The difference between explicit and safe casts

Jul 9, 2009

In this post I’m going to cover a mistake I’ve seen quite often and which can lead to those ugly ‘Object reference not set to an instance of an object’ exceptions.

Read More →

Generating strongly typed content links in ASP .Net MVC with T4 templates – Part 2

Jun 30, 2009

In my previous post I took a look at generating the static content links we use in ASP .Net using T4 templates.  There were a couple of issues which I pointed out and some others which were pointed out to me.

Read More →

Generating strongly typed content links in ASP .Net MVC with T4 templates

Jun 24, 2009

Edit: I have made some corrections to this post in a **subsequent post.**

Read More →