Previous month:
September 2003
Next month:
November 2003

October 2003

Whidbey ADO.NET Designer Support with Libraries

Visual Studio .NET 2002/2003 has great designer support for ADO.NET with Windows Forms and Web applications. However, I'm not doing data access directly from the presentation layer, but instead from components in a library.

Whidbey will have ADO.NET designer support for component libraries! This feature is not in the alpha builds, but it will be available with the Beta. :-)

Christian


.NET 2.0: Database Independent ADO.NET

.NET 2 has new factories that makes it easier to write data-programs independent of the databsae.

With .NET 1.0, we could program independent of the database using interfaces:

IDbConnection connection = new SqlConnection(connectionString);
IDbCommand command = connection.CreateCommand();
command.CommandText = "select * from customers";
connection.Open();
IDataReader reader = command.ExecuteReader();
while (reader.Read())
{
   //...

The connection object can also be created with the Activator class - to make it independent of the database. What about creating a SqlDataAdapter? This needs to be done similar to the connection. A custom factory class is very useful with 1.0.

.NET 2.0 offers database-independent factory DBProviderFactory:

DbProviderFactory provider = DbProviderFactories.GetFactory ("System.Data.SqlClient");
DbConnection connection = provider.CreateConnection ();
DbDataAdapter adapter = provider.CreateDataAdapter ();

The available providers can be found in the configuration file.

Christian


Dave & Al Books

At PDC I've bought the new books from Al & Dave.  Definitely worth having a look at: new ASP.NET, ADO.NET, and XML features.

A First Look at ASP.NET v 2.0

A First Look at ADO.NET and System Xml v 2.0

cover cover

Every PDC attendee received the book "Introducing Longhorn for Developers" from Brent Rector. This book goes even more into the future. It seems that this book cannot be bought (the current edition) outside PDC.

Christian


Versioned Serialization

Doug Purdy demonstrated versioned serialization in his presentation "Indigo: Using XSD, CLR Types, and Serialization in Web Services".

Until now the BinaryFormatter was not version-aware, that's why we always had to implement the ISerializable interface to deal with versioning. The attribute [OptionallySerializable] may now help! This attribute can be applied to types that are added with later versions of the class, and may not be deserialized.

The name of this attribute may change before the release.

Christian


Indigo Platforms

Indigo will not only be available with Longhorn, the bits will also be available with Windows XP and Windows Server 2003.

Information from Don Box during his PDC presentation "Indigo: Services and the Future of Distributed Applications".

Update: Of course this doesn't mean that Indigo will be available before Longhorn. However, at that time it is not necessary to wait until all systems have been updated to Longhorn before this technology gets its real use.

Christian