Subsonic 3 VS Entity Framework

Has anyone worked with Subsonic3 and Entity Framework here, who can tell me the pros and cons? This is my first attempt to try them. Subsonic is easy to configure like the Entity Framework. I'm not sure if Entity Framework works with other databases, how does SubSonic do MySql PGsql etc ...? I read this post ( http://www.timacheson.com/Blog/2009/jun/entity_framework_vs_subsonic ) which is convincing enough to choose Entity Framework over SubSonic. But I needed a second discovery.

+6
entity-framework subsonic subsonic3
source share
2 answers

Well, these two very different animals!

Subsonic 3 is a great tool for simple and easy mapping of a database structure of approximately 1: 1 to object classes, where each class will be an exact representation of a table in a base database (as is the case with Linq-to -SQL).

On the other hand, the Entity Framework aims at more complex scenarios where your domain or object model (your classes) will not necessarily map 1: 1 tables to the database table. That is why EF has a trilogy of XML files, describing the conceptual level (objects of your domain), one storage level (database layout) and the mapping between the two.

IMHO, Subsonic 3, and Linq-to-SQL are ideal for fast, small, and medium sized projects where your database is flexible enough to change if necessary, and where you have a fairly simple mapping of your objects to tables. EF really shines in large-scale enterprise applications, where the database level can be set in stone, and you cannot change it - or your application must survive, even if the database of the undermines is changed.

Completely different animals - completely different audiences, in my opinion.

Mark

PS: I wonder if Tim really used Subsonic 3 in this comparison and what exactly he did. My gut feeling would be that EF would be a “big” overhead and therefore could be a little less productive (but more flexible in Enterprise scenarios that are worth their weight in gold, even if it sacrifices some performance)

+17
source share

In case this helps, in my tests I used Subsonic 2.1 (as indicated) and compared data access levels in a moderate load scenario (as indicated in the methodology). I provided the code, so my test can be easily reproduced.

If you boot the system by reproducing the conditions in the web application during use, EF will prove that it provides much better performance . This is confirmed by tests for downloading a full web application. In more complex tests, EF optimization capabilities, such as lazy-load, can provide even greater benefits compared to Subsonic.

If you are comparing individual data access operations, for example. in a simple unit test, Subsonic seems to be faster. In particular, Subsonic initializes faster.

I would recommend Fluent NHibernate or Entity Framework if performance is a key consideration.

+3
source share

All Articles