Archive for the ‘Birthdays Synchronizer’ category

Google Calendar Event Gadgets?

August 20th, 2009

When I started researching on interacting with Google calendar API, I came across a cool feature offered by this API, and that is the event gadgets.

Although the calendar UI is quite fixed and developers can’t do much to extend it, Google did leave the door open for some extensions using this feature.

Event gadgets are like any other event on the user’s calendar, but how it looks is mostly up to the developer. It will appear as an icon on that event day, and when clicking on it, it will open an iframe which will show any given URL. The size of this iframe is also configurable.

To set it up using the .NET API library, simply create an event object and set the WebContentLink properties:

WebContentLink conetentLink = new WebContentLink();
conetentLink.Title = “Buy tickets”;
conetentLink.Type = “text/html”;
conetentLink.Url = “http://myserver/tickets.aspx?show=hair”;
conetentLink.Icon = “http://myserver/money-icon.jpg”;
conetentLink.Width = 200;
conetentLink.Height = 100;

The contect can be either images, HTML pages, or igoogle gadgets.

In Birthdays Synchronizer, I used this feature to create the birthday reminders on the users’ calendar. When the event is created, the friend name and picture URL are saved as part of the parameters on the gadget link, allowing my hosted page to show this information nicely to the user:

Well.. maybe it does require a little more work on the UI :)

Birthdays Synchronizer 2.0

August 17th, 2009

Today I finally released the new version of the Birthdays Synchronizer application. As I wrote in previous posts, I wanted to enhance it with a new and exciting UI, and chose WPF for this purpose.

Although my learning curve for this technology was a bit slower than I expected, I’m very pleased with the results :)

I used Expression Blend 2 for designing the UI and animation (or storyboard…) and MVVM pattern for the acutal development. While working with WPF I faced more than one gotcha (it has some issues after all..), but eventually I managed to overcome them all. Microsoft did amazing work on this technology, which offers so many possibilities and really changes the way desktop applications are developed and displayed.
Beside the UI changes, the new version also interacts with Google Calendar, allowing to synchronize the birthdays to this calendar in a very special way:
If in a certain day you should be reminded for a friend’s birthday, a little cake will show up on the top of this day reminding you of it. It also shows the picture and name of the person when clicking on it..
In the coming posts I will elaborate more on this integration and some of the things I had to overcome with WPF.

Getting started with MVVM and WPF

July 28th, 2009

For some time I am working on enhancing my Birthdays Synchronizer application. The last modification I made is to support Google calendar. But before releasing it I decided to upgrade the application look & feel to something more appealing.. :)

Since I’m quite experienced with the .NET framework, I decided to give it a shot and implement the change with WPF.

When I just started the development, I found that the MCV pattern is not working so well with WPF. This is mainly because the view layer of WPF, based on XAMLs, has enormous capabilities (the bindings in particular) which make it hard to follow the traditional controller-viewer separation.

Here comes the part where MVVM pattern comes in hand. MVVM stands for Model, View and View Model. The model is the data object we are working on. For example, a birthday object, consisting from the person name and birthday date. The View Model is the layer responsible for the business logic and the operations that supports the view. For example, saving the birthdays to Outlook or getting from Outlook the available calendar folders. The view is the actual UI. It relays on the View Model while the View Model itself is not relay on any view. This point is important to follow and understand. It means that the View uses the View Model for its operations, but the View Model must not know that it works with any specific view.

If you are just getting started with WPF development, I really recommend using the WPF MVVM toolkit. It adds a solution template to visual studio which allows you to create WPF projects following the MVVM pattern. The projects it creates have built-in solution folders for each MVVM layer and some classes to get you started. It also comes with a great document describing the MVVM patters in details and in a simplified language.

Good luck :)