Announcement: Control Alt Development

Control Alt Development

Control Alt Development

Last week my partners and I launched a new custom software development company. Here is our official announcement:

We are thrilled to officially announce the launch of our new venture, Control Alt Development, a web solutions and custom application development company that is committed to providing great value to our customers by saving them time and money vs the competition! We offer a wide range of solutions including custom company websites, company portals, SEO, e-commerce, line of business applications, business process automation, and custom mobile apps for all platforms. I’d like to invite you to check out our new site To help spread the word and get the inside scoop with updates, please like our page on Facebook, follow us on Twitter or LinkedIn. If you have a project that you need help with or know someone that does, drop us a line at [email protected]. Thank you in advance for all of your support during this exciting time for our company!

Rummell Web Solutions

logoAlmost a year ago I started my own consulting business. I have primarily worked for another contractor, Leicher Web Design, but I’m now looking to take on more of my own clients. I have over 8 years of professional web development experience, specializing in ASP.NET web development. If you’re interested, please visit my company web site for more information.

Rummell Web Solutions

Steam Achievements for Facebook Update

A few years ago I wanted to create a Facebook application. I chose to develop an app that integrated with the Steam Community API. It was a fantastic learning experience where I was able gain valuable javascript and ajax experience I wasn’t getting at my day job. Later, I converted from ASP.NET Web Forms to ASP.NET MVC. This again was something I wasn’t exposed to at my day job.

Since then, however, numerous Facebook API changes and availability issues with the Steam Community API have made just keeping the app working a constant struggle. I poured hundreds of hours into maintaining the app while adding very little new functionality. It was no longer a valuable experience. Not to mention that in addition to my time, I received a total of $20 of revenue from the app. Now I made this open source from the beginning and I wasn’t expecting to make a profit. I wanted to provide a service that users wanted while expanding my development skill set, and constant breaking API changes wasn’t allowing me to do so.

What about my users? I was thrilled when I began to see thousands of users adding my app. I strived to keep the app usable, but at a certain point I just gave up. The unreliable availability of the Steam Community API was out of my control, and it completely broke my most requested feature – automatic publishing. I’ve let my users down by promising something that was ultimately not possible for me to deliver.

So what now? Should I resurrect this pile of somewhat working code and attempt to keep it going? If I do, how long until I miss another breaking change? Maybe it’s my fault for not watching the Facebook API change log on a daily basis. My current plan is to simplify the  app as much as possible and attempt to keep the core functionality working. We’ll see how it goes.

How I bought home theater audio for half price

I’m taking a break from web development topics today to talk about one of my other interests: home theater. It all started when I saw a pair of Pioneer bookshelf speakers on woot! for half the retail price. A few years back, I bought an all in one surround/DVD player/receiver. It was one of the few times that I didn’t do a lot of research before making an electronics purchase. Being somewhat of an audiophile, I was never happy with it. It worked, but the sound wasn’t crystal clear and there was very little bass. Fast forward to this past winter when I saw that pair of bookshelf speakers on woot!. Pioneer had always treated me well for car audio, so I was interested. I read tons of reviews, checked prices on (my online retailer of choice), and decided to make the purchase.

When the speakers arrived, I plugged them into an old receiver I had since college (not part of the all in one) and was amazed at the clarity and overall performance. I did some research and discovered that there were matching center, floor standing and subwoofer speakers from Pioneer as well. I checked out the other speakers and various receivers on Amazon and was taken back by the prices. Amazon’s prices are usually pretty good, but it was still within 10% of suggested retail. I wasn’t counting on everything showing up on woot!, nor did I want to wait that long. However, another service from the good people at woot! was able to help me out.

Deals.woot! is a community run site that lists deals found anywhere on the internet. I did a search for “Pioneer” and found a few expired results that matched my bookshelf speakers. Then I clicked the advanced search link and unchecked the “expired deals” box. Perfect! but I didn’t want to commit to checking this search on regular basis. I took my chances with the RSS feed icon in Chrome’s address bar. The feed matched my search parameters, so all I had to do was add it to my Google Reader subscriptions and I had instant Pioneer deal notifications. Over the course of the next few months, every remaining piece went on sale for 40-50% off at Newegg.

I may have gotten lucky, having the entire set of speakers plus receivers go on sale in such a short amount of time, but that doesn’t mean I won’t try deals.woot’s search results RSS feed again.

xVal for WebForms without xVal

I’ve been working on xVal for WebForms without xVal in the jQuery.Validate branch. So far I’ve got basic server and client side validation for most data annotations validation attributes and server side validation for IValidatableObject implementers. The only challenging part so far was understanding how to serialize the validation rules for the jQuery Validate add method.

$("#txtClientName").rules("add", {
 required: true,
 minlength: 5,
 messages: {
   required: "Client name is required.",
   minlength: "Client name must be at least 5 characters."

I finally decided to implement JavaScriptConverter, which is used with JavaScriptSerializer. The Serialize method is what takes the Rule collection and converts it into two separate dictionaries, one for rules and one for messages. This allows the JavaScriptSerializer to properly serialize the dictionaries for the add method options parameter.

public class RulesJavaScriptConverter : JavaScriptConverter
    private readonly ReadOnlyCollection<Type> _supportedTypes =
        new ReadOnlyCollection<Type>(new List<Type>(new[] {typeof (RuleCollection)}));

    public override IEnumerable<Type> SupportedTypes
        get { return _supportedTypes; }

    public override object Deserialize(IDictionary<string, object> dictionary, Type type,
                                       JavaScriptSerializer serializer)
        throw new NotSupportedException();

    public override IDictionary<string, object> Serialize(object obj, JavaScriptSerializer serializer)
        return Serialize(obj as RuleCollection, serializer);

    public IDictionary<string, object> Serialize(RuleCollection rules, JavaScriptSerializer serializer)
        if (rules == null)
            throw new ArgumentNullException("rules");

        Dictionary<string, object> options =
            rules.ToDictionary<Rule, string, object>(rule => rule.Name, rule => rule.Options);
        Dictionary<string, string> messages =
            rules.ToDictionary(rule => rule.Name, rule => rule.Message);

        Dictionary<string, object> result =
            new Dictionary<string, object>(options) {{"messages", messages}};

        return result;

And here’s how I’m using it.

StringBuilder validationOptionsScript = new StringBuilder();
validationOptionsScript.AppendFormat("$('#{0}').rules('add', ", _controlToValidateId);

JavaScriptSerializer serializer = new JavaScriptSerializer();
serializer.RegisterConverters(new[] {new RulesJavaScriptConverter()});
serializer.Serialize(rules, validationOptionsScript);


The next step will be figuring out validation groups. I also plan on renaming the project. My best idea so far is jQuey Validate.NET. It’s not the most creative, but it gets the point across.

MessageBox – The jQuery Plugin

Now that I’ve been working more and more with ASP.NET MVC, I’ve been rewriting some of my server side controls with jQuery plugins. A while back I shared my version of Janko’s popular MessageBox control. I’ve created a similar effect with a jQuery plugin based on the Highlight/Error examples on the jQuery UI Themes page.

Here’s an example:


<div id="infoMessage">
    To learn more about ASP.NET MVC visit <a href="" title="ASP.NET MVC Website"></a>.
<br />
<div id="errorMessage" style="display: none">
<script type="text/javascript">
    $(document).ready(function ()

            type: "error",
            message: "Oops! An enexpected error has occurred.",
            dismiss: false

The message function accepts the following optional parameters:

  • type: “info” or “error”. Default is “info”.
  • message: “your message”. Default is the content of the element.
  • dismiss: true or false. Default is true. If true, “Click to dismiss” will be appended to the message and clicking the message will hide it.

I’ve created a plugin project at and I’m hosting the source at

The State of xVal for WebForms

I’ve been neglecting xVal for WebForms for a while now, mainly because I’m not sure which direction to take it. The xVal project is now deprecated in favor of the client side validation support introduced in ASP.NET MVC 2. This is obviously a problem since xVal for WebForms is built on top of xVal.

I think there are a few directions the project could take. The more traditional WebForms approach would be to simply generate the standard System.Web.Web.UI validation controls based on a model’s DataAnnotation attributes. I’m a fan of this approach as it makes a lot of sense to WebForm developers. For example, consider the following model:

public class Booking
    [Required(ErrorMessage = "Client Name is required.")]
    public string ClientName { get; set; }

    [Range(1, 20, ErrorMessage = "Number of Guests must be between 1 and 20.")]
    public int NumberOfGuests { get; set; }


The generated validators would be very similar to the following:

<asp:RangeValidator ID="valNumberOfGuests" runat="server" Display="Dynamic"
ControlToValidate="txtNumberOfGuests" Type="Integer" MinimumValue="1" MaximumValue="20"
ErrorMessage="Number of Guests must be between 1 and 20."/>

<asp:RequiredFieldValidator ID="valClientName" runat="server" Display="Dynamic"
ControlToValidate="txtClientName" ErrorMessage="Client Name is required." />


The other option is to find a way use the ASP.NET MVC validation bits with WebForms. ASP.NET MVC 2 uses the MicrosoftAjax library, while ASP.NET MVC 3 introduced unobtrusive validation with jQuery Validate. This approach would work a lot like the current project, but it would utilize MVC instead of xVal. I have to admit I’m not thrilled about referencing System.Web.Mvc in a WebForms project.

Yet another option is to generate jQuery validation scripts from scratch, using the methods Dave Ward has suggested. I like this idea since it doesn’t put a dependency on MVC bits.

It took me a while, but after working with WebForms and trying to make validation better, i.e. more like MVC, I can’t help but think that the best option is to simply move to MVC. But xVal for WebForms can still help projects that can’t be converted to MVC. I’ve already created a branch prototyping the first, most WebForms friendly option. If you use xVal for WebForms or are interested in attribute based client and server side validation, please let me know which option you would prefer.