Making Windows Friendly for .NET Developers

10/6/2009 10:44:37 AM

I know… it does seem odd that I would have a title of saying that Windows needs to be friendly to .NET developers.  Considering that .NET is THE development environment for Windows (no offense to my C++ or Mono friends), it seems a strange that I would have some “complaints” about Windows not being friendly towards .NET developers.  But it’s true.

It is not that Windows isn’t a good platform to develop on. Quite the contrary.  Great tools, lots of great OS features that are readily accessible, etc.  The problem is that the Windows team sometimes forgets that the vast majority of Windows development is now done in .NET.  I am sure many of you read that and said, “Duh! Of course.”  So what am I talking about?

As you start getting into the back corners of the operating system, it suddenly feels like some Microsoft teams have never heard of .NET.  Example?  Windows Firewall.  I have been writing some peer-to-peer stuff and it would be nice to be able to set some firewall rules when an app is installed, or better yet, prompt the user at runtime to change the rules and dynamically set them.  Can you do that?  Sure, if you are writing in C++ or want to use a COM object and wrap it with .NET.  There is no .NET implementation out of the box.  Talk about a pain in the ass!  I have spent enough time playing with p/invoke and COM wrappers to know that I don’t want to go there unless absolutely necessary.

Peer to peer is another example.  Great team – good guys on it.  They have been fantastic helping me work my way through my learning.   The problem is, some of the coolest parts of their stack do not have a managed implementation.  Distributed routing tables? Absolutely wicked stuff but C++ only.  Peer Groups; C++ only. Peer Graphs; C++ only.  Double argghhh!

Even with the release of Windows 7, the problem continues.  The Windows API Code Pack certainly helped expose some of the new Win 7 features, but still no Windows Firewall support.  Peer to peer still missing.  Some other APIs are still native only.  Considering that .NET has been around for quite a while now, you would think that 100% of the Windows API would be covered with managed implementations by now.

Some day, my friends, some day….

Tags:

Rant

Comments

10/4/2009 1:35:05 PM

Tony Wang

most .net form controls are just partial wrapper on those C++ ones, you can always use win32 SDK call to get some stuff done yourself. that some day probably will never come...

Tony Wang United States

10/4/2009 7:40:59 PM

jab

True enough but that was my point.  I dont want to have to write that wrapper over C++ stuff myself. At this point, it should just be part of the requirements spec for each team that they produce a high quality managed wrapper around their C++ API set. I can do it - I just dont want to.

jab United States

10/4/2009 7:48:44 PM

Matt Newman

I remember trying to use TaskDialogs in .NET when Vista first came out. It wouldn't work if I started a process from Visual Studio or if I tried publishing it with ClickOnce. I ended up not using them because it was more hassle that it is worth. Hopefully the API code pack fixes some of these pain points.

Matt Newman United States

10/5/2009 1:57:03 AM

Josh Santangelo

If your application is installed by Windows Installer and you generate that installer with WiX, you can use the WiX firewall extension to add your app to the allowed list on the firewall.

Josh Santangelo United States

10/5/2009 2:07:18 AM

jab

Good to know! Thanks Josh.  You wouldn't happen to know if I can enable firewall edge transversal as part of that process do you? Wink  (Adding Wix to my list of things to work on)

jab United States

10/5/2009 3:16:29 PM

Scott Bussinger

I agree completely. I'd love to play with the new Windows Biometric Framework (i.e. the fingerprint reader on my laptop), but it's another poorly documented C++ only API. One side of Microsoft says managed code is the way of the future and the other side ignores it and does it the same old way.

Scott Bussinger United States

Comments are closed

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen

About the author

Jeff Brand Jeff Brand

This is the personal web site of Jeff Brand, self-proclaimed .NET Sex Symbol and All-Around Good guy. Content from my presentations, blog, and links to other useful .NET information can all be found here.

E-mail me Send mail


Calendar

<<  March 2010  >>
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar

My Twitter Updates

XBOX
Live

Recent comments

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

Sign in