Oh “My”


In the next few months, I plan to blog about some of the new features in Visual Studio 2005 that I really like.  I hope that you get as excited about these cool features as I am.  

 

Let’s start with one of my favorites – the My namespace in Visual Basic 2005.  As Duncan Mackenzie’s article on msdn points out, the My namespace acts as a speed-dial for several classes in the .NET Framework, especially those you are likely to use most often.  One of the coolest things in Windows 95 was the ‘shortcut’ which allowed end users to directly go to a file, folder or application without navigating through deeply nested folders.  The My namespace is quite analogous to the shortcut feature – it lets you directly access functionality without having to worry about its position in the .Net framework class hierarchy.  Here are some examples.

 

Some beta users have asked whether My can be customized and extended. The answer is most certainly yes.  The My development team intends to release white papers on this in the near future.  For now, you may want to tale a look at Tyler Whitney’s whitepaper that provides a backgrounder on My.  Several teams within Microsoft have expressed an interest in extending My.  I think it won’t be long before we see My.Documents, My.Messages etc.

 

Some developers also wanted to know if we plan to incorporate My into C#.  Although C# users cannot easily use My in C# today, they can get access to the RAD classes that MY provides by importing the Microsoft.VisualBasic.dll and Microsoft.VisualBasic namespaces. As Tyler likes to put it – ‘They (C# developers) can’t get some of the My project collections (My.Forms and My.WebServices) in the same way as VB developers but they can use the new RAD classes such as the FileSystem, Computer, Clock, Keyboard, Audio, etc. 

 

Visual Basic has always made Rapid Application Development a priority.  My certainly underscores the R in RAD.  I hope it will not only delight hobbyists but also be quite useful to professional developers.

 

What do you think of the My namespace?

 

Namaste!


Comments (5)

  1. Rene says:

    Please keep this My stuff out of C#. C# was perfect in 1.0. Adding different APIs for the same kind of code would make it worse.

  2. Rene says:

    Moderation?

    No comments posted yet?

    Is this a fake marketing blog?

  3. Robert Björn says:

    I’m divided on this. I hope it won’t, as time goes by, make the class framework "messy" with all these different ways of accomplishing things. Nonetheless the examples are pretty neat and the benefits probably outweigh the possible downsides. I think I’d like this for C# as well.

  4. Larry Serflaten says:

    I think the lion’s share of VB developers will make quick use of the new My namespace. It really adds a set of tiger’s claws to those developers looking to latch on to the underlying framework in a RAD mannor. The fact that is will be extensible bares <g> repeating. When productivity increases, and projects are finished sooner, everybody gets to finish up and go home just that much quicker!