Simon Ince's Blog

Ramblings of a gadget freak

Browse by Tags

Tagged Content List
  • Blog Post: Injecting Custom HTML Attributes in ASP.NET MVC

    Recently Stuart Leeks and I have developed a worrying pattern of having the same ideas at the same time. I’m starting to doubt we’re different people. Except he’s about a foot taller so maybe that’s aspirational from my side. Our latest coinciding of ideas was a way to automatically...
  • Blog Post: Templated Razor Delegates combined with Partial Views

    I was with a customer in Germany this week, and just before I left one of the (rather talented I might say) developers asked me about passing markup into an HtmlHelper extension. It turns out this is pretty easy, as covered by Phil Haack under Templated Razor Delegates . However, I particularly like...
  • Blog Post: Mvc.ValidationTookit Alpha Release: Conditional Validation with MVC 3

    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 always been popular, and I’m frequently surprised...
  • Blog Post: Immersive MVC and jQuery: Project Silk

    Patterns and Practices have just released their latest round of guidance for developing web applications - “Project Silk”. I’ve been watching what they generate closely and I think you’ll be impressed. To quote the landing page; “Project Silk provides guidance for building maintainable cross-browser...
  • Blog Post: Project Silk: Patterns and Practices do Rich Web Apps

    My blog has been quiet of late – because our team is busy I think. We’re recruiting by the way Something I’ve been wanting to blog about for a while now is “Project Silk”. This is Patterns & Practices latest round of web development guidance. Karl Shifflett  is the man at the wheel, so be sure...
  • Blog Post: Detecting which button was clicked in MVC

    I’ve seen a few hacks in the past to try and work out which button caused a form POST in ASP.NET MVC, but the truth is it is pretty easy. Step 1 : Inside your form, add two Submit buttons. Add a name attribute to both (note it isn’t added by MVC by default); 1: < p > 2: < input type ="submit"...
  • Blog Post: Conditional Validation in ASP.NET MVC 3

    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 to update the sample to MVC 3, so guess what –...
  • Blog Post: ASP.NET MVC 3 Optional Parameter Routing Issue

    Update : Phil Haack has now blogged on this under Routing Regression With Two Consecutive Optional Parameters . When upgrading the Labs and Demo code for a course I run from MVC 2 to MVC 3 I discovered some odd behaviour with one of the routes. We have a very simple route to handle an “archive”...
  • Blog Post: Unit Testing ASP.NET MVC Routes

    Two things I always encourage customers to do are; Always delete the default route pattern after a File –> New project. This helps you focus on designing your routes throughout your site, and helps reduce SEO-unfriendly routes etc. Always unit test your routing table. For number two, this is because...
  • Blog Post: View Model versus Domain Entity Validation with MVC

    I blogged way back in January about what I see as the three variants of View Model usage in ASP.NET MVC. If you’ve not read that post, check it out here and report back! The Problem What I’ve started to see is that many other developers like my approach of defaulting to Variant 2 (a container view model...
  • Blog Post: Different Routes for Different Hosts Using Constraints

    I had the pleasure of visiting some guys in Munich this week to talk about ASP.NET MVC. Well, the time with them was a pleasure, but I did have two awful airport experiences due to snow in 48 hours! Something we discussed that I’ve come across before is using different routes depending upon the domain...
  • Blog Post: Controller Action Design in MVC

    Validate, Act, Translate, and Respond. That’s about it. I’ve been trying to come up with a nice acronym for how to structure code in Actions for some time now, and this is the best I have managed. I wish it spelt a nice word – so if you’ve a better suggestion shout up. What...
  • Blog Post: Adding Client-Side Script to an MVC Conditional Validator

    Update: If you like this, you'll like Mvc.ValidationTookit even more - check out this post ! In a previous post I covered how to write a conditional validator to work with ASP.NET MVC, and a little gotcha to avoid. However, I didn’t include any details on how to wire up this validator with some...
  • Blog Post: Conditional Validation in MVC

    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 field is required if another field is true”...
  • Blog Post: jQuery.validate and Html.ValidationSummary playing nice together

    A customer recently asked me how to get MVC with the MVC Futures project’s MicrosoftMvcJQueryValidation.js adapter file to play nicely with the Validation Summary HTML helper. It turns out that this functionality isn’t built into the adapter script file. They also pointed me at this post...
  • Blog Post: ASP.NET MVC’s Html Helpers Render the Wrong Value!

    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() { var model = new MyModel { Count = 1 ...
  • Blog Post: jQuery + MVC = Progressive Enhancement

    If you write a lot of JavaScript, you really should consider adopting Progressive Enhancement as the standard way that you work. This is basically whereby you write a web site without script, and then enhance it with script. The result is a site that does not rely on JavaScript (and hence works with...
  • Blog Post: Important news for ASP.NET MVC, Ajax and jQuery

    It's been a busy period for announcements, so if you've not heard check these two out; 1. ASP.NET MVC 2 was released late last week! See Scott's post. 2. We've announced that we're investing heavily in (by contributing to) jQuery as the JavaScript platform of choice for MVC development, and that...
  • Blog Post: Packaging UI Components in MVC

    Something I get asked by most customers starting out with ASP.NET MVC is how they should package, group, factor, and reuse their UI components. We're all used to thinking about User Controls, Custom Controls, and other Web Forms approaches. But rest assured, MVC provides a wealth of options. The thoughts...
  • Blog Post: Generic or Specific Routes?

    A topic of discussion I've heard a few times when using Routing in ASP.NET concerns whether you should use the default generic route pattern for most of your controllers, or whether you should specify individual routes for every action. (this applies primarily to ASP.NET MVC today, but as routing...
  • Blog Post: View Models in ASP.NET MVC

    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 Implementation for the soon-to-be-complete Web...
  • Blog Post: Check out the Web Client Guidance

    If you've not come across the Web Client Guidance that patterns & practices have been working on, now is the time to head on over to their CodePlex site; http://webclientguidance.codeplex.com/ The team have been really busy pulling together resources, advice, and guidance on a lot of topics...
  • Blog Post: Virtual Earth meets MVC

    Something I do quite a bit with customers is to help them understand and use Virtual Earth... plus I’ve been doing some overviews of the beta of the ASP.NET MVC Framework, so it seemed a great combination. How would you best combine them? Note : This post is based on the October 2008 Beta of the ASP...
  • Blog Post: More MVC vs MVP

    Phil Haack , currently famous for working on the ASP.NET MVC Framework , has just blogged a great article comparing Model View Controller and Model View Presenter . I’d highly recommend giving it a read. There is also an old post of mine here comparing MVC and MVP within the context of the Web Client...
  • Blog Post: MVC and Unity

    Well it’s a week of news; Scott Guthrie has posted an update on the ASP.NET MVC Framework roadmap , and the Unity Dependency Injection Framework has just released a CTP (via Grigori )... What’s more, David Hayden is first out of the gate with a nice brief post on combining the two ...
Page 1 of 2 (30 items) 12