try-catch-FAIL

Failure is inevitable

NAVIGATION - SEARCH

Fun little ASP.NET MVC bug

I have a master page that serves as a template for a few related pages.  Both the master page and the views that use it are strongly typed, and they all use the same view model data type.  The declarations look like this: <%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage<SearchDataModel>" MasterPageFile="~/Views/Shared/InSpire.Master" %> ... <%@ Page Language="C#" MasterPageFile="Search.Master" Inherits="System.Web.Mvc.ViewPage<SearchDataModel>" %> ... Access the model works ju... [More]

An auto-hiding menu bar with jQuery

What do you do with links/buttons/actions that are likely to be infrequently used, but should still be available to users anywhere in the system?  That’s the question I had to answer for the new InSpire search engine we’re working on at my day job.  The sort of links I am talking about are logout, preferences, help, and various admin commands (for administrators only).  These actions are not really part of the application per se, they are more part of the basic application framework that needs to be available to the user.  We didn’t want to take up valuable space in our UI ... [More]

A simple WCF host application

I’ve been struggling with getting some of our backend components to play nice over WCF for the past couple of days.  Our situation is a little more complex than most I think; our systems have dependencies on a variety of COM libraries, uses some Java APIs via IKVM.NET, and has differing capabilities as far as 64-bit goes.  What didn’t work So I tried many things over the course of the last week.  The following is basically a brain dump of every issue I ran in to as well as solutions if I ever found one: IIS Hosting The services we were trying to host were to be exposed over... [More]

Please stop over-using the var keyword

I just watched an excellent presentation by Jimmy Bogard on UI testing with ASP.NET MVC.  While I really enjoyed the presentation and got a lot of really good ideas for how to improve how I work with MVC, I saw something that I really did not like: lots of var keywords.  Here’s an example (recreated from memory so it might not be exactly right) of one of the methods he showed during his presentation: ... var id = UINameHelper.GetName(expression); var func = expression.Compile(); var value = func(model); ... What’s wrong with that code?  Well, unless I know the AP... [More]

The long road to fixing delete behavior in liteGrid

A lot has been going on with liteGrid recently.  The application at my day job that necessitated its creation is nearing production, and numerous additional features are being implemented in support of finishing that app.  One of the big things that recently came up was making sure delete operations worked when the grid was in “tree grid” mode (meaning the TreeGridModule was loaded).  While liteGrid has supported deletes for some time, it didn’t work correctly with tree grids.  When I was tasked with fixing this deficiency, I initially thought “this will be easy, I just nee... [More]

Improving jQuery&rsquo;s Validation Plug-in

One of the 50 or so tasks I’m juggling at my day job deals with coming up with UI standards for one of our applications.  I’m trying to think through every common scenario we have, design how it should work from a UI stand point (both the perceived UI as well as the HTML markup and CSS), and create examples to illustrate the standards.  One of the scenarios I thought of was forms and validation.  Ugh.  I have spent the better part of a day now fighting with the jQuery Validation plug-in.  It is the defacto standard for validation in jQuery.  While it is powerful, ... [More]

The additive nature of bad code

It really shouldn’t be a surprise, but I have recently witnessed firsthand how a little bad code sprinkled here-and-there quickly adds up to a lot of BAD code that’s painful to work with.  That’s the scenario we’re facing now with our ASP.NET MVC application.  Our team conducts peer reviews for every bug/feature, but we’ve still built up a small mountain of technical debt that we’re going to have to pay sooner or later.  Our once-clean code base has become complex and difficult to work with.  Even simple changes are starting to take progressively longer to implement.  ... [More]

liteGrid &ndash; now with draggable rows!

I’ve just finished up the draggable rows module for liteGrid.  You can check out the demo page here.  The module supports the tree-grid module (but does not require it).  It’s built using jQuery UI’s draggable and droppable behaviors.  I’ve tested it on IE 8, Firefox 3.5, and Chrome, and it seems to work fine everywhere.  If you find a bug, please report it. As part of this change, I’ve altered the behavior of the tree-grid module.  Prior to this release, it added it’s own column for the tree expander.  As of this release, it (and the draggable rows module) ... [More]

Product Review: Balsamiq Mockups for Desktop

It seems like I’ve been doing a lot of user-experience (UX) design at my day job lately.  It’s not an area I consider one of my core strengths.  Up until recently, I would actually say it was a major weakness, but I was fortunate enough to take a HCI (human-computer interface) class while working on my masters degree. That class got me pointed in the right direction (I think).  I still suck at matching colors and coming up with pretty graphics, but I like to think that I can usually come up with good ideas for how things should be laid out and what the user experience should be ... [More]