Simon Ince's Blog

Ramblings of a gadget freak

Posts
  • Simon Ince's Blog

    View Models in ASP.NET MVC

    • 40 Comments
    Q : Should I have a view Model in my ASP.NET MVC architecture? A : Yes. Well, that was a short post! J Being more serious, this is an interesting topic that the advisors and p&p team discussed a few times while they were building the Reference...
  • Simon Ince's Blog

    Dependency Injection is Dead!

    • 38 Comments
    Long live “Dependency Resolution”! OK, so I’m not really serious – but I got your attention right? Truth is, I personally love Dependency Injection , but that doesn’t mean it isn’t without its flaws. The Service Locator pattern is often touted as Dependency...
  • Simon Ince's Blog

    Flattening XML Data in SQL Server

    • 31 Comments
    If you’ve got some XML data in a SQL Server column, how can you flatten it out and query it or present it as though it was relational data? It turns out this is quite easy... Setup Let’s create a simple table to hold our data; CREATE TABLE XmlSourceTable...
  • Simon Ince's Blog

    Conditional Validation in ASP.NET MVC 3

    • 27 Comments
    Update: If you like this, you'll like Mvc.ValidationTookit even more - check out this post ! Some time ago I blogged on Conditional Validation in MVC , and Adding Client-Side Script to an MVC Conditional Validator . A number of people have asked me...
  • Simon Ince's Blog

    What on Earth is a Lambda Expression?

    • 26 Comments
    Recently I've spoken with a few customers that have asked what a Lambda Expression is, which surprised me. It seems that a second wave of developers are now starting to use Lambdas (i.e. those that didn't adopt C# 3.0 immediately) and need some pointers...
  • Simon Ince's Blog

    Conditional Validation in MVC

    • 23 Comments
    Update: If you like this, you'll like Mvc.ValidationTookit even more - check out this post ! Recently I put together samples for different types of validation for some customers, and one of those was Conditional Validation – that is “this...
  • Simon Ince's Blog

    WCSF Application Architecture 2: Application Controller

    • 23 Comments
    This article is part of a series; · WCSF Application Architecture 1: Introduction So why do we have patterns? I think it is basically to reuse good designs, and to adopt a common terminology when discussing software. But so often the subtleties...
  • Simon Ince's Blog

    WCSF Application Architecture 3: Model View Presenter

    • 22 Comments
    This article is part of a series; · WCSF Application Architecture 1: Introduction · WCSF Application Architecture 2: Application Controller Model View Presenter The MVP pattern is effectively an evolution of Model View Controller, and is mainly...
  • Simon Ince's Blog

    ASP.NET MVC’s Html Helpers Render the Wrong Value!

    • 21 Comments
    First things first – oh no they don’t J But it can look like a bug if you’re not used to MVC, so I thought it worth calling out. Scenario Imagine we have a pair of controller actions like this; [ HttpGet ] public ActionResult Index() ...
  • Simon Ince's Blog

    The ASP.NET MVC framework, using the WCSF as a yardstick!

    • 20 Comments
    Well, right up until this morning I was planning on blogging about the similarities and differences between the patterns used by the Web Client Software Factory (WCSF) and the up and coming ASP.NET MVC Framework ... and then I saw Glenn’s post linking...
  • Simon Ince's Blog

    Adding messages to a Validation Summary

    • 19 Comments
    For a while now I’ve used this handy bit of code to add a message programmatically to a Validation Summary control, without associating it with a Validator. I’ve no idea where it came from – perhaps my head, perhaps someone cleverer than I... so if it...
  • Simon Ince's Blog

    WCSF Application Architecture 1: Introduction

    • 17 Comments
    [ Edit ] By popular demand (well, one request!) I've added links to all the articles in this series here; WCSF Application Architecture 1: Introduction (this post) WCSF Application Architecture 2: Application Controller WCSF Application Architecture...
  • Simon Ince's Blog

    Auditing Data Changes in the Entity Framework: Part 2

    • 16 Comments
    In my previous post I described the basic concept behind my auditing approach using the Entity Framework, and covered some of the problems I encountered. This post focuses on the solution I went with; do feel free to comment if you have any thoughts....
  • Simon Ince's Blog

    Mvc.ValidationTookit Alpha Release: Conditional Validation with MVC 3

    • 16 Comments
    Update : I've not forgotten about this everyone, apologies for the delay. My attempt to get approval to publish failed due to vacations (mine and others) so as soon as I can I'll try again. My blog posts on doing conditional validation in MVC have...
  • Simon Ince's Blog

    WCSF Application Architecture 7: Remote Logic with WCF Services

    • 14 Comments
    This article is part of a series; · WCSF Application Architecture 1: Introduction · WCSF Application Architecture 2: Application Controller · WCSF Application Architecture 3: Model View Presenter · WCSF Application Architecture 4: Environment...
  • Simon Ince's Blog

    Hierarchies WITH Common Table Expressions

    • 13 Comments
    Storing hierarchical data in a database is a very common task, and SQL Server 2005 brings us Common Table Expressions (CTEs) – a very useful tool for retrieving such data both elegantly and efficiently. I haven’t actually used these before, and they came...
  • Simon Ince's Blog

    AJAX support in the ASP.NET MVC Framework

    • 12 Comments
    [ Edit : Note that this post is based on a pre-release, and now out of date CTP of the MVC framework. I'd suggest you use it to understand concepts, but look elsewhere now if you're after up to date facts. I've recently added a post about Virtual Earth...
  • Simon Ince's Blog

    WCSF Application Architecture 4: Environment Abstraction

    • 11 Comments
    This article is part of a series; · WCSF Application Architecture 1: Introduction · WCSF Application Architecture 2: Application Controller · WCSF Application Architecture 3: Model View Presenter Abstraction Contraption My previous (and...
  • Simon Ince's Blog

    WCSF Application Architecture 6: Structuring Modules

    • 11 Comments
    This article is part of a series; · WCSF Application Architecture 1: Introduction · WCSF Application Architecture 2: Application Controller · WCSF Application Architecture 3: Model View Presenter · WCSF Application Architecture 4: Environment...
  • Simon Ince's Blog

    Mapping two Tables to one Entity in the Entity Framework

    • 11 Comments
    Whilst at Q-Con a few weeks ago someone asked me about how to map two database tables to one entity in the Entity Framework... something a lot of people want to do at some point or another. At this point I must thank Chris Barker for pinging me some links...
  • Simon Ince's Blog

    JavaScript Architecture

    • 10 Comments
    No, that isn’t meant to be an oxymoron. But something I’ve noticed recently is that people’s approach to JavaScript seems to be diverging down two common paths. This blog post is designed to encourage you to adopt the one you probably aren’t planning...
  • Simon Ince's Blog

    Monitor your ASP.NET Cache API Behaviour

    • 9 Comments
    Recently I was working on diagnosing a performance issue with a customer’s web site with a colleague (this is one of our favourite engagement types so if you need some help let me know J ), and we found that items were being trimmed very regularly from...
  • Simon Ince's Blog

    Closure Exposure: A JavaScript Scope Trick

    • 9 Comments
    You might have seen some JavaScript is wrapped up in funny looking functions, such as this screen shot, and wondered why – even parts of the Microsoft Ajax Framework previews use such an approach. At first it can seem very strange, but don't worry – it...
  • Simon Ince's Blog

    Procedural versus Set-Based SQL

    • 9 Comments
    During my day job I come across customers that are struggling to make a system perform to the expectations of their users, and they often see this as a SQL Server problem. This post is designed to demonstrate how much of a difference your approach to...
  • Simon Ince's Blog

    Hierarchies with HierarchyID in SQL 2008

    • 9 Comments
    If you’ve been following my blog you should remember a couple of posts about hierarchical data in SQL Server, and how Common Table Expressions can be a great way to extract that data. If you’ve not read them, you can find them here and here . In SQL...
Page 1 of 5 (124 items) 12345