Is EasyObjects still relevant?

by mgnoonan 6. February 2011 22:33

It has been a long and winding road…

EasyObjects was born on August 10, 2005. The Enterprise Library was still on version 1, having just released their second iteration and working towards a .NET 2.0 release. Visual Studio 2005 was out and about, but most people hadn’t adopted it quite yet. And the Entity Framework was just a twinkle in some Microsoft engineer’s eye (or maybe that engineer didn’t even work for Microsoft yet!).

Fast forward six years, and how has EasyObjects held up? Honestly, some good and some bad. Ok, mostly bad. Unable to invest either time or resources into the project, the code base has mostly stagnated. Sure, there have been occasional updates as Microsoft released new versions of the EntLib, but even those have stopped lately. And of course, Microsoft has officially entered the market with the Entity Framework. So how does a lowly open-source framework compete with a multi-billion dollar company?

Not all is lost, though. Where I have found EasyObjects to be the most helpful, is supporting old projects. I know, not the most glamorous role in the development world, but I believe it is an important role. After all, Microsoft is in the business of selling software licenses, and they would prefer that you don’t run SQL Server 2000 when they have a nice, shiny and new SQL Server 2008. And officially, you are out of luck if you want to use the Entity Framework with SQL 2000. And what about those .NET 1.1 sites you never migrated? Maybe a full migration just isn’t in your budget, but you need to add some quick and dirty features without re-plumbing the entire architecture… EasyObjects can help there. And the dynamic query syntax is the same, so you can move forward to .NET 2.0 (or higher!) without having to change up your data access code.

So is EasyObjects still relevant? The answer is yes, for now. In my next post I will discuss future plans and where EasyObjects goes from here.

Tags:

EasyObjects.NET 2.0

EasyObjects now with Nuget

by mgnoonan 5. February 2011 23:45

nuget_logo

Never let it be said there wasn’t a bandwagon we couldn’t jump on… Winking smile

After years of manually adding configuration settings and copying files into projects, we finally have a better option. You can now add EasyObjects 2.0 to your projects using Nuget, or the Library Package Manager as it is known in Visual Studio 2010. As you create a new project, go to the Package Manager Console, and type “Install-Package EasyObjects.NET”. It should look something like this:

Package Manager Console

Isn’t that nice? Nuget automatically downloaded and installed the EntLib.DAAB package, which is a dependency, as well as the EasyObjects.NET package. But the goodness doesn’t stop there! A quick glance at web.config shows that the sections required to use EasyObjects have been added as well.

<dataConfiguration defaultDatabase="" />
  <dynamicQueryConfiguration defaultProvider="SQL Server 2005">
    <dynamicQueryProviders>
      <add name="SQL Server" type="NCI.EasyObjects.DynamicQueryProvider.SqlServerDynamicQuery, NCI.EasyObjects" />
      <add name="SQL Server 2005" type="NCI.EasyObjects.DynamicQueryProvider.Sql2005DynamicQuery, NCI.EasyObjects" />
      <add name="Oracle" type="NCI.EasyObjects.DynamicQueryProvider.OracleDynamicQuery, NCI.EasyObjects" />
    </dynamicQueryProviders>
  </dynamicQueryConfiguration>

That is just too cool!

But which version of the Enterprise Library?

Since there are several versions of the Enterprise Library, which version is getting installed? The answer is: it depends. If your project is set to build against the .NET 2.0 framework, then the version that gets installed is the EntLib 3.1. If your project is targeting the .NET 3.5 framework (or higher), then the EntLib 4.1 is used.

Unfortunately, there isn’t a version of EO for the EntLib 5.0 yet, so that version will not be installed. You should also be aware that only the files necessary for the Data Access Application Block will be installed. None of the other blocks are included, and neither is the Configuration Tool. You’ll have to download the full EntLib to get those.

Why isn’t EasyObjects 1.2 included in the package?

I struggled to work this out for a long time, even opening up a discussion on the Nuget forums on Codeplex to try and nail the specifics. While Nuget does officially support .NET 1.1 libraries, there’s no clear way to modify .NET 1.1 project files to add EasyObjects 1.2 support. And realistically, if you were going to start a new web project today, would you really fire up Visual Studio 2003 and .NET 1.1? Probably not. It’s a shame, in a way, because EasyObjects 1.2 with all its separate config files would have benefitted the most from the Nuget approach. But it was not to be…

EntLib.DAAB

Just a quick word about the EntLib.DAAB package, since this is an important dependency for EasyObjects. Unfortunately Microsoft has not published an official EntLib package for Nuget, so I had to come up with my own. These are the official signed DLLs for the EntLib, but my intention is to delete this package once Microsoft publishes their official version.

You can check out the EntLib.DAAB and EasyObjects packages out on the Nuget site, or just fire up Visual Studio and add them directly to your project!

Tags: , , , ,

EasyObjects.NET 2.0 | Nuget

Month List

Page List