try-catch-FAIL

Failure is inevitable

NAVIGATION - SEARCH

CodeStock 2012 Wrap Up

Another CodeStock has come and gone.  I had a lot of fun this year, and I feel like I walked away with a lot of new knowledge, new ideas, and even a slightly altered perspective on things.  Thanks, everyone, who attended either of my sessions.  I really enjoyed presenting SpecsFor.Mvc for the first time, and I also enjoyed talking about StructureMap (perhaps a bit too much since I didn’t have enough time to cover everything).  I hope everyone that attended learned at least a little something new.  I had hoped to have my slides and code posted by now, but I just haven’t... [More]

Using SpecsFor.Mvc - Establishing Context with Seed Data

SpecsFor.Mvc gives you a lot in a single NuGet package.  You get a test web host, a strongly-typed API for navigating around and interacting with your MVC app, and standard hooks for dealing with cross-cutting concerns like authentication, but you also get hooks that you can use to add your own behavior.  In this post, I’ll show you how to use one of those hooks to load seed data into your application to facilitate testing. More...

Entity Framework - So close, but yet so far!

I decided to revisit Entity Framework for a project I’m working on.  It’s been a while since the last time I gave EF a fair shake (way back when it was first released).  I can sum up my impressions of the 4.5 version with a single word: disappointing.  EF has come a very long way since the initial release, no question about that, but there are still so many areas where NHibernate trumps it that I can’t imagine using it for a real production app.  Code First is a pale imitation of Fluent NHibernate, and EF’s schema generation capabilities are very limited compared to what NH... [More]

See me at devLink 2012!

I’m going to be attending and speaking at devLink this year!  This will be my first year attending, but I’ve always heard great things about it and I’m very much looking forward to experiencing it first-hand.  And if you can’t catch me at devLink in August, don’t forget that I’ll be at CodeStock next month, too!

Musings on SpecsFor 3.0

I’ve been thinking a lot lately about the current short-comings of SpecsFor.  While I’m pretty happy with the end-user experience, the internals have become complex and confused.  I’m also encountering new testing scenarios as I’m writing more and more full integration specs with SpecsFor, and I’m finding that SpecsFor isn’t able to help with those scenarios in the ways I would like for it to.  I have some ideas for SpecsFor 3.0 that I think will simplify the core while also making SpecsFor more flexible and more powerful. More...

Using SpecsFor.Mvc - Dealing with Authentication

In all of the SpecsFor.Mvc examples I’ve posted so far, I’ve omitted one common cross-cutting requirement of web applications: authentication!  Most web apps have some sort of authentication, and we need to be able to test our core application logic without this cross-cutting concern getting in the way.  SpecsFor.Mvc makes it easy to achieve exactly that, as I’ll show you in this post. More...

Using SpecsFor.Mvc - Reading Data

So far in the “Using SpecsFor.Mvc" series, I’ve shown you how to navigate using the strongly-typed API and how to fill out and submit forms.  In part three of my series, I’ll show you how to create automated acceptance tests for your ASP.NET MVC application that verify expected data is displayed on a page.  More...

... are we really arguing about semicolons now?

I know I’m late to the party, but this issue reported in Bootstrap has created quite a stir across the Interwebs and Twitterverse.  Chants of “Down with Semicolons!” by the “JsHipsters” and of “LEARN 2 CODE NEWB” by the “JsVets,” though entertaining, aren’t really doing anyone in the community any good. More...

Introducing MvcDisplayTemplates

Beginning with version 2.0, ASP.NET MVC has shipped with a set of templates for both displaying and editing data.  These templates are buried within the System.Web.Mvc assembly.  While you can override them outright, you cannot easily extend them since they’re locked down.  The new MvcDisplayTemplates NuGet package fixes this problems. More...

Random Thoughts

Here are some random thoughts that have been bouncing around my head for the last couple of days.  Keep your codebase in a releasable state.  If you are practicing scrum or some other iterative process, make sure your code is releasable at the end of an iteration.  I’m not exactly sure what you do if you’re practicing something like Kanban, but the idea is the same. Release your application often.  Even if it isn’t to production, go through the process of releasing your code as frequently as you can.  This will force you to design everything to streamline the releas... [More]