Nice words for My…

Jesse Liberty has written a very nice article on My for O’Reilly’s He starts with a theme we’ve seen a lot of over the years:

For a couple of years now, I’ve been touting the Microsoft-endorsed sentiment that it really doesn’t matter if you program in C# or in VB.NET, since both are just syntactic sugar layered on top of MSIL (Microsoft Intermediate Language, the true language of .NET).

But then adds:

That appears to be changing a bit with Whidbey.

He then talks about some of the features you’ll get with My. He concludes with:

The My object has made creating this application almost absurdly easy. […] VB 2 has taken a dramatic lead in Rapid Application Development with the My object.

Go check it out!

12 thoughts on “Nice words for My…

  1. Elton Wells

    Is it possible for third parties to extend My object? If so, could you please mention the relevant attributes/interfaces/etc.? Thanks.

    – Elton

  2. Fan

    I found it was very easy to extend ‘My’. Partial class can be used to add new properties to My.Application and My.Computer. With the help of ‘HideModuleNameAttribute’ we can add any other shortcuts to the My namespace directly.

  3. Mike Schinkel

    >> Extending the "My" Object

    I know it is technically possible, but if you publish how to do it please, please do so in a way that doesn’t create a tower of babble of incompatible extensions.

    I almost think you’d need to have an psuedo open source project that someone from MS managed and the purpose was to extend My by adding provider specifications.

    For example, you could add document imaging as an extension, but the "correct " way to do it would be for a third party to provide an provider that plugs into the My object so developers could use a standardized interface for document imaging when going thry the My object.

    I’m sure there are other maybe even better ways, and I would love to hear them if there are.

  4. Fan

    I found that even class library projects have a My namespace. I don’t think it is a good idea. Class library is used to export custom classes to other applications, so we don’t want unexpect namespaces be added to our project. I think this is a big problem that must be fixed in the future releases of Visual Basic 2005.

  5. paulvick

    Fan: The namespaces are entirely encapsulated in your project (i.e. all the types are Friend, none of them Public). Are there specific concerns you have about producing just Friend classes?

  6. Fan

    To Paul Vick :

    Thanks. But an empty ‘My’ namespace will appear in the object browser. It makes my class library a little bit "unprofessional".

  7. Fan

    Could you please make My namespaces optional? For example an "Option My" statement(just a suggestion<g>). So that we can completely close generating a My namespace for the project in some cases. It will be more reasonable. Athough I know that My.Application is a new object model for Windows Forms project and hard to be turned off… At least allow us do this in class library projects, please.


Leave a Reply

Your email address will not be published. Required fields are marked *