Tuesday, December 19, 2006

Visual Studio 2005 SP1 Released

Finally Microsoft has released a service pack for visual studio. It claims to have fixed many bugs and has performance improvements in the build process. This will certainly be helpful for developers using VB.NET since the original VB.NET compiler crashed frequently and it took unnecessarily long time to compile solutions. Release notes for the service pack is available at http://support.microsoft.com/kb/928957/.

Web application projects are now built in to the IDE. You will have to uninstall the web application projects add on to install SP1.

If you plan to install SP1 its better to go through the release notes first, it can save you a lot of frustration because it seems that there are many workarounds you have to do to get it installed depending on your current configuration.

Tuesday, December 05, 2006

Typed datasets and VS 2005

Recently I had to use typed datasets in a project for the first time. I always preferred using custom entity objects but due to time constraints there was no option on this one. One thing I don't like about the new typed datasets is that it combines the data access code with the data itself if you drag a table from the server explorer into the dataset it creates the connection and the table adapter in the dataset itself, so much for tiered architecture. So I decided the best thing to do is to delete the table adapter from the dataset and just use it as a container.

Another issue that you have to keep in mind when you use typed datasets is that sooner or later you are going to create datasets that share tables among them. If you create the table in each and every dataset its going to create a maintenance nightmare. A better option is to add a xml schema to your project and define all the tables there and include that schema in each of your datasets using the xs:include element. This way you only have to change one file if your table definitions change.

One disadvantage of the above method is that you cannot define keys in the schema, you have to add the keys to each and every dataset. Another minor issue is that the graphical dataset designer gets a bit messed up with this approach. Lets hope the next version of VS comes with a better dataset designer.