easyBlog

EasyObjects and the Enterprise Library

About the author

Author Name is someone.
E-mail me Send mail

Recent comments

Authors

Tags

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2009

EasyObjects.NET Roadmap for 2008

As I said in my last post, it's time to stop waiting around and move on to something better. And 2008 should be a great year, so it's time to get going!

First things first, and that's to get going on the beta testing for Access, MySql and Firebird I announced last year. There have been a few volunteers, but not as many as I hoped. I attributed this to the fact that I chose the holiday season to make the announcement, but it's February now. So I am emailing the people who asked to test and sending them a full copy of the current build of EO2 (not the free build) and the associated database modules.

Once that is underway, my next crucial task is to get the EasyObjects Store up and running. I have the basic web site ready, an SSL certificate and PayPal integration set to go. So after some testing, my goal is to have the store online before the end of Q1. The initial version of EO2 available for purchase will be a beta, but any purchases will entitle the user to free upgrades to all beta releases and the full EO2 once it becomes finalized. There will be no support levels available until after release, because that is all still under consideration.

The next big enhancement for EO2 is coming from a project I am working on, and that is WCF. I have modified the templates to generate the Operation and Data Contracts, as well as some lightweight, serialize-friendly classes to help EO work with WCF. It's still in the early stages, but WCF is too cool a technology not to support in EO. Target for a beta release is Q2.

For Q3 and beyond, there will probably be a new release of the Enterprise Library to deal with, we will finalize support for the new database modules, and finally a full release of EO2 in the Store.

That's my current plan, which will promptly go to shit faster than I can blink an eye, but at least it gives us some goals to shoot for.

I welcome your feedback.


Tags:
Posted by mgnoonan on Tuesday, February 12, 2008 11:43 PM
Permalink | Comments (1) | Post RSSRSS comment feed

Updated EO2 download for the Enterprise Library 3.1

I know, I know, I promised more updates, but life has conspired to keep me away from EasyObjects lately, and I'm paying the price for it.

But I did finally get a moment between projects to catch my breath (and some sleep!) and I was able to cross one thing off my list: updating the EO2 download for the Enterprise Library 3.1. I left the old EL 2.0 download as well, so users can choose which version to download.

The new download also includes a fix to the C# Business View template, which was generating some incorrect code for columns of type Byte. The fix is also available for download from the MyGeneration template library. You can use the web update feature in MyGen to get the latest.

Now, if I can motivate myself this weekend, I will get the tutorials updated for EO2, since they are way, way, WAY out of date!


Posted by mgnoonan on Saturday, December 08, 2007 11:35 PM
Permalink | Comments (2) | Post RSSRSS comment feed

Breaking compatibility with the Enterprise Library

Hello again. First off let me re-introduce myself. I'm the guy who, a long time ago, used to run this web site. I was even known to post on this blog from time to time. Hard to believe, I know.  Laughing

OK, humor aside, it's been quite a while since I posted, mainly because I was on this killer project that just about absorbed all of my nights and weekends for 8 months. So feeling somewhat burned out, and not really having any energy, I just couldn't bring myself to do anything useful for EasyObjects during this period. BUT...

That project is now over, and I have had some time to recover (and sleep!), so now it's time to get back to the business at hand! I have a lot of things to cover, but I'm not going to try to catch up all in one blog posting. Instead I will focus on one item and cover the rest in the next few posts. Here are the topics, in no particular order:

  • Enterprise Library 3.0, and 3.1
  • Other database providers (specifically Access, VistaDB, MySQL and Firebird)
  • The EasyObjects.NET "Store"
  • LINQ and Orcas
  • Design-time databinding
  • Signing the EasyObjects DLL
  • Breaking compatibility with the EntLib

Now, as you have probably guessed by now (from the title of this post), we'll be tackling the last item first.

To start with, a little history: in the Enterprise Library version 1.1 (June 2005), there was a function called GetDataAdapter() that was used mostly internally to create a database-specific data adapter. For example, a SqlDbAdapter for SQL Server, or an OracleDbAdapter for Oracle. In this version of the EntLib, GetDataAdapter() was defined as an abstract method. It didn't really expose the adapter directly to an outside calling entity (such as EO), but that's not such a big deal, really, because EO 1.x doesn't directly use the data adapter. It calls UpdateDataSet(), which eventually creates the adapter in order to do the update.

But this functionality changed drastically in the EntLib 2.0. Now the function is no longer abstract, they define the data adapter in the base Database class.

You may now be asking, why is this important? As it turns out, SQL Server and Oracle are almost unique in one respect when compared to other database engines: they both allow developers to submit multiple SQL statements in the same command. For example, if I want to get the value of an IDENTITY column after I insert a row, I can do it in one step on SQL Server:

"INSERT INTO [Customers] (c1, c2, ...) VALUES (@p1, @p2, ...); SELECT @id = SCOPE_IDENTITY();"

You just define the parameters @p1, @p2, etc. as INPUT and the ID parameter @id as OUTPUT, and you can get the IDENTITY value right away. The problem is, this simple example ONLY WORKS IN SQL SERVER AND ORACLE. Almost every other database that I have run into so far does not support running multiple queries in the same command.

(Note: before you Firebird people start sending me emails, yes I know about the batch command object in Firebird. All that does is submit multiple commands for you, they each have their own FbCommand. It does not run multiple statements in a single command object.)

Lacking this ability to get the IDENTITY value back after an INSERT presents quite a challenge when supporting other databases. That really leaves only a couple of solutions: use stored procedures or try to figure out how to retrieve the data from the new row in the data adapter's RowUpdated event (see? I told you there was a connection!).

Now, MySQL v5 and Firebird support stored procedures, so that's one work-around for those platforms. But what about MS Access? The knowledge base has an article that says that the only way to retrieve the last inserted IDENTITY value is to capture it in the RowUpdated event. OK, that means we need to wire up the event after the data adapter is created.

So I created the MSAccessDatabase class, inherit from Database, and add an override method for GetDataAdapter()...

Except that you can't override that method. Well, crap. I tried various methods of getting around the problem, but without success. So my last, and worst, choice was to modify the Database class in the Enterprise Library so that we can add support for these other databases.

Those of you that have followed the EasyObjects development path know that I do not take this course lightly. Modifying the core EL code is a serious step, especially now that Microsoft distributes the signed versions of the library. But it is my belief that it is necessary, and I have submitted a request to the Patterns & Practices team to change the code in the official distribution.

In the meantime, I have initial versions of Access, Firebird and MySQL providers working for EasyObjects. But more on that in a later post. It's good to be back!


Posted by mgnoonan on Sunday, June 24, 2007 1:00 AM
Permalink | Comments (4) | Post RSSRSS comment feed