Blog

  • ScheduleWidget Database Persistence

    In previous posts I've talked about how to use ScheduleWidget to model the Critical Mass bicycle ride. This is a ride which is held the last Friday of every month. Also in those previous tutorials I relied on enumerations to show things more clearly. For instance here is the Critical Mass event: Continue reading...

  • Recurring Events with ScheduleWidget and FullCalendar

    Adam Shaw wrote an awesome full-sized JQuery plugin called FullCalendar that works hand-in-glove with ScheduleWidget. In this post, I'm going to show you how to display events from ScheduleWidget on Shaw's calendar control. Let's keep this walkthrough simple and shoot for something like this: Continue reading...

  • ScheduleWidget Tutorial 3

    This is the third in a series of tutorials on ScheduleWidget, a scheduling engine that handles recurring events for calendars. As with the previous tutorials we're going to use the Critical Mass bicycle event. This event happens in many major cities on the last Friday of every month. We looked at the Occurrences() method and the dates the engine generates. Now let's take a quick look at two other related methods: Continue reading...

  • ScheduleWidget Tutorial 2

    In the last post I introduced ScheduleWidget and went through a simple exercise of creating a recurring schedule based on the Critical Mass bicycle ride. I'm going to assume you've run through that exercise. Critical Mass occurs the last Friday of every month. But let's suppose that there's a second ride called Fair Weather Critical Mass (or FW for short). FW still occurs the last Friday of every month but its riders don't really like to ride in cold temperatures. So they start riding in May and then wrap it up in September. Continue reading...

  • ScheduleWidget Tutorial 1

    A few days ago I announced the release of ScheduleWidget, a scheduling engine that handles recurring events for calendars. Now I'd like to do a simple introductory tutorial to show how to use it. Consider the Critical Mass bicycle event, which happens in many major cities on the last Friday of every month. Given that information we want ScheduleWidget to provide us with the upcoming dates of the event. Continue reading...

  • ScheduleWidget 2.0 Released

    Without much fanfare I'd like to announce the release of ScheduleWidget. ScheduleWidget is a .NET 4.0 scheduling engine that handles recurring events for calendars. I was influenced by Martin Fowler's white paper "Recurring Events for Calendars" in which he describes the broad software architecture for a recurring events scheduling engine. But I did not find any implementation of his idea in the wild. So this led me to write it myself. It is available as a nuget package here: Continue reading...

  • JQuery Mobile Madness with MVC 4 Web API

    In my last post I introduced MVC 4 Web API. In keeping with the spirit of things I'd like to throw a little JQuery Mobile into the mix for fun. As in my previous blog post fire up Visual Studio 11 Beta and create a new MVC 4 Web API project. Last time we posted a plain old string value back to the ValuesController. Now let's post a Widget class back. Go ahead and add this model to the project: Continue reading...

  • Seismic Shifts in Web Development

    Not really. But then again really. What I mean is the role of the web developer is changing fast and it's only been in recent months that I've looked up from my keyboard to see how the ground has shifted substantially. Some developer friends and I have often joked that the back end -- the database, object-relational mapping, domain model, business logic, and the controllers for the UI -- take us about a fraction of the time it takes us to get the UI right. We will sit for hours just to get the HTML right, float div tags, give up and go with the table tag, try again, move on, and so on and on. And now with awesome tools like EF and LINQ it's a breeze to do the sort of plumbing work that used to take weeks.  Continue reading...

  • Pattern Toolkit Builder (VSPAT)

    A few days ago Jezz Santos at Microsoft Consulting announced the release of Pattern Toolkit Builder (VSPAT) for Visual Studio 2010. Why not VSPTB? I think PA originally stood for "pattern automation" and the marketing folks just haven't nailed this down yet. Anyway, this promises to be the sort of game changer I've been looking for in my organization. I remember the software factory idea that the P&P team worked on a few years ago. It sort of died on the vine. The idea with pattern automation or "software factories" is that a very senior developer can create interactive, prescriptive (or merely helpful), project templates that junior developers can use to get started on a new project. The toolkit lets you create guidance and proven patterns in the actual code that gets unpacked from the project template so that junior developers aren't faced with the "blank slate how-do-I-get-started" problem.  Continue reading...

  • IncludeMetadataConvention Deprecated in EF 4.3

    In an earlier blog post I showed how to remove the IncludeMetadataConvention convention from your DbContext configuration. This is necessary up through EF 4.2 to prevent model metadata changes from being written to the database, something you don't want for legacy systems. Beginning with EF 4.3 this pluggable convention has been deprecated. As posted on the ADO.NET team blog: Continue reading...

  • Polling with Knockout, JQuery, AJAX, and MVC

    Some colleagues and I have been taking a close look at Knockout, the javascript library that implements the MVVM pattern for rich client UI. Knockout takes advantage of the new custom data attributes (data-*) in HTML 5 to bind declaratively a javascript view model to UI elements. That's pretty cool. But even better, Knockout will update your UI automatically whenever the underlying view model changes. It does this when you declare your model as an observable: Continue reading...

  • ChannelFactory, IDisposable and Handling Faults

    In my last post (Poor Man's Publish-Subscribe WCF Service) I used the ChannelFactory to build a communication channel that I could use to call a WCF service. There's something about that implementation that I wanted to explain in more detail. Notice the try-catch block surrounding the using statement: Continue reading...

  • Poor Man's Publish-Subscribe WCF Service

    I'm going to describe a WCF implementation of a publish-subscribe pattern that is used here at a medium-sized organization where I'm a lead developer. For reasons I won't go into MSMQ and the cloud were not options for us. Yet we needed durability, reliability, and all of the goodness that comes with a service bus. So we rolled our own "poor man's" pub sub (or observer pattern) service a simplified version of which I'll describe here. Continue reading...

  • Snuggle up to jquery $.ajax

    In an earlier post I described how to use the MVC 3 Ajax.ActionLink to post an async delete back to the server. Ajax.ActionLink depends upon jquery.unobtrusive-ajax.js, a script included with the MVC 3 project template. As Brad Wilson has blogged, and I demonstrated, you create an AjaxOptions class and pass it into the ActionLink method constructor. When the view is rendered those properties are emitted with the anchor tag as HTML 5 data-* attributes: Continue reading...