Adventures in C# and Windowsland, part 1
Yes, you read well, I meant C# and Windows. No, you understood wrong, I’m not leaving the boat.
Turns out that I am able to get up to 4 points more in one of my networking exams at university if I deliver a small Networking-oriented project. Obviously, I am gonna take this up. Unfortunately, the project *has* to be done with the .NET framework.
So today 2 guys (I wonder how much Microsoft pays for this) came to show us basic C# and ASP.NET usage telling us how beautiful, easy and whatever .NET is compared to anything, while I was rumbling in my head that I could have done the same things they were doing (at least for the C# side) with Qt with the same amount of code (or even less), *really* multiplatform and *really* native looking. Anyway.
I decided to take this as an opportunity to find out what’s outside the KDE, Qt, and Linux land, and see if there is something worth being used out there. So I set up a Windows XP virtual machine in VirtualBox (that, by the way, is an incredible piece of software) and installed:
- Visual Studio Professional 2008
- Microsoft Expression Studio
And started out playing some games. Obviously, I will compare the 2 tools with Eclipse and Qt Designer, the tools I use the most.
The installation process was a pain in my ass. Seriously. Installing Visual Studio just for C# and ASP.NET took more than installing Windows itself. I can’t understand how this is possible. Installing Expression Studio took its 10 minutes, that I am trying to accept as a reasonable time, trying to forget that I use pacman and reinstalling the whole KDE takes 1-2 minutes. Anyway.
The thing that sucked the most was installing the MSDN library. Aside from the fact that comparing Qt Docs to MSDN seems an insult, and MSDN really fails in providing a new, but quite experienced programmer an useful, browseable documentation, and that’s 100 points less, IT TOOK 80 F*****G MINUTES TO INSTALL. Now, we all know that 1.5 GB are a decent amount of files, but I wonder what MSDN installer does apart from copying them. Indexing? No, actually trying to search stalls windows. Supposing Windows copy system sucks and it took 20 minutes to copy the file, I still wonder why a strange action I don’t recall the name of took 60 minutes.
Ok, let’s try to forget this and try to get a first opinion.
Visual Studio, on which I heard all kinds of bells & whistles, isn’t very much superior to Eclipse IMHO. I found out some features I am used to, some features I like (like autocompletion of events), but it looks like it focuses that much on autocompletion and similar stuff that sometimes gets in your way (like autoindentation when you don’t ask it). One of the reasons why I like Eclipse out of anything else out there (yet) is that it provides the essential features to speed up your work, nothing more nothing less. Visual Studio still remains a nice IDE, but I wonder what happens when you use classes outside the MSDN Library.
Expression Blend is another matter. It is probably the best tool I’ve ever seen in ages. Its interface reminds of the Adobe Flash one, and the nice news is that you can do anything you could do with Flash: creating animations, custom controls, dynamic styles, etc, without writing a single line of code and with the possibility of exporting to C# AND Silverlight. Blend pretty much rocks, and I invite anyone who cares about similar stuff to try it (there’s a free 30 days trial on microsoft’s site), since it’s a tool I would love to see. I imagine Plasmate being something similar. And Qt Designer being something similar in the future.
Anyway, after seeing all the possibility in the GUI side without writing a single line of code, it comes to the point when you actually have to write some code. After 30 (!) minutes of researching, I found out how to access members created in Blend in C#. One could argue I don’t know how to search, I could argue that for some reason I find what I need with Qt in some seconds, and Blend documentation doesn’t have this. In fact, I guessed. Probably Blend developers thought that everything could be done without coding. Anyway, prepare for the horror.
Storyboard story = (Storyboard)Resources["FieldsIncomplete"];
What.the.hell.is.that. You are telling me that to access an animation I have to write similar shit? I sincerely hope there is another way, otherwise no matter how good Blend is, but fails. Or better, XAML fails.
Then, layouting plain sucks. Anyone who has ever used Qt Designer and was singing while drawing perfect layouts with a single click would start swearing looking at how weird Windows Forms and WPF handle layouts. I can’t even explain since I still haven’t found out how they work. That’s a huge point less.
That’s all for now. There are some good points, some very good ones, some bad ones, and some awful ones. As of today, the way you can design the GUI (except layouting, that had the opposite effect) and the animations in Blend is the only thing that didn’t make me regret using Qt.
In the next days, I’ll try giving some insights into C#, and start really comparing it to C++/Qt