A Day with ASP.Net

I’ve spent my day making a very simple ASP.Net application and I have to say — I’m impressed.

I started out with a tiny little bit of C# and some IronPython.  In the past most of my .Net development has been with JScript (yes, you read that correctly).    Today I decided to start anew.

The goal was to upload a GPX file and have it display the contents in a table. First, downloaded both Visual Studio Express for Web Apps and Visual Studio Express for C# (why aren’t they together??).  Then I wrote a simple command-line program to parse a given GPX file and output it like “lat,lon,wptname”.  Which meant I had to parse the XML.  This page helped the most — I bascially copied it, though getting at the attributes was more difficult than it should have been.  Oh, and what about the DOM?

After I wrote that, I decided to do what I should have done first — write unit tests.  NUnit has some awesome documentation and it works well.  Though their GUI test runner isn’t embedded into VS, if you have the executable loaded into it, the GUI automagically knows when the exe has been updated.  Very cool stuff!

After that was done, it was time for the web app itself.  I started with zero knowledge on how to go about making a ASP.Net application besides loading up the VS for Web.  I poked around the web for a while, but probably the best page I found was this one on 4GuysFromRolla.com.  Even though it was in VB, not C#, I was able to get it to work.

So then I imported in my GPX Parser and wrote a tiny wrapper calls that would call it and put the output into an HTMLTable object.  I didn’t know quite know how to put that HTMLTable object into the page, but then I found out about asp:Placeholder and then things just clicked into place.

Whew!  A lot of learn’ for a days work, but I think it was useful.  It was my first time using Visual Studio, first time coding some real C# (with unit tests), first time making an (albeit very simple) ASP.Net application.

If you know me very well, I’ve not always been a Microsoft fan.  But I’ve always had a soft-spot for .Net — when it was first released, it had aspirations to be what Java promised to be. I’m not real sure that it is that now, but writing this web app was a lot easier than writing it in Java.

What next?  When I get time (who knows when that will be) I would like to insert that cache information (plus more!) into a database and then maybe do some Crystal Reports stuff with it.

Leave a Reply

You must be logged in to post a comment.