Pages

Wednesday, November 23, 2005

ASP.NET 2.0 Experiences


With this post I am opening a series -hopefully- of posts, based on my experiences with ASP.NET 2.0. This post by itself is at the moment incomplete.

I have been programming ASP.NET since version 1.0 and did most of my work in ASP.NET 1.1. Only recently, and just after the release of Visual Studio 2005 and the .Net Framework 2.0 I started working in ASP.NET 2.0. I have two initial goals to accomplish (apart from learning all the new and changed features of the new release):
  • I want to port my version 1.1 code libraries to ASP.NET 2.0
  • I want to create a web project I had in mind for the last couple of months in ASP.NET 2.0
In the future I will probably work in ASP.NET 2.0 exclusively and I also might want to port some of my version 1.1 apps to version 2.0.

My first findings so far:
  • ASP.NET 2.0 includes a framework for web site membership, role based security, and personalization. It is based on the same authentication and authorization mechanisms that come from version 1.1 but introduces the use of a data store and a "provider" API to support the new features. Previously I used to use my own implementation of such features using a custom solution. The new version makes my relevant code somewhat obsolete. I am already trying membership, roles and profiles and finding them easy and helpful. I 'll get back to you with more specifics on this...
...to be continued...

Friday, November 18, 2005

My Funny Surprises With .NET 2.0


As I was developing applications for .Net Framework 1.0 and 1.1, I was building a couple of code libraries with features I found smart and useful for my apps.

Being an active member of dotNetZone.gr, (a Greek .net developer community often nicknamed DNZ), I recently decided to share some of that code with others in DNZ.

The idea was to do that while porting the code to .Net Framework 2.0 through Visual Studio 2005.

Now, what’s so funny about that?

First thing I wanted to share was my Wizard classes. I implemented them in the context of a web project and used to find them brilliant.

Using SourceSafe Ι started today pinning and branching code to a new VS 2005 solution that would contain the part of my libraries related to Wizards.

“Come on! Where is the funny part?” you would still ask!

Well I compiled it and got the following compile time errors:
  • Error1: 'Wizard' is an ambiguous reference between 'System.Web.UI.WebControls.Wizard' and 'Softbone.Shared.Wizards.Wizard' 
  • Error 2: 'WizardStep' is an ambiguous reference between 'System.Web.UI.WebControls.WizardStep' and 'Softbone.Shared.Wizards.WizardStep' 
  • Error 3 'WizardStepCollection' is an ambiguous reference between 'System.Web.UI.WebControls.WizardStepCollection' and 'Softbone.Shared.Wizards.WizardStepCollection' 
(note: Softbone is "brand" name I am using, and Softbone.Shared is the namespace of the shared code library I am creating porting my code from .net framework 1.1 to 2.0).

Ooops!

Not only Microsoft implemented the same functionality as I did, but the just happened to have chosen the same class names as I did!

Well that, I thought was funny enough to mention…

So, it might be the case that my library is obsolete with the new version of the .Net Framework, but still, here is what is more interesting about it now than ever: I have to check my implementation against Microsoft’s one to see where mine falls short or even if I did some things that are better or smarter than Microsoft’s.

So I will be posting my code soon to my main blog and my .net blog in DNZ and keep you posted here, to see if I have more interesting or funny encounters during my Wizard Library porting to .Net Framework 2.0.

I ‘ll let you know….