Andres Aguiar's Weblog

Just My Code

February 2009 - Posts

Silverlight and OS/X

I’m happy I got a Mac to have around while developing Quince.

Even if Silverlight is supposed to isolate you from browser-specific issues, we found that it’s quite important to have all the platforms you need to support available for testing.

When doing Silverlight development you will surely need to have some kind of interaction with the browser hosting the plugin. For Quince, the main areas of interaction were:

  • the HTML Viewer control we use in the ‘View Pattern’ view
  • the interaction with the browser’s history to support back/forward. 
  • supporting the mouse wheel for scrolling and for zooming in the Explore by Tag Relations view.

All of those features needed tweaking for Safari in OS/X, and for every other browser. But that was kind of expected.

What surprised us most was that we found the Silverlight performance in OS/X to be worse than the performance in Windows. We did not measure it, but we did not need to. In particular, in early versions of Quince, we forgot to stop some animations and the CPU consumption in OS/X was around 50% in OS/X and 8% in Windows.

We also had crashes or errors that only happened in a specific browser, including Safari in OS/X. We got runtime exceptions that only happen in one browser. In particular, Firefox looks to be the worse in that regard.

So, if you are doing Silverlight development, with the current state of the technology, you still need to test in all the browsers, and if your audience includes OS/X users, you need to have an OS/X machine around (perhaps a hackintosh could be enough …?). Perhaps this is not true for applications with simpler UIs, but it is the case for Quince.

Of course, if you were doing web pages with AJAX this would be much worse… It wouldn’t had been possible to build Quince with HTML+AJAX technologies.

Posted: Feb 07 2009, 12:01 AM by aaguiar | with 2 comment(s)
Filed under:
MacBookPro for Windows Developers

When we started developing Quince I thought we’ll need a Mac to be able to test it in OS/X. I finally had a good excuse to get a Mac! It was a good decision, because it was useful while developing Quince (more about that here), but I´m not happy with it at all.

To make it short, it's pretty bad as a Windows machine. My main concerns:

- The amount of heat the Mac produces when running Windows is unbelievable. Is like using a laptop with a Pentium 4 before we got the 'Mobile' processors.
The same happens when you do any CPU-intensive task like watching a movie. If are using OS/X you can use FanControl to make the Fan work harder when it gets warmer, which makes it bearable. I did not find an alternative to use when booting Windows that runs as well.

- I use VMWare/Bootcamp. From times to times, when booting in Bootcamp, I lose the Windows activation and I need to activate it again. As I have a corporate Windows license that needs to be activated with a KMS, it's not a simple task. Actually, the way I usually do it does not work right now, so I cannot boot Bootcamp.

- The wireless connection drops. The way it ended up working for me is to hide the wireless status icon from the menu bar (!!!), but it still gets a worse signal than the rest of the laptops in the office. There are several threads about this in the support site at

- In Windows you can tweak almost every setting using the UI and if not, you can probably fix it tweaking the registry. In OS/X you have much smaller number of settings in the UI. You can tweak it from the unix shell, but I'm not good enough with it to be able to do it.

- Even if you can emulate most of the Windows keys, it´s not the same as having a Windows keyboard. For example, if you are not using an external mouse, one way to right-click is doing ctrl+click, which on a PC I always used to open a link in a new tab. Also, there's no 'delete' key, there's one called 'delete' that is actually backspace. You can emulate it with Fn+Delete. I also make mistakes during Cut and Paste, as in OS/X is Command+C/P and in Window Ctrl+C/P.

- AFAIK, OS/X does not have concept of 'Uninstall'. Some applications do provide a way to do it, but others don't. I had an issue with a driver for a 3G Modem and I could not uninstall it until I found a thread that described how to do it by manually deleting/editing some files.

- AFAIK there's no IM client that supports video/voice chats with MSN Messenger users. The Microsoft version only supports text.  I did not get good Video/Voice quality while using Messenger inside the VM. This means I'm only using Skype lately, which has a good OS/X client.

- Mac Office is not as good as Windows Office. Entourage in particular is much worse. I also miss the Ribbon when working in Word/Excel. I find myself using Office in the Windows VM most of the time.

On the other hand, when running OS/X for internet surfing and digital media managing, I got a nice experience, probably better than Windows'. But that's not what I need to get my work done.

So, if you are a Windows developer feeling tempted to switch to a Mac, my advice is to not to do it. On the other hand, I love my iPhone and I strongly recommend it to everyone.

Building Infragistics Quince – UX Patterns Explorer

On Monday we shipped Quince. I was part of the team that build it, and we are very happy with the results. You can read the official announcement and description here.

Building Quince was a lot of fun.

We had a UX team and a Visual Design team working with us from the start so we could focus in the code without worrying what the textblocks’ captions should be or which color should we use. For me, choosing the right words for the captions is always a pain so this was relieving. Our main UX designer loves words so we had that covered.

We used the latest Microsoft technologies to build it (Entity Framework, WCF REST, WCF REST Starting Kit, Visual Studio for Database Professionals, Team Foundation Server), a set of great open source tools (AutoFac for both the Silverlight client and the backend, Log4Net in the server and CLog in the client, Moq for mocking both in Silverlight and the backend), some not-as-fun technology as Sharepoint and the Open XML toolkit (the patterns are Word documents stored in a sharepoint library that we parse, reshape, and convert to HTML).

The team did not have much Silverlight experience, so we all learned a lot during the process, and we are learning a lot about how real-world Silverlight applications behave in production. More posts about that later.

The Silverlight app was built using Model-View-ViewModel with the same approach described by Julan Dominguez here. We also used the Prism EventAggregator. We did not have Prism for Silverlight at that time so we did not evaluate using it.

The Silverlight client has a lot of cool functionality. My favorites ones are:

  • Support for back/forward button and deep linking, which is tricky do to in a way that works in all browsers. It’s very browser specific. It also implies architecting the application in a way it can restore its state based on the URL values, which in our case implied encoding all the application state in the URL. We did not have a lot of state so it wasn’t a bad solution.
  • The ‘Explore By Tag’ graph visualizer. I actually like the way it bounces so much that I asked the guy who did it to provide me a way to make it bounce whenever I want. Our UX designer decided that we needed to ‘shake’ it to make that happen, and that meant you need to click your mouse, shake it 3 times, and release it. I’m still not proficient in shaking but I’m getting better.

Quince generated a lot of buzz. It was fun to start monitoring Google on Monday and searching for ‘infragistics quince’ and not finding any link, and trying an hour later and start to see what people were saying. There was a lot of action happening in Twitter too. We even got to be second in delicious ‘most popular bookmarks now’, which was amazing (I have a screenshot to prove it ;) ).

More Posts