Mr. Czetty's Blog

  • Using abstract classes as controller parameters in ASP.NET MVC4

    As a part of the API for our product, we have the need to allow the UI to send us a parcel of data, and we need to process it differently based solely on a single parameter in the data.  We have decided to create an abstract model class to handle this, but MVC's DefaultModelBinder doesn't work out of the box on abstract classes (or interfaces).  There are many discussions out there on this, and the accepted way to solve this problem is to create a new ModelBinder class that has more …

    Read More...
  • Accepting multiple parameters the "RESTful" way using ASP .NET Web API

    So I came upon a requirement at work to support accepting multiple ids in the Url of a "REST" request.  I have no idea if this is actually considered RESTful or not, but the idea was to formulate the URL like so:

    GET /FooResource/id1;id2;id3;id4/

    The idea was to be able to retrieve multiple instances of FooResource with one request.

    So, I came up with the following MVC ActionFilter to make my life a little bit easier:

    public class ArrayInputAttribute : ActionFilterAttribute

    { …

    Read More...
  • New logo and photo shoot

    We have a new logo for the House of Czetty site now, expertly personalized for Mrs. Czetty.  We are currently working on a version for me, Mr. Czetty, and the software development side of the House of Czetty brand.

    Tonight, I am going to be putting my best face forward for a photo shoot, and I'm going to be presenting a fresh new look.

    I'm excited about the whole process, and I can't wait to see how the photos turn out!

    Read More...
  • Working hard on the next big thing

    Wow, so much going on these days.  Between my book on fertilization, House of Czetty software projects, taxes, getting the house ready for spring, and Valentine's Day, every waking moment is filled up!  I am excited about everything on the horizon, though.  My book should be ready for first publication in the next few months, House of Czetty's latest software project, codenamed "Dior," will probably be annouced at around the same time.  Through everything, I hope to overhaul …

    Read More...
  • Happy New Year!

    Happy New Year to my readers!  I intend to be much more prolific on my blog in the coming year, especially on my fertilization series.  Also, look for a book on Leanpub in about 6 months!

    Read More...
  • Fertilization Part 1a: Setting up unit tests

    We can't get very far on our project if we cannot be certain that the changes we will make later will not affect the existing code.  In the short-term, this means that we cannot change the API in the library at all, but, more importantly, no functionality can change.

    To accomplish this with a minimum of hurt, the first step is to get unit tests around the existing code.  Since I am not aware of the specifics of how everything is expected to work, these initial set of tests will …

    Read More...
  • An aside: To upgrade or not to upgrade

    If you are following this blog then you know that I am in the beginning stages of a case-study on refactoring a stale project, a process that I have dubbed fertilization.  Well, in the time since I started things, Visual Studio 2012 has been released, and of course I have already picked up a copy.

    So I am now struggling with the choice of upgrading my case study to 2012.  At first, it seemed like a no-brainer.  I'm the only developer, and VS 2012 is the latest and greatest, …

    Read More...
  • Fertilization Part 0: Creating a fork

    Use Case Maker is housed in an old CVS repository.  The first thing that I want to do is to convert that into a more modern source control system, such as subversion or git.  Because of my own personal preferences, I am going to choose git as the repository of choice.  This will also enable me to host the repository on GitHub for my readers to browse.

    I want to retain the existing history, so simply downloading the source and pushing it into a new repository is not an …

    Read More...
  • Fertilization project selected!

    After a not-so-exhaustive search for a project to fertilize (refactor) as a series for this blog, I have decided on an old project I found on SourceForge called Use Case Maker.  The primary goal at the end is to have a new major version completed without affecting functionality in the interim releases.  The current major release on SourceForge is 2.0, so we will be working for a 3.0 release.

    My goals for 3.0 are:

    Upgrade to the 4.0 version of the .NET Framework

    Plug-in …

    Read More...