Why I’m Not Using .NET

Now that I’ve been posting things on Twitter, I notice I have a few followers. And the followers I have are mostly .NET developers. I was a bug .NET proponent a few years ago, but I haven’t actually written any C# code in a long time now, and I thought I’d talk about why.

There are two separate places I could be using .NET: For my own personal projects, and for work.

Concerning work, it’s easy to explain why I’m not using .NET, and it’s not what you think. It basically comes down to deployment.

Windows XP, still the largest market, doesn’t come with a .NET Framework installed. No matter what the penetration statistics are, this means we need to ship the framework, add it to our setup, and support users having trouble with that part of setup. Many users of the product I work on try it out using a free trial download, and the framework adds significant size to the download (or if we download it on demand, trips up the people who downloaded it to install offline).

I went through the same thing at my last company, where I managed to convince them that the framework download was worth it. In that case we were creating a brand new app, and the benefits of using .NET over starting out in C++ were clearer. At Adobe, we’d be using .NET features in a large, existing C++ application, so the benefits are less obvious.

For my own personal projects, the short answer is that I bought a Mac.

I love developing with the .NET Framework, but I don’t like Windows Vista. I had high hopes for Vista, and the final product just didn’t deliver.

My main beef with Windows is that it degrades over time. Everyone knows this, so many people just plan to re-pave their system at some regular interval. But that’s a stupid way to have to use a computer. My Vista install at work went from clean to annoyingly slow in about 6 months. Same thing happened at home.

Meanwhile, my old Mac Powerbook is running well after all the time and usage it’s seen.

It was a tough choice moving my main home system from a PC to Mac, but honestly, I do spend more time now “using” the computer and less time maintaining it. The only thing missing is Visual Studio.

What’s filled that gap for me is Flex Builder. Now that Adobe AIR exists, I can write an application in Flex on either platform, and run the application on either platform. It’s the perfect setup for someone with a foot in both worlds. It sometimes makes interop with native platform stuff difficult, but that’s already a pain with .NET and my .NET stuff would only work on Windows (I’m discounting Mono here because last I looked the Windows Forms support on the Mac wasn’t great, and deployment was even more difficult than the .NET framework).

So there you have it. I hope it doesn’t cost me all my followers. :)

4 Responses to “Why I’m Not Using .NET”

  1. Andrew Says:

    Actually, it’s interesting that you’ve gone down that route, rather than using mono or doing some dual boot or parallel systems or something.

    I’d like to hear more about the reasoning why, and what its like to be a guy from the MS/.NET side of things going to dev on Mac.

    I mean theres a lot of guys now buying MBP, but you hardly hear them actually whispering about their dirty secret of developing on Macs, or in Mac systems…. so for me it’s pretty interesting.

  2. stevex Says:

    I like to write software that’s easy to distribute and easy to get people using. Most of what I write is client side, although I do a bit of server stuff here and there.

    Mono is an excellent project and they’ve done some great work, but as far as I know, it’s tough to make an app that I can distribute to Mac users that doesn’t require some futzing to get it to work. That’s no good.

    For me the great things about .NET were the language (a garbage collected modern language). the framework, and the tools. Working with Win32 is no fun, and .NET does a great job of encapsulating it. Visual Studio .NET, C#, and the .NET Framework makes for an amazing combination.

    But, of course, it’s Windows only. It’s in Microsoft’s interest to keep developers on their platform, and they do a good job of it. But the Mac is making huge progress in terms of user base, and especially for the independent developer, there are a lot of customers there.

    Win32 and Carbon were close enough that you could abstract them, and write one application that ran on both platforms without too much effort. But now that Apple is focusing on Cocoa, while Microsoft is focusing on WPF, there’s much less common ground. Both sides seem to be encouraging developers to pick one or the other, and really, developers don’t want to do that. I certainly don’t.

    That’s where Flex comes in. Flex Builder is based on Eclipse, an IDE that’s comparable to Visual Studio. ActionScript is a JavaScript-based language that has modern features like closures, and great performance thanks to the Flash VM and it’s JITter. And for client (desktop app) development, Flex beats even the .NET framework thanks to one great feature: Binding.

    I don’t know WPF but in Windows Forms, if you want a button’s enabled state to depend on whether a text field has text in it or not, you’d have to have a change event on the text field and update the button when the text changes. In Flex, you set the button’s visible property to “{textField.length > 0}” and the event system takes care of it for you. It takes a bit of mental gymnastics to get used to and figure out how to exploit this it but once you do, it’s a huge time saver, and simplifies your code to boot.

    But switching to the Mac wasn’t so much about Flex as it was about the Mac OS. It’s true a lot of people buy MacBook Pro’s and install Windows on them, or spend their time in a VM, or find other ways to basically pretend they’re still using Windows. I’m trying not to do that.

    The mainstream apps I use – basically Microsoft Office and Adobe’s Creative Suite – are there on the Mac. I’m using Safari as my main web browser. I use iTunes for music, QuickTime to play videos (with plugins for common formats like DivX), and really don’t miss a lot of Windows apps. Visual Studio is the only one I can think of.

    There are some great technologies for developers built into the Apple OS. Check out Instruments, on Apple’s site, for example – it’s like PerfMon on steroids. Also check out Automator – application automation that’s actually accessible to users.

    As far as gaming goes, I bought an Xbox 360 and that’s where my gaming happens. I think the only PC game I still play is World of Warcraft, and that exists on the Mac as well.

    Anyway I don’t want to get all Mac fanboy here. My main point is this: I realized a while ago that everything I was using my Windows PC for I could do on a Mac, except for Visual Studio. Once I managed to not need that anymore at home, I was free to switch.

    (When I’m working at home, I’m actually using a VPN to work and running Visual Studio on my desktop there. That’s kind of cheating, but I was doing that even when I was running Windows).

  3. tonyb Says:

    How is the deployment scenario any better with Flex than with .Net? Isn’t Flex still an “extra” the end user has to install or already have installed?

    Its definitely an interesting observation about Windows degrading and your Mac not. I wonder what the root cause of that is. Its not like the actual windows files are changing,but it still seams like there is something MS could do to help the situation.

  4. stevex Says:

    The Flex VM is the Flash runtime, whose deployment story is a lot better than the .NET framework. It’s preinstalled on almost all systems, and it’s a much smaller package to install.

    As for why it is that Windows degrades.. I’d love to know. I doubt it’s any single thing or we’d have a fix for it by now, but rather a combination of registry fragmentation, disk fragmentation, page file fragmentation and who knows what else. But it does seem like a problem unique to Windows.

Leave a Reply

Powered by WP Hashcash