Saturday, February 27, 2010

DevEvening: ORM Showdown

Last night at DevEvening we had on ORM showdown.  6 people each gave a 15-20 minute presentation on a different ORM.

I went first and gave a quick overview of SubSonic.  There are some screencasts which are similar to the demos I gave on the SubSonic site.

Next up was Dave Hawes who spoke about LLBLGen Pro.
This struck me as a cross between SubSonic version 2 and Entity Framework.  I was impressed to see Access & Azure support.  It's a commercial product and so offers a level of support.  If I was looking for an ORM similar to SubSonic but with commercial support I would look at this.

Before we broke for food, Jeremy Skinner presented NHibernate.
I'm aware of NHibernate being very popular so was keen to get a look at it.  It's clearly powerful but seems to require a massive amount of configuration via XML files.  The fluent version means that the configuration can be in code, but it's still a lot of configuration, even if the model and schema are the same.  The prospect of using a bespoke query language (either HQL or criteria) doesn't appeal either.
I still don't see the benefits of using NHibernate yet compared with the other tools avaialble.

After the break for food and an advert for Azure, Andy Pike presented Castle ActiveRecord.
This is an attempt to build implement Martin Fowlers Active Record pattern, based on top of NHibernate and apparently influenced by Ruby on Rails.
Andy claimed that a plus to AR was the lack of code generation.  There was still a need to write a lot of configuration code to be able to use it though so I don't buy this argument.
I certainly found this more appealing than working with NHibernate directly and was particularly impressed by the validation functionality.  Easy integration with other Castle tools is also an appealing factor.

Nick Haslam enlightened us on Telerik OpenAccess.
The price of this means that I'll probably never use it but I was very curious about it's built in caching and disconnected API functionality.  Maybe the Express version, which works with SQLServer Express & Oracle Express, may be a way I may use it.  If you're a fan of drag and drop development I can see this being appealing. 

And finally, Howard Richards covered LINQ to SQL.
This is SQL Server only and "de-emphasised" in place of Entity Framework.  As such it is no longer being developed.  From that respect I don't think I'd consider using it.  If I wanted a designer based way of interacting with an ORM without the expense of the Telerik solution this could be the answer.

As a short bonus at the end Jez gave us a quick overview of something, he'd written himself, which he uses rather than an ORM.  While interesting, the general consensus of the room seemed to be that while we'd just spent the last 2 and a bit hours learning about some of the solutions which already exist, the prospect of spending any time and effort doing the same ourselves didn't seem worth the effort.

I can't see a good reason not to use an ORM.  At the very least they have the potential to save lots of time.

Tuesday, February 23, 2010

The importance of simplicity and usability

Increasingly, people seem to misinterpret complexity as sophistication, which is baffling—the incomprehensible should cause suspicion rather than admiration. Possibly this trend results from a mistaken belief that using a somewhat mysterious device confers an aura of power on the user.
—Niklaus Wirth

Friday, February 12, 2010

Introducing .NET 4.0 with Visual Studio 2010


What happens if you take a year or so to learn about everything that's coming in .NET 4.0 and Visual Studio 2010?

Well, if you are Alex Mackey you learn enough to write a book.  And an ambitious book at that as it covers a very broad range of subjects:

Visual Studio IDE changes, MEF, C# & VB.net Language changes, CLR, BCL & Code Contracts, Parallization and threading, WF, WCF, Entity Framework, ADO.NET data services, ASP.NET 4.0, ASP.NET AJAX, jQuery, ASP.NET MVC, WPF 4, Siverlight 3 & Azure

The aim of the book is simple:
Be an introduction to the range of new features, functionality and tools available in VS2010 & .NET 4.0.  The intention is it's a book which is accessible to any developer. Even those who wouldn't normally go out of their way to learn about what's new.

I found the book to be an excellent source of insight to the topics it covers.  Alex provides a clear and easily readable introduction to these technologies and how they may be useful.

Don't be put off by the "Introducing" part of the title.  This is not a book for developers who are new to Visual Studio and the .NET Framework. Rather, it is a book for those who have worked with earlier versions of these tools and want to find out what the new versions contain.

While I was familiar with some of the topics in the book I found it very informative and have learnt a lot from reading it.

If you are a developer working with .NET I can only think of 3 reasons not to buy this book:
1. You are confident that in the rest of your career you will never use anything other than the tools you are currently using. (Unless you plan on retiring soon I can't imagine this being the case.)
2. You already know everything about ALL the topics it covers. (In which case you could probably write your own books on the subject.)
3. You have it already.
If I had any criticism of the book it would be that the sample code isn't available. (Or if it is it's not somewhere obvious.)  My guess is that the reason for this is that the final version of both Visual Studio and the .NET framework have not yet been released.  The book and many of it's examples are based on information from the beta versions and early documentation.  It's possible (likley?) that there may be some level of breaking changes when the final version are released.  Any sample code might not then work. I can therefore, see why it may not be appropriate to release the code.

Disclaimer: Alex set up DevEvening in the UK, which I now organise. I reviewed the early version of some chapters of the book in early 2009.  I also wrote a small secction in the introduction.  This (below) is an affiliate link - but no-one ever clicks on my affiliate links so I don't really expect anything from it.

Wednesday, February 10, 2010

NonSilent Windows DRM license delivery and duplicate web page requests

On the off chance that someone else may come across this issue.

If you are issuing windows DRM licenses via the embedded browser control in WIndows Media Player be aware that the first request the player will make will be with a user agent similar to
User-Agent: Windows-Media-DRM/11.0.5721.5145
If a license is not returned for this request a second request will be made using the Internet Explorer user agent.


This can matter if you are using cookies or session values which you are only persisting for a single subsequent request but WMP makes 2 requests and it's the second you want. (No comment on the number of hours I spent learning this the hard way.)

Monday, February 01, 2010

Visualising Product Sales

Displaying sales data in a bar chart has got a bit boring. So, I've been exploring some different ways of displaying this information.

Here are the products sold at a bar (sorry - can't tell you which one or where) as a tag cloud.


Obviously this isn't appropriate in all situations but as an indication of which products are the most popular it makes a pleasant change.

Have you written off all search engines apart from Google?

What's going on in the world?

First there was talk of Bing becoming the default search engine on the iPhone. Yes, the iPhone as made by Apple!?!

And now the Bing toobar is being bundled with Java!  Yes, Java - from Sun who are now owned by Oracle.

Have you written off every other search engine except Google?

Have you written off Microsoft?

It seems that when it comes to a lot of big companies, when considering Google and Microsoft, the enemy of my enemy is my friend.