Frequently Rare

Wednesday, May 02, 2007

Recent experiences with .Net 2.0

I've been using .Net 2.0 in earnest for sometime now, but it wasn't until I had to do some work on a 1.1 project that I really realised what I was missing :-)

For example:

Generics: Being able to create a collection using List is handy (but not unmissable), but I've used anonymous methods to help create some useful utility classes.

Property Accessors; being able to finally specify protected internal for property set is handy.

Application Settings - configuration is more structured; support for new elements like connectionstrings, and the much improved intellisense makes life easier.

MARS: Multiple Active Result Sets - Essentially (if you are using SQL Server 2005, that is) you can reuse the same SqlConnection - connection pooling meant that this wasn't a huge issue in 1.1, but a side effect is that multiple calls to separate queries that return sqldatareaders (for example) can be nested, making code look more compact and neater.

Viewstate Serialization. The new viewstate serialization format actually does result in smaller pages!

Threading: Some other features that make life alot easier are described more elegantly here.

Ajax.asp.Net - provides some fantastic controls and ideas for web developers using .Net 2.0 - the calendar control and update panel have proved useful recently:

I don't use Edit and Continue for our asp.net applications - the new compilation model is just too slow. I still produce Web Application projects rather than using the new Web Site model (support for Web Application projects was via an optional add in pre VS2005 SP1, and is "baked in" when upgrading to SP1).

Which also leads me on to complaining about Visual Studio 2005 and (even post SP1) its frequently halting, annoying pauses, and occasionally randomness (intellisense parser service has crashed a few times now on my work machine). Interestingly, though, on my Windows Vista machine at home, VS2005 flies along for the most part (don't forget the additional update for SP1 for Windows Vista users). Both the work and home machine have the same amount of RAM (2Gb), but the work machine, is, of course, a "wonderfully configured computer based upon Windows XP SP2 but customised for the particular enterprise that own the machine," i.e. dubious.

0 Comments:

Post a Comment

<< Home