MVC
Convention-Based Templating in MVC 3
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.
Dependency Injection in MVC 3
This post is part of the series I’m doing on the newly released ASP.NET MVC 3.
Output Caching in MVC 3
This post is part of the series I’m doing on the newly released ASP.NET MVC 3.
Client-Side Validation in MVC 3
This post is part of the series I’m doing on the newly released ASP.NET MVC 3.
Server-Side Validation in MVC 3
This post is part of the series I’m doing on the newly released ASP.NET MVC 3.
Ajax improvements in MVC 3
This post is part of the series I’m doing on the newly released ASP.NET MVC 3.
Razor View Engine
This post is part of the series I’m doing on the newly released ASP.NET MVC 3.
Using and Testing HTML Helpers in MVC
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.
ASP.NET MVC 3 Released
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.
Authentication with OpenId–Part 2
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.
Authentication with OpenId
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.
Uploading a File with Asp.Net MVC
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.
Devs4Devs Presentation – MVC 3
Thanks to everyone who attended my presentation on MVC 3 at Microsoft Devs4Devs. As promised, here is the source code for the presentation.
Sharpy performance testing
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.
How to extend Sharpy
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.
Master pages and partial views in Sharpy
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.
Expressions in Sharpy
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.
Sharpy functions and modifiers
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.
Introducing Sharpy
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.
Permission-based access in ASP.NET MVC
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.
How to use View Models
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.
Use View Models instead of FormCollection
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:
Put JavaScript includes at the bottom of your page
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.
So you want to learn MVC
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.
Retrieve Views and Submit Forms with Ajax, JQuery and MVC
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.
Ajax with JQuery and MVC
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.
The search for a better View Engine – ASP.NET MVC
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.
Using Brail View Engine with ASP.NET MVC
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.
Using Brail View Engine with ASP.NET MVC – An Introduction
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.
Building a Bug-tracking website with Windows Workflow Foundation – Part 3
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.
Building a Bug-tracking website with Windows Workflow Foundation – Part 2
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.
Building a Bug-tracking website with Windows Workflow Foundation – Part 1
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.
Common Error – The difference between explicit and safe casts
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.
Generating strongly typed content links in ASP .Net MVC with T4 templates – Part 2
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.
Generating strongly typed content links in ASP .Net MVC with T4 templates
Edit: I have made some corrections to this post in a **subsequent post.**