2.00hhh...2.aahhh


Keywords: General / .Net Framework

So like a few others out there, my conversion from the .Net Framework 1.x to 2.0 came a tad late in the game. Probably the three biggest reasons why it took me so long to make that switch for my freelance projects are the fact that I was sitting on quite a bit of "legacy" code, if you will, that I often reuse for my projects that was all written in 1.x. Secondly for all it's inefficiencies 1.x worked okay, and we all know you shouldn't fix things if they aren't broken...too much. The third reason is that I kept ending up with day jobs that were also stuck in the 1.x mud, with no apparent exit strategy. Considering the amount of time I spend at these jobs, most routines end up becoming a habit pretty quickly.

Since I'm probably at the tail end of the wave of users who've made the switch, I don't think there are many war stories that I could trade. I'm only writing this thread to cite the things I found kewl about 2.0 and those that I found to be un-upgrade-esque. I will by no means cover every feature there is with 2.0, this is merely a short list of the stuff that struck a chord with me. And if any of the features I hype the new platform were available in the old, then I stand corrected.

In the kewl category we have:

Master Pages
I was happy to see these considering I had tried many different approaches to templating in 1.x and all of them seemed to have a tad too many kinks in the wire 'namean? Lets just say some used too many user controls, and the others that functioned like 2.0 master pages had poor design time support. So thumbs up to 2.0 for Master Pages.

Design and HTML view Intellisense
Because freelancers are our own front-end developers amongst other things, the last thing we want is to spend our precious time filling in for a lack of adequate intellisense. VS 2005 allows you to drag controls from the toolbox even into the HTML view which is a good thing. Unlike the IDE for 1.x, VS 2005 does not alter your HTML code when switching from design to HTML view.

On-the-fly compilation
Unlike in Visual Studio 2003, VS 2005 seems to allow you to edit a codebehind, save your changes and see the changes on the web page you altered without compiling the whole project. Remember that .net 1.x requires you to comile your entire project everytime you make changes in the codebehind in order to see your changes. There is also an option to compile just a single page -- this seems to take about as long as compiling the entire project in my opinion however. You can read more about the ASP.NET compiler here

Alternative DataSource Creation and Usage
I had some fun creating xml data in the App_Data folder and then using drag and drop to create an xmlDataSource in my application that I could bind to repeaters, grids and datalists. Not all data is meant to be stored on your backend database and having this flexibility in your app to create, manipulate and use xml data is a definite plus.

Ajax Extensions
Perhaps this deserves it's own thread, but the high compatibility of the Ajax Extensions and the 2.0 framework bring me a great deal of joy. I'm hoping to bask thoroughly in the Ajax technology provided by the extensions. Best believe you'll be reading a lot about it on EminenceDigital.


And now, a few things that I'm not really feelin' about 2.0


Where's Global.asax
Come on Microsoft, I was using that. So you can add a Global.asax file yourself, but it shows up...somewhat awkward-like -- more like in-line code than the previous code-behind structure. Read more about how to bring the 2.0 Global.asax closer to the old model at http://rossnelson.blogspot.com/2005/11/fixing-globalasax-in-aspnet-20.html .

Deployment File Exclusion
This is an issue that I'm currently still battling with. In VS 2003, when you went to go deploy a web project using the web copy functionality, only files included in the project were deployed. Files and folders excluded from the project were not included. With VS 2005, using the publish website feature publishes everything in and under your root folder. Microsoft offers the Visual Studio 2005 web deployment project as a potential solution to this problem. How it works is beyond the scope of this article, but it's a solution whose underpinnings I'm still working on coming to terms with.


So that is basically my take on the ups and downs of Asp.net 2.0. A lot of the issues that I saw eg. 'Mutex could not be created' and 'Cannot read IIS metabase errors' were usually due to my sites still set to use .Net 1.x in IIS. The other set of problems was due to obsololete code structures that I had brought over from 1.x. It's all smooth sailing once you get past those hurdles.
 

 
Comment:*  Fields marked (*) are required.

Posted By:*  

Website:(requires 'http://' if entered)  

Email:* (Not displayed)    
 


Past Postings

From:
To:

Subscribe

       

Home | About | Portfolio | Favorites | Design Tips | Contact
Designed by Jonathan Awotwi ©Copyright Eminence Digital 2005 - 2010 All Right Reserved