I'm working on a project to syndicate library content with RSS.... and learn .NET, C#, and AJAX

Friday, June 8, 2007

Why .NET is cool

One of my programming books suggeted that I check out the .NET Framework Class Library (FCL) and to reuse the classes and methods therein as much as possible. So I did. (The checking out part, at least) So anyway, suppose you wanted to something with a standard Windows File dialog box ... there's a whole class for this (duh.) That's tech speak for "you just say you want to use a File Dialog Box!!" You can basically make that metaphor your own! Suppose you want a file dialog that lists just .mp3 and .wma files. You just use the Filter property of SaveFileDialog! Or, as MSDN puts it, "Gets or sets the current filename filter string, which determines the choices that appear in the "Save as file type" or "Files of type" box at the bottom of a file dialog."

Why is this cool? I once wrote a perl program for users to upload video files. I only wanted them to be able to use certain file types, since I had a specific media player I was using. I had to write all this validation to make sure the extensions were all "okay." And I had this stupid text note that told the user "file extension must be x, y, z, p, d, q." It would have been far cooler if the file dialog had just the acceptible types in it.

Not to mention the perl calendar (which I copied from someone else's code) for which I had to write all my own 'event handlers' so to speak. ASP.NET has a whole Calendar class with built in methods to do common calendar stuff.

For future reference, here's the list of magical .NET powers:
http://msdn2.microsoft.com/en-us/library/ms229335.aspx

No comments: