Background
It is (about) day 2 of using ASP.NET and Visual Studio 2003 and I’ve finally managed to deploy an application to the new webserver. Basically all it does is read the iTunes text file output (File –> Export Song List… –> Text File) and outputs a DataGrid component with the artist, album, and song title with nice pagination. The nice thing is that the DataGrid handles the pagination and pretty much any operations with the data. I have to say, I really wrote this in about 2 hours in the wee hours of the night so if it breaks, let me know.
Why ASP.NET is unique…
There are so many people that have told me that ASP.NET and .NET in general is pretty much a waste of my time, but see, there are so many others who are using it and loving it. Here are a few reasons I personally see promise in the language(s).
- .NET keeps the code out of the interface using ‘Code Behind’ allowing your layout people to work on layout, and your coders to work on… code.
- .NET uses more than one language, but those languages can be used in both desktop and web based development. What this means is, an employer only has to hire one person and they could easily jump from web to desktop in hours instead of weeks.
- I can’t say just how much .NET WebForms really act like desktop applications. You can actually write subroutines that run on the webpage based on user actions. This is really unique, as at my work we usually have to shoehorn it by creating a new page or using a ton of javascript. .NET tries to take care of it for you and does a darn good job.
- Choices: You get a choice of VB.NET, J#, and C#. They all work pretty much the same with the .NET framework, but it really gives programmers the choice to specialize or just pick their favourite to work in. Personally, I like C# because it reminds me of Java and C mashed together, but these choices give developers with different backgrounds the ability to work together.
- Postbacks: .NET has a built in way of handling postbacks, you know, when there is an error or if you want to process data on the same page it is displayed, .NET can handle it for you.
- Source code safety: ASP.NET builds. It actually has to complie, which for some of us LAMP developers sounds like a royal pain, but really it keeps your source safe. Think about it, if you lose a client, or a client demands FTP access, they cannot access your source (at least not easily). It’s really a beautiful thing.
Hello World, for good measure…
I of course had to write a classic ‘Hello World’ in C# (desktop!) for good measure. It has a little more than a standard hello world, but I think it just shows how carried away I can get at 2am.
Well, that’s it for now. More when I finally write something useful!