NHibernate vs Entity Framework: a performance test

As part of my thesis I measured the performance of some .NET ORM frameworks including NHibernate and Entity Framework. Measuring was done by implementing two simple applications using the same table structure and doing the same operations on the same data.

Note: before reading this article please see my views on comparing ORM tools. Also see the follow up post to this comparison for revised results.

I measured the time it took for each framework to complete these operations:

  • store
  • read over relations
  • read by ID
  • update
  • delete

The results were somewhat interesting. Here is a short summary of what I’ve found out.

Operation \ Number of operations NHiberante – 4K Entity Framework – 4K NHiberante – 40K Entity Framework- 40K Winner
Store 37,37 9,19 1500 98 Entity Framework
Read over relations 1,01 0,54 10,13 4,18 Entity Framework
Read by ID 3,06 25,22 246 230 NHibernate with smaller amount of objects
Update 6,61 7,34 77 72 Both
Delete 3,35 16,76 58 1824 NHibernate

Read on if you’re interested in the details of the performance measurements.

Update: the source code of the program used to measure is now available for download.
Read More…

Why I couldn’t compare Goliath with David: Vignette with Sense/Net

I’ve recently written a blog post on Sense/Net being an open source alternative of Vignette v8 based on the preview video on Vignette v8 available online.

Stating that Sense/Net 6.0 is an alternative for Vignette v8 does sound really bold though. Vignette is (well, was, until Open Text acquired it) a company on NASDAQ with over 600 employees with an annual revenue well over $200M while Sense/Net is a company of 45 and an annual revenue of about $2M. Vignette probably spends 10x more money on R&D than the total annual income of Sense/Net. What are the chances that Sense/Net can make a software even comparable to Vignette? Practically nothing.

The reason however that I made this statement is because I couldn’t prove the other way round – that Vignette is far more advanced than Sense/Net. The easiest way would have been to place the two products next to each other and evaluate them (actually this is what some vendor neutral companies like CMS Watch or J.Boye do in the forms of reports). As a simple developer/blogger though I didn’t have that option. An evaluation version of Vignette is not available for me – or even my company: we are just too small for a such a giant. So that left me to compare with the sources Vignette provided: the video and their webpage. And based on this pretty much the same functionality can be achieved with our open source software. If you are a developer you can even install the portal featured in the video and try our yourself.

I know that the comparison is not fair at all and that Vignette has a huge number of features that Sense/Net does not. I would love to get more information on Vignette to have a better comparison so if there is any publicly available data/demo other than on the Vignette v8 page, please let me know.

Disclaimer: I am a member of the core team developing Sense/Net 6.0.

Sense/Net 6.0 Beta 4 is out

On 24th July we released the Beta 4 version of Sense/Net. This version includes two important added features compared to the previous release:

  • SmartBuilding support – until this version Contents in the site could not be adressed directly, e.g. the content yoursite.com/Products/Camera-Sx-410 could only be viewed on a page with an URL someting like this: yoursite.com/ProductViewerPage?Content=Root/Products/Camera-Sx-410 With SmartBuliding. From now contents can be addressed directly and viewer pages are assigned to content in a smart way using theSmartApplication model
  • Workspace support – collaborative project workspaces can be created sharing memos, documents, deadlines an an activity log of who has been doing what.

The Beta 4 release was actually the result of rapid development – from planning to finish it took about a month – and this was the first release of Sense/Net that arrived on time as we planned to. 24 July was the deadline we set for ourselves and we managed to keep to that – and this was the first release where we used the MSF methodology as strict as possible.

To see a more detailed announcement of the Beta 4 read the blog post on the Sense/Net ECMS development blog.

NHibernate LINQ 1.0 is here

One of my biggest concerns with NHibernate is that to use it one must become familiar with Criteria and Expression quieries which is a timely process.

However LINQ support has been released for NHibernate meaning you can create complex queries without the need of learning its querying language. You can download and try it from the NHibernate Contrib site and read the official announcement on the creator’s blog.

Drupal addons vs Sense/Net features

Recently I’ve been creating a list of useful addons for Sense/Net which the community would find useful. To get an idea I started looking at some open source CMS projects with heavy community participation. I started the list with Drupal and to my surprise among the top 40 extensions I found plenty of which are core features of Sense/Net. These are the following:

  • Views
  • Content Construction Kit
  • Pathauto
  • ImageField, FileField
  • Webform

You can read the full article on the Sense/Net devblog.

First place on the Innovation Accelerator program in Silicon Valley

It’s been a week since we’ve come home from the Innovation Accelerator in Mountain View. This is the trip that we’ve won on the Microsoft Imagine Cup in Paris, last summer, as special prize. It’s been a great week – we’ve attended numerous priceless sessions and gained a peek into the entrepreneurial life in Silicon Valley. In the end of the week all the teams presented their projects to three venture capitlists – and of the six participant teams (Australia, France, Germany, Slovakia, South Africa and us, Hungary) we were the ones receiving the highest ratings!

Among the sessions were presentations on startups Liftopia, Ribbit, Zoosk, 3Scale and some others. We visited the Plug & Play Centre – an incubator for about 200 startups – a place that seems like lots of fun to work at! Of course there were some Microsoft sessions as well, we had a networking event and all key phases of starting up a company were covered in a presentation series. It’s incredible how much I’ve heard over the week..!

The Hungarian Team on the Innovation Accelerator

The Hungarian Team on the Innovation Accelerator

Innovation Accelerator participants with the three venture capitalists

Before the Innovation Accelerator we’ve taken a week long road trip in California and Nevada. If you’re interested, you can read our blog in Hungarian on the trip here.

How good will the next Microsoft search engine be?

During my stay in Silicon Valley I had the chance to chat with Steve Newcomb, the founder of Powerset. As he explained Powerset is a search engine that is based on linguistics and AI. During its development they gathered the top AI people to build a tool that would deliver better results than Google.

Steve said that the first prototype of Powerset returned more accurate results than Google. And shortly after that, on August 1st, 2008 Microsoft acquired them. When I asked Steve whether their technology is already used in Live Search or somewhere else he said he is not authorized to say anything about this.

It is commonly spread news that MS is testing a new search engine codenamed Kumo. My guess is that the core of Powerset will be integrated in this new engine in Kumo (if not renamed until launch). It will be exciting to see.

First trip to Silicon Valley

In summer 2008 me and three friends representing Hungary as team DigitalMania took part in the Microsoft Imagine Cup competiton in the software design category – one of the largest student technology competitons in the world. The task was to design an implement a solution regarding an environmental issue. We focused on the water problem and created the prototype of a system that aimed to reduce water used for irrigation by taking account various factors such as soil moisture, weather forecasts and custom user defined rules. We used custom hardware (controlling the pipes) and .NET, ASP.NET and Silverlight to for the user interface while developing the solution.

90_0_2654065312_d8f1f1fa74_b

To test how the system would work in real life we first constructed a mathematical simulation and – after we’ve calculated that savings would be 10-15% even to the soil mositure monitoring system and far more for automatic systems we built a simulation table to monitor and demonstrate the same think in a micro environment.

Read More…

CMS Vendor Meme – the Sense/Net Response

About two weeks ago ECMS vendor Day started off a smaller lavina in the CMS vendor blogosphere by completing the reality checklist published by CMS Watch and tagged some other vendor to have them complete it as well.

As of now more than 20 vendors have completed this checklist. Even though Sense/Net was not tagged once we heard of this meme, we decided to fill out the test and evaluate ourselves as well. You can see the Sense/Net CMS Vendor meme results here.

Querying many-to-many relations in NHibernate

I’ve ran into a querying scenario with NHibernate that was much less obvious to solve with the NHibernate query API than it would have been with SQL – for me at least.

In my model I’ve had a simple many-to-many relation: Entries that had multiple Categories each and Categories that belonged to multiple Entries as well.

Categories and Entries: an Entity-Relationship Diagram

Categories and Entries: a many-to-many relationship

In the underlying SQL model the many-to-many relationship was implemented via a relationship table:

Many-to-many relationship table structure

Categories and Entries table structure

Now I wanted to find all entites within a given category. Pretty simple, right? In SQL it would have been a simple join:

SELECT Entry.* FROM Entry JOIN Category_rel_Entry ON Category_rel_Entry.Entry_ID = Entry.ID WHERE Category_rel_Entry.Category_ID = @CategoryId

In Nhibernate this query is a bit more tricky, let me share how it can be done.

Note: this post is also a good example of how to define a many to many relationship schema in NHibernate.

Read More…

1 4 5 6 7 8  Scroll to top