| · |
NJDX OR-Mapper - Where can I find this?
by
|
Message #145713
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
nhibernate will be =)
I've fiddled around with many of the ORM Tools listed here, I've gotta say I've really come to like the way nhibernate does business.
People claim the xml based mapping files are a nuisance, but the plain fact of matter is I dont want a code generator, that just overwrites any changes I make etc.
I want something to *MAP* properties to data fields.
nhibernate based on hibernate has been out there for a while, and has a huge following.
nhibernate is still in "alpha", which is a little discouraging etc, but I've gotta say I've been playing with it, and its more missing functionality, than broken functionality.
Keep your eye on it.
|
|
Message #145715
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Ask TheServerSide: Which .NET ORM is best?
Are you trying to stress test your site?
Kenneth Russo USCA5
|
|
Message #145721
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Ask TheServerSide: Which .NET ORM is best?
Are you trying to stress test your site?Kenneth RussoUSCA5 Bring it on! :-)
|
|
Message #145723
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
.Net ORM
Surprised not to see Paul Wilsons's O/R mapper on the list. =) Anyway, I like EntityBroker and LLBLGen.
|
|
Message #145724
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Ask TheServerSide: Which .NET ORM is best?
What is the point of comparing these products if MS is going to have the ObjectSpace soon.
|
|
Message #145726
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
the point & ObjectSpaces comment
are you serious? when do you *think* objectspaces will come out - and will it be objectspaces or something totally different. and to add a new twist, will it even come out with the new proposed chanes to c# to have direct ability to query relational databases (only sql server?) built in? NHibernate rocks - use that one. Microsoft hasn't come clean on that area of development planning yet - the only thing they have done it put it off time and again.
|
|
Message #145730
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
nhibernate will be =)
ObjectZ.Net de Mongoose Solutions is a very good product, unfortunately by the arrival of the ObjectSpaces the product will no longer be updated.
I make several projects with it and it's very util as much for the development as for the maintenance
if you wish a stable production product.. you can count on it.
jorge puga
|
|
Message #145731
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
NEO?
What about NEO? I've been using it for a while now and it is great. Can anybody tell me why NHibernate is better? That is if it actually is better.
|
|
Message #145733
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Comparison between ORMs
I'm trying to find an O/R mapper or code generator which fits my project's needs. It would be very helpful a comparison between all these ORMs listed in this thread based on a relevant list of criteria. Anybody knows about such a comoparison?
|
|
Message #145738
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
ObjectSpaces
If you check our coverage of DevConnections this week, Microsoft confirmed that ObjectSpaces will be released sometime AFTER Longhorn. I don't think I can wait that long. :-)
By the way, there were some other very interesting questions answered during the Microsoft "Unplugged" event. Check out day 2 coverag here.
|
|
Message #145742
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Only the "real" users own the truth
The best way to compare those products is to have some feed back from real users, the ones who really used the tools in production applications, and not little articles to show the functionnalities. Because is an article you wan't face with all production constraints for real.
But how many ORM show you their customers list ? Not so much ! Though it applies only for commercial products, its a good way to have a first sight at the real use.
For instance, Data Tier Modeler (Evaluant) is fully downloadable, and a runtime license is requiered for production only. Then watch out the "real" customers list: L'Oreal, Pfizer, GE, Thales, Endress Hauser, Ciba, DMC, Thiriet, W4, ... and this are only the biggest companies in the portfolio, which bought a "production" license.
One should not trust everything claimed. Just verify it.
|
|
Message #145748
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Keeping our eyes on NHibernate
The provenance of this OS tool means that we are seriously interested in it. Even though it is on alpha it is definitely on our watch list and we are actively investigating it.
|
|
Message #145752
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Ask TheServerSide: Which .NET ORM is best?
There are few more things that we need to discuss here.
How do you call some thing as the best? 1. Code Generated by these tools, the developer should be able to understand and modify to suit his needs. No ORM.NET product suits all your needs. Here is the cache. Most of the commercial products come with their own Dlls from which they inherit. They do not allow debugging either. So Generated Code should be pure VB.NET, C#.NET code. No vendor based dll references. Conclusion: Most of the Commercial tools fail to meet the criteria as their code depends on their own DLL files 2. Should support all relationships including many to many Most of them do that. It is difficult to choose one. 3. Should automatically read the relationship from the database. I do not think ObjectZ.NET does that
4. Generated Framework should be easy to learn and " D E B U G" ORM.NET has become open source. And the product that is available in sourceforge does not generate the code as mentioned in the example files. Other commercial tools fail as they do open the DLLS.
Are there any other options? I am surprised to find that nAlliance products not getting listed here. It generates pure VB.NET code. They allow debugging. It is easier to learn. This is the best in my opinion. Template based code generators.
Now if you do not want to use external frameworks go far the following template based code generators mygenerationsoftware codesmith
Both of them are excellent. Design your database and Framework. Generate the code using the above tools.
Advantages 1. saves time. 2. You still have the code with which you’re comfortable!!! 3. No External dependency.
It does not take that long to learn these tools. You can generate the code with in hour or two...
Welcome your comments
Thanks and Regards Balachandar Ganesan.
|
|
Message #145756
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Ask TheServerSide: Which .NET ORM is best?
I'd be interested in seeing a survey of who uses what... let's get some numbers behind the discussion.
|
|
Message #145764
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
NHibernate
I looked at NHibernate recently and I would have to say although it is "alpha" that means something totally different than when company A says "alpha". If I had more time, I'd contribute, but I'm busy contributing to other projects at the moment. Now, if more people would contribute to it, it would reach release sooner.
|
|
Message #145767
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Compare apple to apple
ORM and DAL tool are mixed up in this list. Can we make some categorization and compare these tools.
|
|
Message #145770
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Compare apple to apple
>> ORM and DAL tool are mixed up in this list.
Sure, However, our tool (MyGeneration) is a strange bird, it is a generic code generator, it can generate NHibernate, Gentle.NET, and soon OPF.NET ORM classes, and it comes with it's own DAL called dOOdads. And although we don't provide an ORM architecture we have customers using it to generate both thier own ORM's and thier own DAL's.
|
|
Message #145774
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
What do you do about Persistence in SOA?
Has anyone used any of these in a SOA?
People tend to use DataSets in this environment but frankly, I really would prefer to use my data in an OO fashion instead of DataTables and DataRows. Even the Java folks (who have such strong O/R projects) seem like that might migrate toward this model with JSR 235, Service Data Objects.
|
|
Message #145775
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Deklarit
I'm not sure I would classify all of the products listed as object - relational mappers. Raptier, for example I see as a code generator for producing a data access layer and application.
In the same light, I like Deklarit. You can "declare" your objects and it produces a database, DAL and application for you. It does not however produce business objects per se, so I wouldn't classify it as an OR mapper, but it falls in close with some of the other products listed.
-Trevor
|
|
Message #145784
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
What do you do about Persistence in SOA?
In Rocky Lhotka's Tech Talk interview, he discusses where Objects fit into a Service Oriented Architecture. His opinion is that once a message enters a service, from that point on you're dealing with objects. Therefore, your messages might be used as input to create some business objects which you would then use to perform whatever logic the service does, and if you need to store the data you could use an ORM inside the service.
|
|
Message #145795
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Ask TheServerSide: Which .NET ORM is best?
Discussing O/R mapper tools is ok, as long as the lists of tools is accurate, but a lot of the tools on the list are no longer maintained or their companies are out of business.
Because recently a loooong thread on the www.asp.net forums was held I'll just point to that thread: http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=651804
To really know which tools to pick, it's essential to know which tools match your way you want to work with your data, or better: the way you want to work and solve the DataAccess problem. I've written an article about that: http://weblogs.asp.net/fbouma/archive/2004/10/09/240225.aspx When you know how you want to work with your data and how you want to see the DataAccess problem solved, you can better pick the right tool to solve that DataAccess problem for you. Just going for 'DataSets' or an 'O/R mapper' is not recommended as it might be that that solution is not matching with the way you want to work/solve the data access problem.
I read somewhere in this thread that commercial O/R mapper vendors should show a list of their clients. I don't know if this person sells software, but it's often very difficult to get a large company's legal department agree on the fact you use their name for commercial purposes, that's why you don't find a lot of big names on the lists of customers enlisted on commercial O/R mapper vendors. :)
Cheers,
Frans Bouma (C# MVP), Lead developer of LLBLGen Pro http://www.llblgen.com
|
|
Message #145804
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
NEO!
I love NEO. I've been using it for two projects know, and it rocks. Instead of Java-based technologies ported to the .NET framework, it is one of the few open source projects originally started for .NET. Additionaly, the code is of high quality and it has MsSQL, Oracle, and FireBird support.
|
|
Message #145841
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Ask TheServerSide: Which .NET ORM is best?
I read somewhere in this thread that commercial O/R mapper vendors should show a list of their clients. I don't know if this person sells software, but it's often very difficult to get a large company's legal department agree on the fact you use their name for commercial purposes, that's why you don't find a lot of big names on the lists of customers enlisted on commercial O/R mapper vendors. I agree that "some" companies prevent you from using their name as a marketing argument. But they remain few compared to those which don't care about it. So assuming that 50% refuse it, let users assume that the number of production users is twice the list ;) Hopefully all companies are not that big.
Thanks Frans, Sébastien
|
|
Message #145847
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
But does that answer the question? No.
I read somewhere in this thread that commercial O/R mapper vendors should show a list of their clients. I don't know if this person sells software, but it's often very difficult to get a large company's legal department agree on the fact you use their name for commercial purposes, that's why you don't find a lot of big names on the lists of customers enlisted on commercial O/R mapper vendors. I agree that "some" companies prevent you from using their name as a marketing argument. But they remain few compared to those which don't care about it. So assuming that 50% refuse it, let users assume that the number of production users is twice the list ;) Hopefully all companies are not that big. Well I can assure you most of them do care, even little companies. I find that understandable though.
Furthermore, although I'd love to have all the big names we have as a customer on a list on our website, personally I don't see that as important: I don't want people to buy our product just because company X bought it too, I want them to buy it it because it fits their needs. If a company buys a license of a given product and it doesn't work for them because the product asks for a certain way of doing things which don't match the way the customer wants to work, the application is often dropped as 'crap', while it just does things differently.
That's why I find it so important that people understand what the real problem is: Data Access, and that there are several ways to solve that problem, and with each way you can find tools to help you. I find that one of the major points which is almost always completely ignored when O/R mapping is discussed: these discussions often go into the direction of "O/R mapping is great, just use it and it will help you", but that's the wrong message, the wrong discussion. The discussion should go about WHY O/R mapping will help you, as THAT's the main question the vast majority of the .NET developers is fighting with when it comes to O/R mapping: What is it and WHY is it so important I should use it?
|
|
Message #145851
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
You may go without ORM as well
There is no requirement to user ORM. It is just design choice to make midleware object design first, then derive shema from it. If you are better at designing at relational level, you dont need ORM. Just read database content using some shema into general value objects(XML may be used for this) and you will have all ORM caching, access properties without ORM coding/generating. Accesing myObject.MyInteger from is as good as myObject.asInteger("myInteger") in general value object.
This approach allowed to program faster, as usualy after database changes(new fields) there was no need in any coding or deploy, just shema changes. My html forms, validators and sql where generated from shema on fly. Only thing, that you can not include in shema is unique business logic.
|
|
Message #145865
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Versant Open Access .NET
Hi everybody,
we are proud to announce the public availability of the (quite stable) alpha release of
Versant Open Access .NET
(download it from http://www.versant.com/downloads/openaccessdotnet )
Versant Open Access .NET is not just an ORM for .NET, it will be THE mapper for .NET.
The reason is plain simple: Versant Open Access .NET combines performance and usability within one product.
If I take a look at the other listed projects/products, I see that the ORM market for .NET is quite immature if compared to the same market in the Java world.
Most products listed are made by companies that are 2-3 persons big, some are performant, some are usable - but the combination is rare.
What do users of an ORM expect?
It's just these three points:
Performance, cool and usable API, cool and usable tools
Performance =========== Performance plays a big role in two layers of an ORM: 1. object layer 2. mapping layer
Lets first discuss the object layer:
The need for performance makes any product unusable that relies on reflection. While reflection based approaches impose only few restrictions to your datamodel (what is good), reflection is just slow.
Performance (in the object layer) can only be achieved by products that rely on code generation.
Okay, there are a few around that actually do code generation. But this comes with a real ugly API and restrictions usually, whereas reflection based products just use your classes as they are!
How can that be combined?
The solution is along for a long time now, and we have brought it into the .NET world with FastObjects .NET: Intermediate Language Generation
You have as few restrictions on your classes as with reflection-based approaches and it is fast.
-write your classes as you want, no need for: special base class, special interface, special properties, special collection/dictionary or making your class abstract -automatic lazy-loading, you don't need to care, no special holder/link classes needed -automatic change-tracking, if you change an object and you commit the transaction, then it is stored - you don't need to care
This process is seamless integrated in Visual Studio .NET, i.e. just build your project and after compilation this code generation is done automatically.
The techniques for performance in the mapping layer are well-known, just let me say here, that Versant Open Access .NET is optimized for the most efficient SQL statement generation, and is highly configurable.
We have already won the contest on www.theserverside.com in needing the lowest number of SQL statements for a given task, see:
The TORPEDO benchmark: http://www.theserverside.com/news/thread.tss?thread_id=29138
API === As I've stated above, just write your classes, whether your fields are private or not, whether you have properties defined or not, if you use collection-valued members - we don't care!
It just works due to the technique of intermediate language generation.
Objects are loaded into memory just-in-time, change tracking works automatically, we offer optimistic as well as pessimistic concurrency control.
Pessimistic just does not work with reflection based approaches, because they don't intercept changes to your object - so they have to stick to optimistic concurrency control, whereas intermediate language generation gives you the choice.
Here is a brief example, (C#, but all managed languages are supported):
[Persistent] public class Person { string name; Person father; [ItemType(typeof(Address))] ArrayList addresses; //... methods + properties }
[Persistent] public class Address { int zip; string street; //... method + properties }
The example shows field access via properties, because that is best practise in .NET, however making your fields public would work exactly the same.
How to create new objects in your database: -------------------------------------------
Person p = new Person; p.Name = "John Doe"; p.Father = father; //father is another Person object p.Addresses.Add( new Address(12345, "Mainstreet" ));
objectScope.Transaction.Begin(); objectScope.Add( p ); objectScope.Transaction.Commit();
Note, that the address and father is automatically stored due to persistence by reachability.
How to get object out of the database: -------------------------------------- Either use a query, we offer OQL as an enhancement to SQL that also allows path expressions:
SELECT * FROM PersonExtent as p WHERE p.addresses.zip = 12345
(Selects all persons having at least on address that has a zip of 12345)
Or if you have obtained the first objects you can continue with navigation:
Console.WriteLine( p.Father.Name );
Note, that the father is loaded transparently into memory just-in-time upon first access.
How to change objects: ---------------------- //... p.Name = "NewName"; objectScope.Transaction.Commit();
Just change the object, we know, which objects are changed and thus need to be stored.
Tools =====
Starting from object model and generating the relational model or reverse-engineer your existing relational model into objects - we support both!
Just start the NorthWind example in our alpha release and discover your SQl Servers NorthWind database with new eyes, uhm, I mean objects ;-)
(the GUI tool for reverse engineering will be available as of the beta-release, with the alpha you need to manually edit the mapping configuration)
When starting from object model, our VS Integration automatically creates your database with all tables, when using the default mapping you don't even need to specify a mapping configuration.
Best regards,
Christian Romberg Versant Europe
|
|
Message #145883
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Versant doesn't look particularly mature.
Cristian,
If you're not confident enough about your product to provide a price on your web site then it doesn't sound very mature to me. Either it's not baked yet or it's waaay too expensive (and you know it). There are several no/low cost alternatives in that list.
It sounds like this discussion should move to a wikki so we can categorize the list and comment on each of the alternatives. Volunteers?
|
|
Message #145885
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Versant Open Access .NET
Ah, immature eh? And your mature alpha tool makes it suddenly 'mature' ? :)
Okay, there are a few around that actually do code generation. But this comes with a real ugly API and restrictions usually, whereas reflection based products just use your classes as they are!
How can that be combined?
The solution is along for a long time now, and we have brought it into the .NET world with FastObjects .NET: Intermediate Language Generation Ah 'Intermediate Language Generation', as in 'generate and compile proxy classes behind the scenes' ? Or are you manipulating IL at runtime? (because that's not recommended by MS). At least DataObjects.NET does the same thing.
Besides, what's 'ugly' is subjective to taste. What you apparently find 'beautiful' (like typing a lot of attributes) is not beautiful for other people, so it would be great if you could keep the marketing-poop out of this discussion and come with real arguments. This thread is not to advertise applications.
I've seen advertisements of Versant before, and they lack 1 thing: what's the price for all this? The same as for the JDO version? For enterprise applications that's 3000EUR per developer, + 540 EUR support.
Now, you talk about 'cool' this and 'cool' that and try to make every other product for .NET look ugly, slow, immature and basicly: garbage, but for a team of 20 developers trying to develop an enterprise system, that's 60,000 EUR. I'm not sure but every competitor on .NET (except firestar's solution perhaps) has a way more competitive pricing with sometimes equal features to your batch of features and free support.
But then again, perhaps I don't know what beautiful or cool means in the .NET world.
Frans Bouma, C# MVP http://www.llblgen.com
|
|
Message #145886
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Versant Open Access .NET
Now, while we're busy here, let's look at the brochure. I found one claim very farfetched for an alpha product:
* Performance Highly tuned SQL code generation makes Versant Open Access .NET the fastest object-relational mapping available for .NET. And why is that? You have any proof of that to back that up? you think other O/R mappers don't tune their SQL generation? :)
If I have entity type A and B having an m:1 relationship and I fetch 100 A's and I want all these A's related B's, how many queries do you need? 101 or 2? (we need 2)
Say I want to update the salary of all employees of department D with an increase of 5%. D has 1000 employees. How many queries do you need, 1 or 1001? (we need 1)
But I'd like to see your testing numbers to see if you're really the fastest O/R mapper on .NET :)
|
|
Message #145895
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
We have "gotten" to the meat of the matter
Frans, you have "gotten" to the meat of the matter. There are tons of O/R mappers and DAL generators available out there (and those that span both categories). The task of choosing is overwhelming to most and it's hard to categorize and evaluate them all.
TheServerSide.NET is a great resource for news and they will probably make money via advertising some day and become profitable. There is opportunity here for someone to start their own site, look at http://www.tpc.org. It would seem to me that we need to create benchmark application using say SQL's Northwind database that folks can use to evaluate all of these various systems. Vendors then go about writing such an application and results are publish (and verified)
How long did it take you to build the application? How many lines of code? What is the performance of the system? How much does the tool cost?
And so on ...
It is my bet that products like MyGeneration and our (DAL - dOOdads) will perform as well, maybe better, and prove to be far more easy to understand, generate, and maintain than most O/R Mapping systems for the vast majority of applications that most of us end up writing.
The question is not which O/R Mapper do I choose, but how I save money, time, and maintenance effort, i.e., which method and product is going to give me the best chance of success. Don't get me wrong, I'm a big fan of LLBLGen and you're price is extremely reasonable.
We need a standard benchmark and site where folks can go to get such information, any takers?
|
|
Message #145896
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
I'm still not clear where O/R fits in SOA?
I'm still not clear where O/R fits in SOA.
In a SOA, you really just have dumb data containers and the DatSet does that well. However, the fact that even typed DataSets are tied to the table/row view of the world is a big turnoff to me.
Now, as far as I understand most of the O/R mappers in the .NET space, they're not really suited toward SOA in that the objects must run within the context of the manager which tracks persistence changes (i.e. the server). In SOA, you typically return a data container from a web service, do something with it on the client (who may be disconnected) and then later synch those changes back up with the data store.
Do any of these O/R tools provide this sort of capability?
|
|
Message #145902
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
The Best ORM is No ORM
ORM is, for the most part, solving the wrong problem. In fact the problem does not really exist. There is no "mismatch" problem, other than a thought mismatch that you have been fed.
According to Dr. Alan Kay (slightly paraphrased) "Its the message stupid!" In other words, objects are about things you send messages to to get work done. Data representations are hidden. Implementations are evolvable.
So data in relational databases exists in relations (for a complete discussion see Date and Darwin - The Third Manifesto). The database is an object. You do not know, nor need to know, how it is implemented. You send the database messages to get things done. SQL is currently a pragmatic "message language", but anything based on Relational Algebra or Relational Calculus would do (Google for more info).
Bring a database into your application - the .NET DataSet. Send it messages (SQL works). It does things (returns other objects, changes state, ...).
If it sounds like and object, and it walks like an object,...
So ORM is, for the most part, a diversion, a myth, unnecessary baggage.
|
|
Message #145904
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
I'm still not clear where O/R fits in SOA?
However, the fact that even typed DataSets are tied to the table/row view of the world is a big turnoff to me. That just makes no sense at all, DataSets and DataTables are disconnected, i.e., their data comes from a database (typically) and then it's dis-connected. You can save your DataSet in XML, email it to your buddy, have him edit it and then email it back to you, you can then reload it into a DataSet and save it, SOA baby !! This is true for anything? Honestly, why do people make such statements? No matter what you use, at some point it needs to get back into your database. So what do you do put 20 layers in-between to make yourself feel better or even superior, you have a responsiblity to your company and or clients to get the project done on time, and have it be maintainable, that is all.
Tables in Databases are real world object, Users, Orders, Products, and so on, why do people insist on saying that they are not?
And, I agree with the previous comment regarding O/R mapping, people often say that relational databases don't work well with OOP, on the contrary, they're a perfect match? To me, there's way to much "book reading" going on and not enough projects under the belt (a general statement not a personal attack).
|
|
Message #145919
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
I'm still not clear where O/R fits in SOA?
I've got to versions of the same SOA application--one that uses the DataSet, and one that uses domain entities. The one with DataSets has a lot less code, but the one with domain entities is a lot easier and less error prone to code against because it exposes a properly abstracted domain model of strongly typed objects. Additionally, the one with domain objects exposes a web service that can be consumed by non .NET tools (like Flash MX Professional for example).
There is certainly an impedance mismatch. That is why all these O/R mapping tools exist. Anytime you find yourself navigating a many-to-many relationship via a join table in a DataSet you're seeing it.
It just has never felt elegant to me. Sort of like if someone decided to use Hashtables for their entire object model:
Hashtable person = new Hashtable(); person["name"] = "Joe Smith"; person["age"] = 45; person["address"] = new Hashtable(); ((Hashtable)person["address"])["city"] = "Dallas"
public Hashtable Wed(Hashtable p1, Hashtable p2) { Hashtable family = new Hashtable(); family["husband"] = p1; family["wife"] = p2; return family; }
LOL, crazy...
|
|
Message #145920
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
The Best ORM is No ORM
ORM is, for the most part, solving the wrong problem. In fact the problem does not really exist. There is no "mismatch" problem, other than a thought mismatch that you have been fed.According to Dr. Alan Kay (slightly paraphrased) "Its the message stupid!" In other words, objects are about things you send messages to to get work done. Data representations are hidden. Implementations are evolvable.So data in relational databases exists in relations (for a complete discussion see Date and Darwin - The Third Manifesto). The database is an object. You do not know, nor need to know, how it is implemented. You send the database messages to get things done. SQL is currently a pragmatic "message language", but anything based on Relational Algebra or Relational Calculus would do (Google for more info).Bring a database into your application - the .NET DataSet. Send it messages (SQL works). It does things (returns other objects, changes state, ...).If it sounds like and object, and it walks like an object,...So ORM is, for the most part, a diversion, a myth, unnecessary baggage. I would disagree on that. In last couple projects, both in .net and java world, the data layer had embedded SQL statements and since we were for still in development stage for sometime, these data layer objects had to be changed frequently. Due to which new errors were introduced due to typos, trigger errors, java/.net types to sql type data conversion errors and so on.... For the current project, we are using Hibernate[java version] and it works great. In .net [mainly for web services], we are still testing NHibernate and so far it stood our performance and regression testing... I do agree that writing mapping files wasn’t easy, especially it gets way to complex with object relationships and so on...at some point we ended up writing named SQL select statements right in the mapping file because of lack of knowledge on advance relationships mappings & of course project time. Anyway, it was still better than the embedded SQL statements, because ultimately you still be using Hibernate to save your objects...
|
|
Message #145922
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
The Best ORM is No ORM
The ORM issue is quite orthogonal to the issue of getting SQL right.
Whichever approach you take someone must get the sql right (be it stored procedures, dynamic sql or whatever). If your team cannot do it, then by all means use some code generation techniques.
You have only made the case for code generation, not a need for ORM.
|
|
Message #145925
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
You are _so_ wrong
ORM is, for the most part, solving the wrong problem. In fact the problem does not really exist. There is no "mismatch" problem, other than a thought mismatch that you have been fed.According to Dr. Alan Kay (slightly paraphrased) "Its the message stupid!" In other words, objects are about things you send messages to to get work done. Data representations are hidden. Implementations are evolvable.So data in relational databases exists in relations (for a complete discussion see Date and Darwin - The Third Manifesto). The database is an object. You do not know, nor need to know, how it is implemented. You send the database messages to get things done. SQL is currently a pragmatic "message language", but anything based on Relational Algebra or Relational Calculus would do (Google for more info).Bring a database into your application - the .NET DataSet. Send it messages (SQL works). It does things (returns other objects, changes state, ...).If it sounds like and object, and it walks like an object,...So ORM is, for the most part, a diversion, a myth, unnecessary baggage. Using the same reasoning, I could say that every memory address is an object. I do need to know how it is implemented physically, but I can send it a message to get things done: JMP would do, as would MOV and any other instruction of the assembler "message language". But hey, since I can send it message, it must be an object, right?
Wrong. Object-oriented programming isn't about grouping some functions with variables together into structs. It's about logically grouping functionality so that you hide the inner workings to ease later refactoring. Also, it's about basing your work on the abstractions of other (people's) objects.
And that is exactly what a decent ORM is about: it hides the often complex and tedious work that comes with relational databases, so that the developer can concentrate on the business logic instead.
|
|
Message #145929
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
You are _so_ wrong
"...Using the same reasoning..."
No one would agree with your reasoning. By no stretch of the imagination is your example object oriented thinking. Treating a Relational DataBase as an Object, however, is.
And indeed to your second paragraph - the inner workings are indeed hidden. A Relational Database is an abstraction, and a very good one.
You talk of "... complex and tedious work that comes with relational databases...". Code generation will deal with that as well as ORM. (And some of the complexity cannot be escaped even with ORM.)
You have given no argument for ORM.
|
|
Message #145933
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
It's about the objects!
Software engineering is based on abstractions that hide information. Leaky abstractions perhaps, but abstractions nonetheless. Assembly language is an abstraction based on a bunch of ones and zeros. C is an abstraction based on assembly. The .NET framework is an abstraction based on C. A relational database is an abstraction based on C, TCP/IP and whatnot. ORMs are abstractions based on a relational databases, and (in this case) the .NET framework.
However, and here is where we differ: not every abstraction is object oriented. C is not object oriented, and neither are relational databases. Even ADO.NET is not object oriented, with its relational model of DataSets, DataTables and DataRows.
ORMs are object oriented. This means that you can send the "add $100" message to a certain bank account object, instead of updating the row with a certain bank account id so that its amount is increased by the old value plus 100.
And if this isn't an argument for ORMs, I don't know what is.
|
|
Message #145935
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
It's about the objects!
"...Even ADO.NET is not object oriented..."
Please...!
I am afraid you need to go back to basics and study what Object Oriented means.
|
|
Message #145936
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
SOA, O/R and databases
Our approach with DeKlarit is somewhat different to what is being discussed here, so I think it's interesting to describe it (and yes, as it was said before, DeKlarit is not an O/R mapper).
You have a database. You need to load the records in some data structure to be able to work with them.
You are going to do something with that data. Usually, apply business logic and use it in a presentation layer (or service layer).
We think that instead of having a set of data structures that match the somehow the relational data model (even if you don't map a table to a class, the object model is usually similar to the schema) is not a good idea, because they don't fit well the way we want to use that data later.
Why couldn't we use data structures that fit better in the ways we want to use that data?
If you want to build an Order form, or an Order Service, you probably know exactly with projection of the data model (or object model) you need. You know you need the Order header and lines. You know you need some fields from the Product and the Customer table, but probably not all of them. This is like an aggregate in DDD but with the addition that you can get just some fields from each class, not the whole class.
If you can get your DAL to retrieve that data easily, then you'll have something that you can easily use in a UI in a multi tier architecture, or in a Web page, or in a SOA.
Working with this kind of structure is like working with messages that are mapped to a relational database.
On the other hand, why do you want to have an object model with only one 'Customer' class? Because you want to write the Customer business logic bound to that class somehow. Each time you update a Customer you'll do it through the Customer class and you'll ensure its consistency.
A message based aproach that does not have an object model behind it, has the problem that you will have several ways to update a single entity, one for each kind of different message.
The solution we see for that problem is to have a set of business rules will be applied in 'the right time'. You can have a rule that says 'the Item Inventory cannot be less than zero', and apply it in when a message requires to update the Inventory.
If you build applications that way, then you save yourself a layer. You don't need a domain model and a service layer to work with distributed applications, you can use the message based one for all of them.
Also note that the structure of the message is probably much more stable than the structure of the underlying object model or data model, so your code will be more resilient to data/object model changes.
We use DataSets for the messages because we think they are a good thing, but this architecture can be used with any kind of data container.
Regards,
Andres Aguiar Program Manager DeKlarit
|
|
Message #145944
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
ORM Discussions are exhausting me . . .
I know we're trying to grow TheServerSide.NET; I'm totally on board there. But the constant use of ORM as a topic simply because it's hotly debated, without sifting through the mounds of angry/defensive drivel that the topic generates, is probably counterproductive.
I'm reminded of The Daily Show's mockery of major news networks. Got some free time, space? Not enough content? Grab a controversial subject and let people know it will be discussed, in a Free-For-All, No-Holds-Barred Battle Royale! It's anywhere from 'Cheap' to 'Free', and it will generate a short-term spike in readership/viewership, simply because of the interest in the subject.
But the frustration and irritation that the actual discussions bring -- that disengages the audience. TiVo is now telling us that these kinds of high-controversy, low-resolution content blocks are less likely to be watched all the way through. It's too hard on our hearts. ;)
That being said -- ORM isn't going anywhere until database languages get general enough to let us provide the same kind of abstractions right in the database layer, and even then I'm not convinced that an ORM layer isn't really better design. So far, I've eaten up the ORM coverage on TSS that has some kind of CONTENT. But frankly, the Lhotka video interview had more solid ORM wisdom in his brief comments on the subject than most of these threads combined!
That being said -- my view on ORM is:
1. I don't consider any of the existing commercial solutions to be 'safe' yet, since they are developed by relatively small companies. See the Rocky Lhotka interview for more on this, but to my mind, even the 'biggest' players in the .NET world don't feel like a safe investment yet. Safety is difficult to measure, but for me, if the company making the product isn't a ten-ton-gorilla, or if I can't personally vouch for their fiduciary status, then I need the code. Even an assurance that "if we go broke, you get code" does not comfort me. If it's not a Microsoft or a Sun or an IBM or a Google making the program, I'm going to be very leery of investing potentially dozens to hundreds of man-hours working with it unless it has demonstrated enormous flexibility, unless I can provide my own implementations for practically everything, and even then -- I'd prefer to just have the code!
nHibernate is built on the industry-leading (Java) Hibernate and is an alpha version in name only. (As to Hibernate -- I am unaware of any ORM tool that has the wealth of expertise behind it that Hibernate has; I would assume that some of the Big Boys -- for instance, ObjectSpaces at MS, and the Apache project whose name escapes me -- but I don't know that) If you really, immediately need to use one-to-one or many-to-one proxies then there is reason to disregard nHibernate. That's going to be useful in the future in conjunction with some .NET AOP projects, but it's so far down the list of nHibernate benefits that I write it off out of hand. nHibernate is production-ready, and I'm personally using it in a rather ambitious project that would not have been finished within one multiple of our current schedule had I used almost any other solution. I'd even like to write it up for TSS.NET if I ever catch a breather, but I doubt that'll happen any time soon. However, I have wrappers written for both iBATIS and nHibernate and can, in fact, switch between persistence providers on the fly (see point #4). The domain-specific nHibernate manager adapts to major changes much easier than iBATIS, however.
2. If you want to look at the guts of a product that was commercial until recently, look at ORM.NET. It's on Sourceforge now, and you can donate to the project to show the devs that you appreciate them making the ultimate sacrifice of sharing their baby with the world.
3. Good Tool != Good Engine. Right now, I'm still managing my nHibernate mappings by hand, in xml. Since it's easy to set up very general mappings, and mappings that take base classes into account, and since nHibernate doesn't require you to get overly specific about property types in your mappings, the only times I've had to change them are when the object model changes or when I make massive underlying changes to my persistence strategy -- like using assigned GUID's instead of Identity columns. (That change a one-word change in the each persistent object's mapping, and could conceivably have required changing a single word in the whole application but I opted for manageability).
A motivated developer could probably provide some amazing GUI tools for the mapping process in Nhibernate, but it is difficult to do so without nudging people towards one particular mapping or persistence strategy, and Hibernate is big on flexibility.
4. Your Choice Of ORM Shouldn't Be A Big Deal. This is my biggest pet peeve, and it's the one that gets me in trouble with a certain breed of developer, but here goes: if you find yourself getting red in the face when someone talks about benefits that can be accrued from some other ORM tool, and feel an overwhelming urge to use FUD tactics or ad hominem attacks to piss in the communal Cheerios (as it were ;)) -- then that may not necessarily a reflection on the ORM solution you've chosen, but it is a reflection on the way in which you've architected your application.
If you've already got a working persistence layer for your application, then you have nothing to lose by investigating a new tool for it. After all, your current solution is working, right? You're abstracted away the details of your persistence layer using some kind of intuitive or standardized method (say, manager/provider), right? So if Solution X really is all that and a bag of chips, you should be able to use it without having to reengineer your application. You won't have to change business code (although a persistence manager would need domain knowledge), you certainly wouldn't be touching any UI code with a ten-foot-pole . . . right?
Good design leads to less zealotry, and more civil discussions.
|
|
Message #145946
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Taking this discussion farther
I know we're trying to grow TheServerSide.NET; I'm totally on board there. But the constant use of ORM as a topic simply because it's hotly debated, without sifting through the mounds of angry/defensive drivel that the topic generates, is probably counterproductive. Drivel, like beauty, is in the eye of the beholder. While you may not find the opinions expressed in this thread to be interesting, that doesn't mean they are not valid.
However, I do believe that we as a community should take this discussion a bit farther. In a previous thread, Mark Griffin suggested that what we really need is an objective benchmark to use as a comparison and then we could evaluate current ORM products against that measure. I fully agree and am willing to put our website where his mouth is. :-)
So, for those interested in participating (including vendors), I will accept recommendations for what you think the requirements for such a benchmark should be. We (TheServerSide.NET) will publish these recommendations and create a final set of requirements for benchmarking ORM tools. After these requirements have been published we will accept a standardized benchmark report from readers and vendors who wish to submit their own tests of these tools against the requirements. Together, as a community, we can build a list of tested ORM products (both commercial and open source) with real numbers to use for evaluation.
I have added a thread in our Discussion Forums for tracking the recommendations, you can find it here. I look forward to your suggestions.
|
|
Message #145993
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Taking this discussion farther
A benchmark is not what people want nor need. After all, everyone can cook up a benchmark which makes product A shine and product B bite the dust and it will be totally the opposite in another benchmark.
What people NEED is proper descriptions of which tool T will fit with work-method M and vision on data-access V.
I'm an O/R mapper vendor, and I can tell you: for most developers on .NET, they don't know what O/R mapping is OR / AND why it will be great. So discussing which O/R mapper tools are great is pretty moot if the audience doesn't even know why O/R mapping can be of a benefit.
The lack of knowledge about O/R mapping is not because .NET developers are stupid, they in average just think different. This is because most developers on .NET come from older MS platforms plus MS only preaches DataSets and SOA/Webservices, not O/R mapping.
Like Andres explained higher up in the thread: some tools are not O/R mappers (our application LLBLGen Pro isn't a pure O/R mapper also, it's a DataAccess solution which embeds O/R mapping technology, like DeKlarit uses it to some degree internally too) but can very well serve as a great solution to the DataAccess problem.
However when you're focussing just on O/R mapping tools, you're in a small niche market. After all, the developer first has to decide if a pure O/R mapper is the way to go and THEN has to decide which one is best. That's not working, we're seeing it at the moment in the market where pure O/R mappers are not gaining ground in large amounts, it stays a niche market where sooner or later nhibernate will dominate and one or two large vendors, I predict DTM and DataObjects.Net.
(we try to stay out of that niche, as the market for DataAccess products is much broader than that niche)
So if you want to have a discussion that really gives the average developer real value, I think it's better to discuss the DataAccess problem instead and the different ways of solving that problem and with every way of solving that problem a list of turn-key solutions/products. Then the developer is helped with: 1) the different ways of solving a problem he probably thought would have just 1 answer: vs.net and datasets and 2) a list of tools/applications to help him with every way discussed.
Just a thought :)
Frans Bouma http://www.llblgen.com
ps: could someone please remove that reset button from this form? It is of absolutely no use but can ruin a great reply if you by accident click the wrong button. Thanks!
|
|
Message #145999
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Taking this discussion farther
Frans, this is the 2nd mombo thread on this subject and we've yet to be informed on what an O/R Mapper is and does, and why we need them? Also you mention the "the DataAccess problem" as if there is a well-known problem? I think that's begging the O/R Mapping question a little. Anyway, I think a benchmark will indeed prove useful, and I don't think of just performance or speed when I say benchmark, these are the things I'm thinking of ...
In some cases it's speed, ease of generation, lines of code, elegance of code that the items below will highlight.
1) Loading data from tables/views 2) Invoking stored procedures 3) Dynamic query abilities (both in criteria and columns returned) 4) Woriking with hierarchical data (isn't all data like this) 5) Binding data to a grid and other .NET controls 6) Transaction processing 7) Batch processing (updates/inserts/deletes) 8) Concurrency Handling 9) Memory/Garbage Collection impact 10) Security Considerations 11) Performance 12) Cost 13) Maintainence (especially when data model changes) 14) Remotable? 15) WebService support (a little off topic maybe)
These are off the top of my head, I plan to design and publish a benchmark application on the other thread from which we can begin to form the proper questions ...
However, these are typically the tasks we need to think about, and we want to make sure that whatever we choose it handles them well. It may sound like we would need to write a large application to cover these tasks, but it won't turn out that way.
I understand you might be somewhat hesitant as it might turn out that the question to O/R Map or not is the wrong question. In fact, I think that if we follow this benchmarking course of action we will have begun the process of actually asking the right questions that lead to meaningful answers.
However, that being said, if you want to explain what a O/M Mapper can do that a DAL cannot we're all ears. The lines I think blur very easilly, that's why we need to see all these systems solve common problems, that's typically want we like to see before we purchase anything.
|
|
Message #146013
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Versant Open Access .NET
Ah 'Intermediate Language Generation', as in 'generate and compile proxy classes behind the scenes' ? Or are you manipulating IL at runtime? (because that's not recommended by MS). At least DataObjects.NET does the same thing. Neither one.
We use the proven standard approach (in use since 1997 for Java) in enhancing the bytecode directly after compilation.
So its no manipulation at runtime and its no 'generating and compile proxy classes behind the scenes'
I'm surprised that you did not know about this technique, because it's been around for a really long time now.
Ah, immature eh? And your mature alpha tool makes it suddenly 'mature' ? :) The mapping layer of our product is used by customers in production for about 3 years. Our 'enhancing the bytecode/intermediate language' approach is in production since 1997, for .NET is is available for more than one year (see FastObjects .NET).
So I would call the individual parts quite mature ;-)
The new thing is, that we now have combined one of the best ORMs (also see the Middleware's TORPEDO benchmark) with the best API approach.
You don't really want to criticise me, because we honestly call an "Alpha" an "Alpha" and not a "Beta", or even "Final Release", as other companies would, do you?.
But then again, perhaps I don't know what beautiful or cool means in the .NET world. If you have not seen an ORM that uses intermediate language generation to provide transparent persistence, then you have really missed something.
Best regards,
Christian Romberg Versant Europe
|
|
Message #146014
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
We have "gotten" to the meat of the matter
We need a standard benchmark and site where folks can go to get such information, any takers? The Middleware company, that is hosting this site, already has developed a benchmark for testing certain aspects of an ORM.
It's called the TORPEDO benchmark, for more infos see: http://middlewareresearch.com/torpedo/
Best regards,
Christian Romberg Versant Europe
|
|
Message #146019
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Versant Open Access .NET
Ah 'Intermediate Language Generation', as in 'generate and compile proxy classes behind the scenes' ? Or are you manipulating IL at runtime? (because that's not recommended by MS). At least DataObjects.NET does the same thing. Neither one.We use the proven standard approach (in use since 1997 for Java) in enhancing the bytecode directly after compilation.So its no manipulation at runtime and its no 'generating and compile proxy classes behind the scenes'I'm surprised that you did not know about this technique, because it's been around for a really long time now. I heard about it but that was some time ago, and because I'm not coming from the Java platform, it wasn't one of my ways to do it. So you basicly add a couple of booleans to the classes, inject set logic for the flags in the properties?
The new thing is, that we now have combined one of the best ORMs (also see the Middleware's TORPEDO benchmark)with the best API approach.You don't really want to criticise me, because we honestly call an "Alpha" an "Alpha" and not a "Beta", or even "Final Release", as other companies would, do you?. I critizise you because you tried to make every competitor look like a cheap piece of garbage because you declared they're immature (and other things) while you present something you called alpha quality. It's common American Marketing to throw dirt at your competition, but this is not a marketing thread.
I also see 2 times 'best' in your sentence. Best based on what criteria? The amount of value per dollar? (yes, that's silly, but you perhaps now get the idea of what I mean: this is not a thread for spreading marketing goo)
|
|
Message #146022
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Versant Open Access .NET
because you declared they're [the competitors products] immature I've said the following: "I see that the ORM market for .NET is quite immature if compared to the same market in the Java world."
If you take a look at the J2EE market with its several related specifications (JDO, EJB) and the vendors that participate (Sun, IBM, BEA, Oracle, not to mention the dozens of smaller companies and a couple of quite successful open source projects) and you compare this level to the same market in .NET - there is a difference, isn't?
So you basicly add a couple of booleans to the classes, inject set logic for the flags in the properties? Not quite. The approach is not property based. We replace all "stfld" and "ldfld" opcodes within persistent classes to calls to generated interceptor methods.
These methods are responsible for just-in-time loading of data, if not already available in memory. Futhermore they are reponsible for automatic change-tracking.
Furthermore besides the interceptors there are methods inserted to fill an object from the database or store it in the database. But these methods are only called from the framework.
From the users point of view there is no impact in how to design the classes. It is not necessary to call special methods to read or write an objects. Neither it is necessary to derive from something special, nor to implement some special interface, nor to use some factory for the user objects nor to use some special ORM framework classes within your classe.
The whole concept is known as 'transparent persistence'.
I critizise you because you tried to make every competitor look like a cheap piece of garbage Sorry, it was not meant this way. I apologize if you felt insulted by my posting.
Best regards,
Christian Romberg Versant Europe
|
|
Message #146032
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
.NET O/R
Hi all,
First a small correction to the list at the beginning of this thread - as Frans pointed out, a few of the tools on that list are out of business today, and my old company Pragmatier with the tool Data Tier Builder is one of them.
Instead I am now developing the free, open source O/R mapper NPersist, available from GotDotNet and with a site at http://www.npersist.com
Now that's out of the way, I'd like to comment on the post-compile, pre-runtime IL manipulation offered by Versant, and some of the statements made by Christian.
Christian,
About the way you've solved this, I can only say: Cool Stuff!
I have been looking at this approach for a long time now (knowing that this is a common practice for ORM in Java) but I haven't dared to take the step! :-)
We seem to follow a similar approach in large where property access interception is the base for things as lazy loading and dirty tracking. However, I offer a code generator (not free, 99$, currently in beta) for generating the source code for the objects with the appropriate code in the property accessors for messaging the framework about the property access and allowing interception. If you don't want to buy the code generator you can just add this code yourself to your property accessors.
But neither approach, of course, is quite as slick as yours!
Lately I have been looking at how to be able to offer POCO persistence (as you do) and mostly my efforts so far have gone in the direction of seeing how the features offered through the interception could be isolated and made optional (meaning you'd pretty much miss out on them opting for POCO).
However, with your approach, I could keep all the sweet functionality that interception offers while still going full POCO....dead cool!
So why haven't I tried this yet, seeing as I've known about it? Well, I've been /preparing/ for it, minimizing the amount of code that would have to be inserted by the IL manipulator by going for he intercaption-based approach. But I haven't had the time so far to experiment with this approach. Your success with it is of course a very inspiring proof of concept - well done!
Secondly, about your statements of immaturity,
I guess you have a fair point when comparing the overall O/R scenes on .NET and Java, but you ought to hesitate a moment and consider if saying something like that in this current context wouldn't be /very nearly/ saying that "my dear .NET ORM collegues are a bunch of lamers with immature products". I realize you didn't quite say that, but I just offer my honestly well-meaning advice that people reading .NET ORM threads are by now quite weary of the sh*t-slinging, so you may want to consider carefully if that's not something you want to take the extra effort to distance yourself and your company from...
Third, about the performance difference between code-generation and reflection,
I've developed both a completely code-generation based ORM (Data Tier Builder) as well as a reflection-based one (NPersist) and I've measured the differences in performance, which turn out to be negligeble.
Performance optimization in an ORM is /almost only/ about reducing the number of calls to the database (and to some extent the amount of data sent over the network to and from the database). Changing from plain string building to using StringBuilders? Won't make a difference. Loading 10 objects with one call to the db instead of 10? Enormous difference!
Concerning reflection in particular, both my and Paul Wilson's O/R Mapper use a so-called IObjectHelper interface, which if you implement it will take away the use of reflection. I've tested the performance difference when using IObjectHelper and going without it (using reflection) on otherwise exactly equal applications and the performance difference was in the range of 1-2% - I'd say withing the error margin but I'm not enough of a statistics man to be qualified to judge that. Anyway, the performance difference is very small.
Since apparently you've done very well under the Torpedo test, which (thoroughly wisely in my opinion) is exclusively about the calls you make to the database, I would consider this to speak volumes more in favor of your performance than not using reflection.
For example: You say you (as I do) work with the interception based approach, meaning you have a generic framework that handles the persistence. Have you considered generating the complete persistence IL code into the objects instead in order to make them able of persisting themselves without a framework?
I'll be the first to agree that this is not recommendable (from my three years of experience with doing just that in Pragmatier, although we generated source rather than IL code, but, you know, same-same but different, eh?)
However, this approach /does/ offer a slight difference in performance - arguably custom, optimized code right in the objects will be a bit faster than generic code in a separate framework, assuming the SQL they send is the same. I've measured differences of up to 5-10% when comparing this approach to the generic framework approach.
I'd say that in the end the horrible maintainance of this approach won't justify the 5-10% performance improvements, and I'm sure you'll agree.
Finally a word on the bad form of dropping numbers like this without backing them up...I /have/ done these tests, I tried to be careful, but I don't have any nice reports along with source of these tests to prove my stuff. And I don't have the time to write these reports or brush up the code for the test into something decent enough that I'd care to publish them.
So, please do not mistake my numbers for something "authorative" or anything (as if you would....) - I'm just telling you what I have seen, and I'd love to hear if others have any results to contradict or verify mine. But I have to say that I feel the results are also rather reasonable and I /have/ talked to others who have gotten similar results (though they've done "in-house" testing and haven't been interested in publishing any reports) so on the assumption that you're prepared to put /some/ stock in what I'm reporting, at least the ballpark that these numbers belong in are a rather interesting indication towards the following suggestion: You don't have to be too afraid of the performance penalty associated with using reflection!
/Mats Helander http://www.matshelander.com/Weblog http://www.npersist.com
|
|
Message #146035
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
.NET O/R
Hi Mats,
thanks for your comment!
I realize you didn't quite say that, but I just offer my honestly well-meaning advice that people reading .NET ORM threads ... Advice taken. I admit, that it is easy to misread my posting this way, but it was not my intention to insult other vendors.
I've developed both a completely code-generation based ORM (Data Tier Builder) as well as a reflection-based one (NPersist) and I've measured the differences in performance, which turn out to be negligeble. This depends on the Quality of Service your persistence frameworks offer. Reflection-based approaches suffer from the problem of change-tracking. Either: I.) change tracking is manual, but this is then no longer transparent II.) they make snapshots of old data, this consumes memory and the comparison later takes time III.) they rely on the RBMS backend ala UPDATE-SET-WHERE, but this puts the burden on the backend
IMO if you just compare storing an object then the difference is neglectable considering the time the C/S-call needs.
But comparing business transaction with 20-100 objects read, 2-3 objects updated, this should make a difference. (Unless option I. is used.)
Our experience is, that the number of C/S-calls is indeed extremely important, but that the client performance must not be neglected.
However, this approach /does/ offer a slight difference in performance - arguably custom, optimized code right in the objects will be a bit faster than generic code in a separate framework, assuming the SQL they send is the same. I've measured differences of up to 5-10% when comparing this approach to the generic framework approach. You will be surprised - this (or something like this) is planned for the near future :-)
We call it Hyperdrive and it is already available in "Versant Open Access JDO", but not in the alpha release of "Versant Open Access .NET".
The enhancement of the classes themself is actually not changed. The methods I've mentioned to fill or store an object (that are only called internally from the framework) are already hardcoded to the specific objects structure.
But with Hyperdrive the frameworks internal datastructures are not generic anymore, they are tailored for each class, thus optimizing the performance.
(The performance increase depends on the number of members for each class.)
Best regards,
Christian Romberg Versant Europe
|
|
Message #146038
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Versant Open Access .NET
because you declared they're [the competitors products] immature I've said the following:"I see that the ORM market for .NET is quite immature if compared to the same market in the Java world." If you take a look at the J2EE market with its several related specifications (JDO, EJB) and the vendors that participate (Sun, IBM, BEA, Oracle, not to mention the dozens of smaller companies and a couple of quite successful open source projects) and you compare this level to the same market in .NET - there is a difference, isn't? Sure, but why is the question to be compared with Java O/R mappers? Java has a complete different application execution framework: often application servers are used which offer enterprise services, while on .NET it's part of the OS (COM+) and part of .NET, and even then, it lacks some features like transparent cross-appdomain object awareness (i.e. creating a webfarm wide object cache that's transparent is hard on .NET). I'd say: apples and oranges. So please stick to .NET, also because .NET is not that old compared to Java, which is around since 1995.
So you basicly add a couple of booleans to the classes, inject set logic for the flags in the properties? Not quite. The approach is not property based. We replace all "stfld" and "ldfld" opcodes within persistent classes to calls to generated interceptor methods.These methods are responsible for just-in-time loading of data, if not already available in memory. Sounds like a great solution, I didn't think of that. I see one downside though: what about passing along an entity object to another layer on another machine where your framework isn't present? (f.e.: the gui webfarm reads an entity from a service using remoting). This requires the gui to have references to your framework as well, which can lead to problems because due to restrictions gui developers are not allowed to be able to persist an entity using any framework class (I don't make this up, often large teams work this way). So isn't this option tying the object to an assembly, namely yours?
Futhermore they are reponsible for automatic change-tracking. Furthermore besides the interceptors there are methods inserted to fill an object from the database or store it in the database. But these methods are only called from the framework.From the users point of view there is no impact in how to design the classes. It is not necessary to call special methods to read or write an objects. Neither it is necessary to derive from something special, nor to implement some special interface, nor to use some factory for the user objects nor to use some special ORM framework classes within your classe.The whole concept is known as 'transparent persistence'. Ok, I can see how it can be solved that the object is passed on but not referring on your framework in a given appDomain, like a gui-tier. I must say, it is a nice solution!
I critizise you because you tried to make every competitor look like a cheap piece of garbage Sorry, it was not meant this way. I apologize if you felt insulted by my posting. Thanks for clearing that up! As Mats also mentioned: these threads often get nasty for no particular reason, so let's just keep it clean :)
|
|
Message #146097
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
It's about the objects!
"...Even ADO.NET is not object oriented..."Please...!I am afraid you need to go back to basics and study what Object Oriented means. He plainly means that while ADO.NET provbides a (somewhat) object oriented model of the database and it's cogs and wheels it provides no object oriented model of the *data*.
|
|
Message #146105
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Versant Open Access .NET
Sure, but why is the question to be compared with Java O/R mappers? Java has a complete different application execution framework: often application servers are used which offer enterprise services, while on .NET it's part of the OS (COM+) and part of .NET, and even then, it lacks some features like transparent cross-appdomain object awareness (i.e. creating a webfarm wide object cache that's transparent is hard on .NET). I'd say: apples and oranges. So please stick to .NET, also because .NET is not that old compared to Java, which is around since 1995.
But we are trying to accomplish the same basic operations involving data as Java programmers within the same semantics, competing for the same market space and looking for the same efficiencies. To say that they can't be compared is kind of hard to figure.
Java does NOT have a "complete different application execution framework", Java DOES have a much more mature stack of tools and protocols for building widely scalable client-server applications (J2EE), and even though that stack is a bit of a mish-mash, it serves a very broad spectrum of application needs. .NET seems to still be identifying the services that will be required to scale to the largest sizes of applications and ORM is one of them. In many cases .NET relies on older technologies wrapped up in interceptors to provide application-critical services. COM+ transactions is a perfect example, it's not a terrible technology, but is there any real reason that there should not be a native transaction monitor for .NET, and that we should have to rely on COM wrappers?
The lack of an affordable inter-appdomain caching solution is currently one of my biggest nightmares. Sometimes it seems like MS *wanted* to lose the enterprise space to Java.
|
|
Message #146135
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
It's about the objects!
I would strongly suggest getting hold of a copy of:
Foundation for Future Database Systems - The Third Manifesto by Date and Darwin.
Here you will read about Objects and Relations - the realities, the misconceptions...
ADO.NET is not the be all and end all solutuion - obviously. And yet I feel it is dismissed all too quickly as a highly production solution. In business applications, this is a highly productive solution much of the time. Much of the time you do not need to convert to Customer objects with Order Objects and OrderItem objects and... It seems to be done out of some misguided concept that "object oriented programming requires it...it is not real object oriented programming without it..."
Relations provide a powerful programming model with a strong theoretical basis. We should take advantage rather than shun.
|
|
Message #146141
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
wrong problem
I see a lot of posts claiming there isn't a mis-match problem, or that some how OOP is the cause or not the cause. About the only thing consistent I see here is every body has different requirements and different needs.
My guess is those who claim "ORM" is not needed haven't had to integrate a dozen database models that are conflicting. Having worked on integrating 5 different data sources each with it's own personalization model, something like an ORM can make life easier. Of course you can avoid all of that and force everyone to use your model. If you can do that, then great. If not, how are you going to solve the problem of multiple database models that collide. One model may define user-to-address as one-to-one, while another may limit it to one-to-three.
In some cases it's easier to hardcode the mapping, but at some point things change and updating all the hardcoded mappings is going to be a pain. Whether the mapping is code generated, byte modification or external map file + runtime reflection isn't really an issue in my mind. The real issue is what problem do you want to live with?
If you go with code generation, that means I have to run a full regression test, even for trivial changes. If I use an external map file, it means a trivial change (changing a column from one name to another) can be done in the map file. If the object changed drastically, I have to rebuild and run a full regression test anyways, so there isn't much difference.
The benefit I see in byte code manipulation is I can take the classes I have and plug into the ORM with minimal work. With code generation, a developer might decide to be cute and call a method they're not suppose to. In the byte code approach, I can avoid those kinds of mistakes. By making those calls invisible/inaccessible to developers, it means it might be harder to debug the application. If an ORM uses byte manipulation, but doesn't provide a good way of debugging the application, than it's going to make it harder. In some cases, code generation may not be acceptable because the code is part of a toolkit.
These are all important considerations for a project and making the decisions should be based on facts. The whole argument of one approach vs another is bogus in my mind. Product A might be good for project B, it may not be appropriate for project C. I haven't found an easy way teaching others about how and when to use each approach. If anything, developers have to go through the painful process of doing it to figure how and why each approach breaks.
|
|
Message #146151
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
wrong problem
My guess is those who claim "ORM" is not needed haven't had to integrate a dozen database models that are conflicting. Having worked on integrating 5 ... Since I am the only one here having made the claim the ORM is not needed, I must refute your claim. No, not dozens, but certainly 4.
If you go with code generation, that means I have to run a full regression test, even for trivial changes... Pretty poor code generation and/or control of the process then.
The whole argument of one approach vs another is bogus in my mind. Product A might be good for project B, it may not be appropriate for project C... I would never argue that you never need ORM. Just much less than some would have you believe.
|
|
Message #146154
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
wrong problem
Peter,
"These are all important considerations for a project and making the decisions should be based on facts. The whole argument of one approach vs another is bogus in my mind. Product A might be good for project B, it may not be appropriate for project C. I haven't found an easy way teaching others about how and when to use each approach. If anything, developers have to go through the painful process of doing it to figure how and why each approach breaks. "
I just couldn't agree more! What a great post!
/Mats
|
|
Message #146161
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
wrong problem
In some cases it's easier to hardcode the mapping, but at some point things change and updating all the hardcoded mappings is going to be a pain. Whether the mapping is code generated, byte modification or external map file + runtime reflection isn't really an issue in my mind. The real issue is what problem do you want to live with? If you go with code generation, that means I have to run a full regression test, even for trivial changes. Why's that? Code generation which is offered by a solution you purchase or download, i.e.: a working solution, should offer the same quality as the other types of solutions. It just comes down to: whatever you use: is that proven technology? The method of what the solution uses is not that important, it matters if it's proven in real life for some time. Most commercial applications are at that level, at least the ones which are around for some time now.
If I use an external map file, it means a trivial change (changing a column from one name to another) can be done in the map file. If the object changed drastically, I have to rebuild and run a full regression test anyways, so there isn't much difference. The quality of a solution is always measured on the average situation. I think your described situation is not the average situation. Schema changes tend to be more dramatic, like changing a type of a column (for example from int to GUID), tables are broken up into more tables etc.
The benefit I see in byte code manipulation is I can take the classes I have and plug into the ORM with minimal work. With code generation, a developer might decide to be cute and call a method they're not suppose to. In the byte code approach, I can avoid those kinds of mistakes. No you can't. Byte-code manipulation is just as much code generation with the difference that it generates into an existing assembly (or better: grabs the compiled code, and copies it over with the new code to a new assembly). The only advantage it has is that the entity class doesn't have to be derived from a base class.
These are all important considerations for a project and making the decisions should be based on facts. The whole argument of one approach vs another is bogus in my mind. Product A might be good for project B, it may not be appropriate for project C. Exactly! :)
|
|
Message #146166
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Up-to-date list at SharpToolbox.com
To help you: * .NET Data Access Objects: good as abandoned. * .Net Persistence: Site is gone (i.e.: no more) * BBA Data Objects: Abandoned * N-orca: abandoned (no files left) * Norpheme: discontinued * Objectspaces: discontinued (merged into WinFS) * Objectz.net: discontinued * ORM.NET: discontinued (but stored on sourceforge, your link points to the old ORM.NET site still ;) ) * Potis: looks dead, site still there though (but hasn't been updated in over a year) * Pragmatier: discontinued * Raptier: they're still around if I'm not mistaken, but your site's link is not present anymore. * Sisyphus Persistence Framework: Hasn't been updated since Dec. 2002: abandoned
So the list can be a bit shorter :)
Btw, we updated LLBLGen Pro on September 24th. Sorry for not letting you know.
|
|
Message #146192
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
thanks for the feedback
Why's that? Code generation which is offered by a solution you purchase or download, i.e.: a working solution, should offer the same quality as the other types of solutions. It just comes down to: whatever you use: is that proven technology? The method of what the solution uses is not that important, it matters if it's proven in real life for some time. Most commercial applications are at that level, at least the ones which are around for some time now. I agree with that. Given a mature product, the quality of the code should be good. My fault for lack of specifics. What I was thinking of is this. Say I get data from the database using DataReader directly to objects. At first it's not a big deal, since it's a small application. As I add more features and components, I realize it's becoming a mess. At that point, I can go with any number of solutions. If I go with code generation, it's the closest to my existing code and therefore easier for the entire team to adjust. On the otherhand, if I decide to go with ORM it's going to be greater learning curve. If I apply each tool as recommended, the quality of the code should be no different. If someone realizes the customer table should have first_name, middle_name and last_name to make it easier to query, what is the effect on my application. Let's say the change is purely to improve searches and doesn't affect the corresponding object. If I want to roll out the change to the search component without including a bunch of new features that aren't ready, a map file approach might be more flexible. In the case of code generation, if i have recent changes which are not in production, I have to fork the code to make an incremental release. Obviously, the same problem can be solved from development process perspective. some people consider spot releases undesirable. I see this as a preference issue and not a technology issue.
The quality of a solution is always measured on the average situation. I think your described situation is not the average situation. Schema changes tend to be more dramatic, like changing a type of a column (for example from int to GUID), tables are broken up into more tables etc. yeah, you're absolutely right. It's not an average case at all. I have seen it more than once in the last 5 years on multiple projects.
No you can't. Byte-code manipulation is just as much code generation with the difference that it generates into an existing assembly (or better: grabs the compiled code, and copies it over with the new code to a new assembly). The only advantage it has is that the entity class doesn't have to be derived from a base class. the specific case I was thinking of is using something like Hibernate, which uses runtime reflection with plain objects. the other case i was thinking of is byte code manipulation at load time using AOP. For example, JBoss AOP will alter the classes and inject the necessary code at load time. I'm not too concerned with how much code is generated assuming performance is equal. What I am concerned about is this. If i use code generation and build my domain object assembly, the methods used by the framework are probably going to be visible. If someone new joins the project, they might accidentally call a method they're not suppose to. If the code is inserted at load time, than I don't have to worry about this specific problem. Obviously, this can be solved by having new developers go through intensive training.
In practice, the new guy is thrown in and given a small project to work on. The new guy wants to make an impression and gets things done quickly. In doing so, mistakes are bound to happen. It's just a fact of life. It would be great if all programmers are experienced with the products you use, but that's not the reality I see :) I definitely see value in each approach. I don't believe there's such a thing as a winner or a "best approach". it's the devil you live with.
|
|
Message #146224
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Up-to-date list at SharpToolbox.com
Thanks Frans. My next task in the todo list is adding a new attribute to the tools: "abandoned" or "discontinued" or "dead" or "missing" or whatever, so anyone can see whether a tool is still supported or not. I plan to filter out by default the tools with this attribute, but leaving the possibility to see them if required. This functionality is essential, and the o/rm category is definitely the first which requires some cleaning...
|
|
Message #146306
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Wilson OR Mapper
How can you include a bunch of out of business OR mappers and not include www.ormapper.net by Paul Wilson? He basically gives it away for $50 and it works....
|
|
Message #146312
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Design choices
Peter, "These are all important considerations for a project and making the decisions should be based on facts. The whole argument of one approach vs another is bogus in my mind. Product A might be good for project B, it may not be appropriate for project C. I haven't found an easy way teaching others about how and when to use each approach. If anything, developers have to go through the painful process of doing it to figure how and why each approach breaks. "I just couldn't agree more! What a great post!/Mats Absolutely. This is an architectural level discussion and architecture is all about appropriate design choices or compromises. Following Fowler, for example, the argument between datasets and domain objects is not a OOP/non-OOP issue, it's a choice between Table Module and Domain Model patterns.
|
|
Message #146315
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
They forgot mine....
IT seems the TSS editors forgot to add my ORM tool. Check it out people : DataBlockGheorghe Marius,DataBlock The demo download .zip is empty (22bytes).
|
|
Message #146331
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
The Best ORM is No ORM - Exactly!
ORM is, for the most part, solving the wrong problem. In fact the problem does not really exist. Exactly, KISS anybody?
|
|
Message #146349
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Simplicity is King
I can't recall who this quote came from, but I think it's quite relevant to the discussion of ORM tools:
"The best way to absorb change is to avoid repetition like the plague" -Anonymous Enlightened Programmer
The main problem I have perceived with data and relational mapping goo code, is that the same repetitive patterns of specifying parameters, and assigning values and checking for nulls and such seem to permeate DAL code over and again. Because of this, a certain amount of code complexity is created which makes changing an entity a bit viscous, often requiring changes to code in multiple layers, including business logic, DAL and SQL procedures.
I don't believe that data mapping code should be incorporated into a pure entity object. This creates a dependency in the object to a specific persistence medium, such as a database, which I think is a poor design.
XML mapping of entities and their attributes to columns in tables, and relating them to foreign keys seems like a great design to centrally configure and manage changes in an ORM-XRM solution. However, in the past this type of metadata mapping has been very poor performing, especially where heirarchical nesting is used. i.e., SQLXML and it's generation of horrible XML Explicit queries, among other limitations.
I don't believe that there is a Golden Hammer for every data access or object mapping problem. I often feel that many DataSet zealots cling to their methodology because of how flexible it is and how productively they can crank out a data(base) centric application. But in my experience, the resulting DataSet-centric code is often messy and difficult to use as an API, requiring a programmer to go and look under-the-hood to see how to use it. Somehow, it makes me uncomfortable having a reference to System.Data in the UI layer. I believe a good object-oriented API design is one in which the exposed public interface should be named well and speak to the problem-space that the object represents. Something DataSet/DataTable doesn't satisfy...(please no flames, just my opinion)
As far as the available tools, I like the idea of a supported commercial product (LLBLGEN, et.al.), and of the integrated GUI which provides point-and-click convenience. However, equally attractive is having access to the source code, which allows for framework debugging and learning opportunities (NHybernate, ORM.Net, etc)
I've seen a few of the tool vendors in this forum discussing some of the marketechnical advantages of their products, (Frans and Christian). LLBLGen Pro is indeed a mature and flexible product, which can certainly be a great productivity booster. And Open Access.Net seems to provide a great way of providing an invisible DAL and ORM to existing code with minimal change (very appealing), but the company's elusive nature (pricing secrecy, and hidden source-code) reduces their appeal. If only these two products would mate and have offspring ;) and release the resulting code into open source, and simply provide gui tools and support for revenue :P
I've been following NHybernate since their sourceforge project started up and I like it. Their only deficiency is their reluctance to deviate from the Java Hybernate ancestry. There are so many new things to take advantage of in .Net that can dramatically improve the performance and usability of their framework.
Ultimately, I want ORM tools and code that are easy to learn and implement, that don't get in the way of my code or object designs, and are easy to manage and change. The ORM solution or product that satisfies these requirements in the simplest way---will win.
|
|
Message #146392
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Simplicity is King
The main problem I have perceived with data and relational mapping goo code, is that the same repetitive patterns of specifying parameters, and assigning values and checking for nulls and such seem to permeate DAL code over and again. Because of this, a certain amount of code complexity is created which makes changing an entity a bit viscous, often requiring changes to code in multiple layers, including business logic, DAL and SQL procedures. ..but unavoidable. I see these wishes a lot, "I want it to be easy to swap O/R mapper frameworks!", "I want to change an entity without having to change anything in my code!". Things people wish for, but are not possible. Of course, in clean-room situations, there are cases which make these wishes come true, but in every-day life, it's impossible. (yes, also swapping O/R mapper frameworks, ever saw a standard for query languages for .NET frameworks?)
Also changing entities will cause changes in your own code as well and this is unavoidable: if a customer entity once had a property company and it is renamed to companyname, your code will break and you have to change your own code, probably in several classes.
I don't believe that data mapping code should be incorporated into a pure entity object. This creates a dependency in the object to a specific persistence medium, such as a database, which I think is a poor design. why is it poor design? Of course, it is not useful in some projects, but can be quite useful in other projects. So it depends on the context in which the persistable classes are used and how the user thinks of persistence functionality. Some think of it as behavior of the entity, which thus makes a .Save() method on an entity GOOD design, but others think that persistence logic is a 'service' and should be APPLIED to entities, in which it is BAD design to have .Save() on an entity because it should be supplied by a separate component. We offer both paradigms.
XML mapping of entities and their attributes to columns in tables, and relating them to foreign keys seems like a great design to centrally configure and manage changes in an ORM-XRM solution. If you think you can limit the changes you have to make to that XML file, you're mistaken :)
However, in the past this type of metadata mapping has been very poor performing, especially where heirarchical nesting is used. i.e., SQLXML and it's generation of horrible XML Explicit queries, among other limitations. What every Xml mapping file using O/R mapper does is read the file once and cache it. Of course, in asp.net applications this can be a bit problematic: where to store the cache?
Somehow, it makes me uncomfortable having a reference to System.Data in the UI layer. If it gets the job done and you can document the reason why the reference is there, you always have the causes for the code you wrote at hand and there is nothing to worry about.
People should be more pragmatic about writing software.
I believe a good object-oriented API design is one in which the exposed public interface should be named well and speak to the problem-space that the object represents. Something DataSet/DataTable doesn't satisfy...(please no flames, just my opinion) Well... duh! :). DataSets are about generic buckets of data. Of course they don't describe in a typed way what the data is all about. :)
As far as the available tools, I like the idea of a supported commercial product (LLBLGEN, et.al.), and of the integrated GUI which provides point-and-click convenience. However, equally attractive is having access to the source code, which allows for framework debugging and learning opportunities (NHybernate, ORM.Net, etc) We do supply almost all sourcecode to customers, even the code generators and database drivers.
I've seen a few of the tool vendors in this forum discussing some of the marketechnical advantages of their products, (Frans and Christian). LLBLGen Pro is indeed a mature and flexible product, which can certainly be a great productivity booster. And Open Access.Net seems to provide a great way of providing an invisible DAL and ORM to existing code with minimal change (very appealing), but the company's elusive nature (pricing secrecy, and hidden source-code) reduces their appeal. If only these two products would mate and have offspring ;) and release the resulting code into open source, and simply provide gui tools and support for revenue :P hehe :) Kidding aside, why open source? Making something open source doesn't make it get updated automatically. Most open source projects are developed the same as closed source projects (even by payed developers) with one difference: the source is available, however participating is as difficult as it is in closed source projects.
|
|
Message #146490
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Depends on the person
hehe :) Kidding aside, why open source? Making something open source doesn't make it get updated automatically. Most open source projects are developed the same as closed source projects (even by payed developers) with one difference: the source is available, however participating is as difficult as it is in closed source projects. I can't speak for other people, but I've written data access components enough that diving into the source doesn't phase me. In terms of productivity, my personal preference is to have access and fix the bug so I can move on with building the application.
Not everyone feels the same way. I might be jaded, but I expect all products to have bugs, so having access to the code makes my life easier. I've discovered bugs in just about every commercial product I've ever used. With open source I have the option of fixing it and creating a patched release for myself. Ultimately I am responsible for that patched version, but I am fine with that. It's not for everyone, but I find access to the code allows me to provide a higher level of quality. Plus, when I benchmark the application I can improve the performance and track down issues that only appear under specific conditions.
|
|
Message #146518
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
What do you do about Persistence in SOA?
True Paul. SOA is some thing beyond ORM.
Once you recieve message only then you are in side your domain and can work with whatever methodology you are using. And in case you are using Object Orientation and ORM then, as you said, you may use these messages for initiating, terminating, etc your business objects.
So, I believe ORM and SOA can not fit in the scene together i.e. if you are talking about SOA then you are beyond ORM and if you are talking about ORM then you are underneath SOA.
|
|
Message #146536
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Depends on the person
hehe :) Kidding aside, why open source? Making something open source doesn't make it get updated automatically. Most open source projects are developed the same as closed source projects (even by payed developers) with one difference: the source is available, however participating is as difficult as it is in closed source projects. I can't speak for other people, but I've written data access components enough that diving into the source doesn't phase me. You're kidding yourself, sorry. When I looked at the NHibernate sourcecode I didn't recognize a lot, while I have been working full time on an O/R mapper myself for the past 2 years. This means that if you use a product X and you step into the code, it's very likely you'll have a hard time figuring out what's going on. O/R mappers are very complex, especially if you're dealing with one with features beyond the basic "save fields in table" wrappers. A recursive save of a whole graph with 5 or more branches... and deep down something breaks: an FK is not synced and the save fails. How to find the cause of that issue? For a person who has no familiarity with the code at hand (and you as an outsider don't have any familiarity with the code) it's very hard to track that down, you have to do a lot of stepping, figuring out what is going on behind the scenes, track event handlers all over the place etc.
Luckily I have a design document with design decisions documented. Every open source project I've seen doesn't have that (except perhaps Linux), "the source is the documentation". Well... for some routines that's true, for others that's not true. For example the issue I mentioned above, one of the most complex aspects of an O/R mapper: saving a graph recursively in a proper way. What if you conclude "that must be the cause!" and you add a line of code. Do you know if that really fixes the issue and that it doesn't break something else ? You can't, not with proper insights in the code's structure, what's going on.
Sure, with a lot of time, the source code, it will be possible to get that insight. But at what price? I'm talking weeks of debugging here, not just an extra hour. Example: our core runtime is over 1.6MB of C# code, and as we heavily use the strategy pattern, polymorphism in the classes makes it harder for you to track down where the call will end up if you see a line in the code which calls a method on an interface typed variable. The sourcecode of NHibernate is even larger. To see what I mean: try to find all classes and all routines which do something with SQL generation so you can track the path from call to query text.
This is not to judge your debugging skills, but I think it's FAR FAR from realistic to assume you are able to dive in and fix bugs in a complex system as an O/R mapper if you just have the sourcecode.
In terms of productivity, my personal preference is to have access and fix the bug so I can move on with building the application.Not everyone feels the same way. I might be jaded, but I expect all products to have bugs, so having access to the code makes my life easier. While I also assume every product has bugs, I don't agree with you that having access to the code makes life easier. You can look at the code and you have the possibility to fix a bug that's not fixed by the vendor because they're lazy, out of business or don't agree with you it should be fixed. But that's all. Fixing it will not be easy, especially with O/R mappers.
Plus, when I benchmark the application I can improve the performance and track down issues that only appear under specific conditions. True, but you know what they say about performance: if performance is a priority, you have to sacrifice to get there, or in formula form:
Performance = 1/Convenience
|
|
Message #146541
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
totally dead on
I might be sick, but I spend a lot of time reading code. Diving into someone else's code definitely isn't easy and it takes a certain mindset.
You're absolutely right that having access to the code doesn't mean you can track down a bug in days, weeks or months. I've definitely come across cases where a bug appeared to be simple, but was rather complex once I dove in. the majority of the open source code out there is rather poorly documented. forget about things like class diagrams or succint explanation of the design decisions.
having said that, my warped brain enjoys reading code even if I only understand 30%. Having lots of luck helps when it comes to finding bugs in other people's code. Even though I am a committer on jakarta JMeter, honestly I only know a small portion of the code base, since jmeter is rather large. Having working knowledge of the domain helps, but as you already know first hand, it's no gaurantee.
like I said, it a personal preference. Most people don't have time and aren't willing to spend 15 hrs of their own time debugging someone else's code. especially if they paid a license for it and now their manager is screaming "get it done yesterday" :)
I look at it differently than other people. Reading code helps broaden my perspective and reminds me how little I actually know.
|
|
Message #146659
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Taking this discussion farther
I am quite excited about the possibilities implied by your post. Obviously, TheServerSide.NET is a great site with some brilliant people behind it (not to mention in the community) -- it seems to me as though you've really put your finger on a good (if initially controversial) method for harnessing the interest in ORM.
There will be an enormous amount of pissing and moaning if you go ahead with this -- particularly by those who feel that they have something to lose. However, it seems that the approach you're taking is rightly focused on review from the standpoint of those of us who hope be (and/or have been) getting work done using these tools. And frankly, that is just too valuable of a resource to be overlooked or shouted down, particularly with the added clout that the 'TSS Brand' brings to the articles.
|
|
Message #146679
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Wilson OR Mapper
Just want to add my support -- and to say that WilsonORM is a far better value than most of the products listed.
|
|
Message #146683
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Simplicity is King
The main problem I have perceived with data and relational mapping goo code, is that the same repetitive patterns of specifying parameters, and assigning values and checking for nulls and such seem to permeate DAL code over and again. Because of this, a certain amount of code complexity is created which makes changing an entity a bit viscous, often requiring changes to code in multiple layers, including business logic, DAL and SQL procedures. ..but unavoidable. I see these wishes a lot, "I want it to be easy to swap O/R mapper frameworks!", "I want to change an entity without having to change anything in my code!". Things people wish for, but are not possible. Of course, in clean-room situations, there are cases which make these wishes come true, but in every-day life, it's impossible. (yes, also swapping O/R mapper frameworks, ever saw a standard for query languages for .NET frameworks?)
I guess my framework's ability to switch from NHibernate to iBatis to (if I wanted to add it) your excellent product is imaginary . . . I wrote a provider and manager for iBatis about a month ago, to see how difficult it would be; as it happens, it's much more time-consuming to implement than nHibernate, but entirely doable. This is because good design -- and this IS a generalization -- can work just as effectively without exposing a query API, by using Business Service Objects.
An added benefit -- the interfaces that you end up creating and programming against match up well on a case-by-case basis with individual requirements.
|
|
Message #146686
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Depends on the person
Could not agree more. The level of frustration I have with closed-source programs is high enough when there are millions or billions of dollars behind development; anything smaller and I want to be able to second-guess design choices of the creators any time I feel that it will save me stress.
Managing stress is a largely unspoken factor in most dev's decision-making process. For me, it's absolutely critical; I've simply got too much going on in addition to work to be ok with the stress of important code that I can't just hop into and change.
That being said, any commercial product that opens up its source code to the public is to be greatly commended, and as their code isn't "closed" -- I don't really care about my changes getting integrated into their main tree, just that I be able to make changes -- then I have no problem with their product from that standpoint. As I've stated many times, I think that LLBGenPro is a great product; I reccomended it at my last job and to my knowledge they are still using it!
|
|
Message #146867
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Really ?
You could also say that MySQL is faster than Oracle! Would you ? And why ? Can you compare its speed as it does not do the same things. Do you say a Porsche is faster than a truck? But then try transport an elephant ... which one will be the fastest.
You simply can't say things like that because about twenty tools are listed and you can't have tested all the functionnalities of all those tools. You can say you like Wilson OR Mapper but that that is is "far better value". A little respect for the people who worked are on the other tools and make great thing you still ignore. You can't judge a tool just by the homepage. Try it in a real application and you will have big surprises, good or bad.
Sébastien
|
|
Message #146893
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
my take is marketing guys are to blame
an experienced programmer should know better, so I blame marketing for trying to create the idea that "one tool fits all users for all projects."
that has never been true and never will be true. unfortunately, often management make decisions without consulting the developers and choose inappropriate technologies. in the end, developers don't have the luxury of using the right tool for the job. it's a fact of life and probably will never change.
the best that we can do is cover common cases and critical edge cases. every tool will fall short at some point, so understanding the limitations of each tool is the best one can hope for.
|
|
Message #147660
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
$50
Just wanted to clear up my vague comment -- I believe WilsonORM to be a great value, largely because of the extremely competitive pricing. It is also a very solid and capable product, but as Mr. Wilson has mentioned several times, he's not trying to take over the high-end market. He's trying to provide a product that "Just Works", and works immediately and very simply, in a way that is immediately applicable (often without any architectural modifications) -- for $50.
I think that it's a clever move, as $50 is right in the sweet spot of what most newbie developers (and even more likely any experienced developer who finds his back to the wall and needs a quick solution) are going to be willing to spend to make a problem go away. I wouldn't be surprised if in many cases his customers are developers who are purchasing the product for use at their day job and won't bother with trying to get their company to reimburse them.
I shouldn't have said that it's "a better value than most of the commercial products on that list". On the other hand -- I've had some kind of experience with many of those products, either evaluation code or the full product, and I could have been a lot more painfully specific, detailing which products that cost more than WilsonORM I consider to be inferior to it and why.
I'll modify my remarks to "Unless you're already experienced with a major ORM solutions like EntityBroker or (personal preference:) nHibernate and can already use them effectively, I highly reccomend taking a look at WilsonORM. It costs $50, and at that price it will pay for itself if it helps you patch up a single problem a bit ahead of schedule. Frankly, I think it would be worth buying it for yourself, 'Just in case'."
There we go! ;)
Oh, and also -- will the changes re: TMC have any impact on TSS.NET's plans for 'goodies' like the ORM articles?
|
|
Message #149213
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Simplicity is King
Hi Kris,
"If only these two products would mate and have offspring ;) and release the resulting code into open source, and simply provide gui tools and support for revenue :P"
Though obviously not the offspring of LLBLGenb Pro and Open Access.NET, NPersist uses just the business model you describe:
NPersist, which is the O/R Mapping Framework, is open source and available for free under LGPL. ObjectMapper is the commercial (99$) GUI Editor that you can use for editing the xml mapping file, reverse engineer databases or generate databases from the objects, etc.
Glad you approve of the business model! ;-)
/Mats
|
|
Message #149972
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Which ORM Tool is the Best?
I have spent lot of time playing with different O/R mappers. I found that each have its own benefits and weaknesses. What tempts me is a tool which can provide flexibility and control over the customization and optimization. I have tried LlblGenPro, CodeSmith and Deklarit. Though, these are fine products but are very inflexible. I also find the code to access the objects is unnecessarily complex. TierDeveloper seems to overcome all major problems. It allows me to design the database and change it during the development of the business tier as well. It also allows me to create relationships between tables and objects in the data tier independent of the database including parent and child relationships. I particularly like the 100% VS.NET integration, Web Services generation, Parent/Child relationship, Generate stored procedure for SQL and XML/XSLT mapping in ASP.NET features of the enterprise edition. Over all TierDeveloper is the best Object Relational Mapping software that I have ever used.
|
|
Message #156593
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Its not what they say but why they say it...
Quarrat - be honest now - do you have a vested interest in writing "Over all TierDeveloper is the best Object Relational Mapping software that I have ever used"? A quick search on google links your name with the website that sells TierDeveloper.
|
|
Message #157332
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Which .NET ORM is best to work with stored procedures?
So if you start new product with new (empty) database and if you don't care how fast it is then you have almost limitless number of options to choose from...
But as it grows on, most forms start to look like a reports: you have to show too much of info from different tables with really custom logic. So "lazy" loading fails because it is terribly slow, "prefetch" and "aggregated views" fails because it is nightmare to describe all the dependecies and you still don't have all the power of SQL.
So you end up writing stored procedures. Lots of them.
Or you want to take "generated" SP and add to it some server specific functionality.
And my question to ORM gurus is:
- What .NET ORM is best to work with stored procedures?
|
|
Message #166911
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Friendly Advice
You can disregard this post if you know 100% that the future will never possibly force a Database Change (but if you use SQL Server you will want 2005 and right there you are looking at rewrites to C# or some other CLR language).
Also if you know this can I ask you for some future stock prices? We could make millions.
Instead look to:
1) Great Database Design 2) Proper Indexing 3) Showplan Analysis for Query Optimization 4) Use of Prepared Statements for commonly called Queries 5) Use Stored Procs as a last resort for the reasons above.
I have had at least 3 occurances where major systes I was building had the relational database changed (usually from SQL Server to Oracle). The first time I was burned (way bay years ago). After that I ALWAYS have used a database abstraction tier like the 'Enterprise Library' from Microsoft.
But hey, you may work for Oracle so there is no chance of a change from PL/SQL.. Who knows...
Damon Carr, Chief Technologist agilefactor
|
|
Message #166955
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Any ORM that supports stored procedures
If an ORM system maps directly to tables and views, and the application becomes compromised by any means, the attacker gains the ability to run arbitrary queries against those tables and views. They have database credentials (from compromising the application). They have table names, etc. (from compromising the application), and they can write any SQL statement that they please.
By running the database connection under a user dedicated to the application and using stored procedures, you can deny access to all the tables and views. The application still can access the tables and views, but only through the methods you have exposed from the database. This improves security, because a hacker cannot run arbitrary SQL (you still have to watch dynamic SQL, if any, in routines, but there are mechanisms for dealing with that safely as well).
There are many ORM's that can bind to stored procedures; if your ORM of choice can't, then you cannot properly secure your data, and if a hacker compromises your system, then they do have access to everything.
The idea here is containment. If Authorization, Authentication and Auditing fail to stop an attack, then your next line of protection is Containment or Isolation. Containment and Isolation limit the amount of damage that can occur once the system has been succesfully compromised.
There are several good ORM solutions, and several of them allow the use of stored procedures. If yours doesn't, then you cannot isolate an attack and protect your application from farther damage.
|
|
Message #179311
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Just sent this to Fran, maybe you can help too
Frans & crew,
I am struggling to convincing my (architect) colleagues that O/R mapping, and your product, is something we cannot ignore as a tool that could save us mountains of work (we're currently moving a largish company into the .Net arena so every project is new at the moment), and there is no codegen at all.
Here's a couple of my problems, which maybe you can help me with:
1. One of my colleages only agrees with something if it is written in msdn or somewhere formal on microsoft.com (and not a blog), but I've sent him over the ObjectSpaces docs so hopefully he'll come round soon. But, if you know of any other formal docs in recognised sites (eg. asp.net) that might help me, please send 'em over!
2. The sproc vs d-sql arguement is going to be another fun battle - we have that security model where webservers can only have access to sprocs, and I think this is written into some of our contracts with banks. I'm hoping to get around this with an arguement that internal/admin/CMS systems dont need this level of security, so at least then we only have to code up (or codegen) the CRUD. Again, if theres any formal docs out there which can back me up I'd appreciate them!
3. That same colleague has introduced us to custom entities & collections, which is a good thing. He suffers fromt NIHS though, and wants us to write our own codegen though, as at first glance the custom entities output by LLBLGen are 10 times the size of ours, and Wilsons ORM seems like it would be easy to write (again, at first glance). We can build a product without ORM, and the codegen would be simple. But if I do manage to convince them (and myself!) that ORM is going to save a lot of time & hassle, then how do (or maybe the question is should) I convince them that ORM apps like yours are complex enough to waste a massive time in development on (again another formal 3rd party doc would be great!), and that yours is the way to go over the rest (without them using it, they arent even going to try at the moment).
. I have one small question for my own understanding first though
Over on http://www.theserverside.net/news/thread.tss?thread_id=29071 you've written this piece of code. How is this going to save me time over the folloing much smalled & more readable SQL?
EmployeeCollection employees = new EmployeeCollection(); IRelationCollection relations = new RelationCollection(); relations.Add(EmployeeEntity.Relations.OrderEntityUsingEmployeeID); relations.Add(OrderEntity.Relations.CustomerEntityUsingCustomerID); IPredicateExpression filter = new PredicateExpression(); filter.Add(PredicateFactory.CompareValue( OrderFieldIndex.OrderDate, ComparisonOperator.Equal, _givenDate)); filter.Add(PredicateFactory.CompareValue( CustomerFieldIndex.Country, ComparisonOperator.Equal, "Austria")); employees.GetMulti(filter, relations);
SELECT * FROM Order INNER JOIN Employee ON Order.EmployeeID = Employee.EmployeeID INNER JOIN Customer ON Customer.CustomerID = Order.CustomerID
|
|
Message #179710
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Just sent this to Fran, maybe you can help too
Frans & crew, I am struggling to convincing my (architect) colleagues that O/R mapping, and your product, is something we cannot ignore as a tool that could save us mountains of work (we're currently moving a largish company into the .Net arena so every project is new at the moment), and there is no codegen at all. Here's a couple of my problems, which maybe you can help me with: Ok I'll try :)
1. One of my colleages only agrees with something if it is written in msdn or somewhere formal on microsoft.com (and not a blog), but I've sent him over the ObjectSpaces docs so hopefully he'll come round soon. But, if you know of any other formal docs in recognised sites (eg. asp.net) that might help me, please send 'em over! I pressume he pays your hourly fee as well? :). Seriously, if you have to write everything yourself, or only buy it from Microsoft, it's going to be hard and rough. Also recommended: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/CustEntCls.asp
2. The sproc vs d-sql arguement is going to be another fun battle - we have that security model where webservers can only have access to sprocs, and I think this is written into some of our contracts with banks. I'm hoping to get around this with an arguement that internal/admin/CMS systems dont need this level of security, so at least then we only have to code up (or codegen) the CRUD. Again, if theres any formal docs out there which can back me up I'd appreciate them! A while ago I gave up on that discussion, so you've to do that without me. :)
3. That same colleague has introduced us to custom entities & collections, which is a good thing. He suffers fromt NIHS though, and wants us to write our own codegen though, as at first glance the custom entities output by LLBLGen are 10 times the size of ours, and Wilsons ORM seems like it would be easy to write (again, at first glance). We can build a product without ORM, and the codegen would be simple. But if I do manage to convince them (and myself!) that ORM is going to save a lot of time & hassle, then how do (or maybe the question is should) I convince them that ORM apps like yours are complex enough to waste a massive time in development on (again another formal 3rd party doc would be great!), and that yours is the way to go over the rest (without them using it, they arent even going to try at the moment). . One thing every one who has ever tried writing an O/R mapper agrees upon: it's not easy. I can safely say: investing time in writing something that's available for free or for a small fee is silly. You'll waste a lot of time, which can be invested in your project, which then can be finished much sooner, so no deadlines which have to move, or features which have to be cut.
I have one small question for my own understanding first though Over on http://www.theserverside.net/news/thread.tss?thread_id=29071 you've written this piece of code. How is this going to save me time over the folloing much smalled & more readable SQL? EmployeeCollection employees = new EmployeeCollection(); IRelationCollection relations = new RelationCollection(); relations.Add(EmployeeEntity.Relations.OrderEntityUsingEmployeeID); relations.Add(OrderEntity.Relations.CustomerEntityUsingCustomerID); IPredicateExpression filter = new PredicateExpression(); filter.Add(PredicateFactory.CompareValue(OrderFieldIndex.OrderDate, ComparisonOperator.Equal, _givenDate)); filter.Add(PredicateFactory.CompareValue(CustomerFieldIndex.Country, ComparisonOperator.Equal, "Austria")); employees.GetMulti(filter, relations);
SELECT * FROM OrderINNER JOIN Employee ON Order.EmployeeID = Employee.EmployeeIDINNER JOIN Customer ON Customer.CustomerID = Order.CustomerID Well, the code I gave is all the code you have to write to get employee objects loaded with the data, based on a filter. With your query, you have just a query. You then have to write ADO.NET code to execute it, load the data into some container (for example a dataset) and it's still untyped data, no objects. 10 to 1 that code is more than the code I posted plus very repetitive and it doesn't give you any advantage: no typed objects, no query system which is typed and compile-time checked and above all: database agnostic. The code I posted is the same for oracle, firebird, sqlserver, access, mysql and db2. (and any future db we support).
|
|
Message #187923
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Kris - trying to get in touch with you
Kris, this is chris cheung from cyberu. I'm trying to get in touch with you. Can you email me your contact details to cheungchris@hotmail.com.
Thanks,
Chris.
|
|
Message #190285
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Ask TheServerSide: Which .NET ORM is best?
We are missing! Just want to be in the list. I think we can bring some new ideas in ORM word.
http//www.lastcomponent.com
|
|
Message #201285
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Would it be unfair to suggest that LINQ is a ways off?
Would it be unfair to suggest that LINQ is a ways off?
|
|
Message #204502
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Please Add NJDX OR-Mapper
NJDX is a simple, flexible, and lightweight ORM solution for seamlessly bridging the gap between the .NET object model and SQL relational model. NJDX is designed around KISS(Keep It Simple and Straightforward) principles, which emphasize a simple, practical, efficient, and user-friendly solution.
NJDX has been tightly integrated with Visual Studio .NET and can be used with any CLR-based language including C#, VB.NET, and J#. NJDXStudio, the Visual Studio Add-In, provides intuitive menus and wizards to simplify many OR-Mapping related activities like forward-engineering, reverse-engineering, and mapping verification with live data.
NJDX works with Microsoft SQL Server, Oracle, IBM DB2, Sybase, Microsoft Access, and any OleDB compliant data source. NJDX also integrates well with stored procedures.
NJDX is totally non-intrusive and avoids code generation. Please visit Software Tree's web site for more details and a free 30-day evaluation version of NJDX.
|
|
Message #204588
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Please add EntitySpaces
We are nearing the release on EntitySpaces now, a trial version is available. We currently support Microsoft SQL, Microsoft Access, and Oracle, other providers are being added. EntitySpaces is a new architecture for the .NET 2.0 Framework and is provider independent.
See http://www.entityspaces.net
|
|
Message #236881
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
You should try SubSonic
For those of you who haven't heard/tried it yet... SubSonic honestly beats the rest of them right now! It is in active development, has a good team, and really rocks the boat right now.
Try it to believe it! http://www.subsonicproject.com/
|
|
Message #238048
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
And another...
Seeing as we're listing ORM tools, here's an interesting one that comes in at a different angle. Habanero does the ORM stuff but has also stepped into user interface generation.
For instance, you have an address with five standard fields that need data entered. Rather than make your own interface and carry out the mapping, Habanero will create the user interface AND handle all the mapping to the database.
Now you could call that a breakdown of the separation of concerns, but that can save a lot of work...
http://www.chillisoft.co.za/habanero
|
|
Message #244656
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Badly Designed Cars Don't Work!
Imagine if you bought a car that had a non-detachable trailer. It would be handy to have on occasions, as you sometimes need to deliver and carry things here and there. But what about the days when you just want to go to the shops, or visit friends, or a quiet cruise in the countryside. No matter if you used it or not, if you wanted it or not, the trailer would always be there making life difficult most of the time.
This is how many Object Relational Mapping tools have been designed. Proper object oriented design rules state that as an O/RM is about data access and translation then only the parts dealing with these points should be included in your O/RM. Any additional features should be included in other software that can then be used if only desired. But most O/RM’s are one large program that includes all functionality within it, even if it has nothing to do with data access or translation. The additional functionality is carried along, like the trailer, even if it is not required.
Car designers do not make cars with non-detachable trailers because it locks the user into a situation where they have no flexibility. Object relational mapping tools should be no different, they should only include the functionality for their specific purpose so as to promote maximum flexibility. Additional functionality should be included in another layer of software.
GURA, the new breed of O/RM, has been designed solely for the purpose of data access and translation. There is no superfluous functionality; it only contains the functionality you require to make high quality, properly designed business applications.
GURA promotes full functionality with many other features that make it unique in the O/RM field. Some of these include:
No code generation Data Driven Object Creation Asynchronous Modes Supported Customisable Data Translation Fully Legacy System Friendly and much, much more
Read more about GURA here.
Steven Hughes
|
|
Message #262554
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
NJDX OR-Mapper - Where can I find this?
As per previous comments
1. "NJDX is a simple, flexible, and lightweight ORM solution for seamlessly bridging the gap between the .NET object model and SQL relational model".
2. NJDX has been tightly integrated with Visual Studio .NET and can be used with any CLR-based language including C#, VB.NET, and J#. NJDXStudio, the Visual Studio Add-In, provides intuitive menus and wizards to simplify many OR-Mapping related activities like forward-engineering, reverse-engineering, and mapping verification with live data.
3. NJDX works with Microsoft SQL Server, Oracle, IBM DB2, Sybase, Microsoft Access, and any OleDB compliant data source. NJDX also integrates well with stored procedures.
Question: Where can I find this s/w?
|
|
Message #279331
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
TierDeveloper becomes Free
Alachisoft has released TierDeveloper 6.1 as free software (previous version priced at $1495/developer). TierDeveloper is a leading Object-Relational Mapping (ORM) Code Generator for .NET. It lets you develop complex object oriented applications in no time without compromising on code quality.
Download TierDeveloper 6.1 Free Edition http://www.alachisoft.com/rp.php?dest=/download.html
TierDeveloper 6.1 Free Edition Information http://www.alachisoft.com
|
|
Message #304561
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Telerik OpenAccess ORM missing
One O/R Mapper is missing by name here, even it is mentioned in an earlier stage.
See http://www.telerik.com/orm for more information.
Short information:
Telerik OpenAccess ORM is an object-relational mapping tool and framework for Microsoft .NET integrated in Microsoft Visual Studio that enables developers to bridge the gap between object-oriented programming and relational databases by mapping classes to tables and fields to columns to solve object-relational impedance mismatch. OpenAccess ORM ships with a Visual Studio-integrated GUI for defining mappings and behavior, but a complete API enables configuration from code, too. Supported programming languages are C# and VB.NET. Supported Databases are Microsoft SQL Server, Oracle, MySQL, Firebird, Advantage Database Server and Sybase SQL Anywhere (others are announced in the published roadmap). A free, fully-functional Telerik OpenAccess ORM EXPRESS version supporting free databases (Microsoft SQL Server Express, MySQL, Firebird) is also available.
|
|
Message #308856
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
EntityORM
A new ORM is this one EntityORM: http://entityorm.uuuq.com
EntityORM is a fully typed Object Relational Mapping library for .NET 2.0.
The main strength of EntityORM is the ease of use. Most ORM libraries still require a lot of type casting and other plumbing to be written, EntityORM is designed to relieve the programmer from these tedious and error-prone tasks, making it very intuitive to use.
The main features are:
* DataBase independent * Ease for build new drivers that are independent from the EntityORM core framework (for now there is Sql Server, Sql CE, MySql, Oracle, PostgreSQL and Access drivers) * Automatic mark changed for changes entities (optional) * Automatic lazy loading (optional) * Automatic transactions (optional manual transaction for instance for two-phase commit) * Ease to map for an existing database with minimal effort * All relational types are supported (One-To-One, One-To-Many, Many-To-One, Many-To-Many) * Flexible event framework * Conditions para load filter data into entities * Capability to map to different table names or field names * Default values * Rules validation * Autonumber * Guid * Generic list to managed multiple entities hidden deleted entities * Typed entities are lazy loading with caching reducing significantly the needed for reflection * Entity views to faster load read-only data from one ore more tables into a single flat entity * Join conditions to join several tables in to a sigle entity view * Generic list to managed multiple entity views * Distinct, automatic group and aggregate functions (count, sum, largest, average, smallest) supported in entity views
|
|
Message #313139
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Ask TheServerSide: Which .NET ORM is best?
Currently I am comparing different object-relational mapper for ASP.Net.
As Microsoft released a preview of it's new orm called "Entity Framework v2" I thought that the decision might be clear. But even the new version of the Entity Framework will not support things you might take for granted as schema upgrade. You can update the schema but you will have to drop it first to let it create from ground. Not that comfortable to migrate data :) But I found another interesting orm called DataObjects.Net. As it is based on the model first approach you will not have to deal with xml mapping files. Another nice idea is an in-memory database (for unit test e.g.). All usable with LINQ of course. Syncronization is in developement and compared to Entity Framework v2 and NHibernate it is really fast. I just forgot the schema evolution api ;) As for now I will use this piece of software for my next project (and Gaia Ajax of course :).
If you are interested you might have a look at http://x-tensive.com/ as they are offering some discounts as they released a new version.
|
|
 |
| |
|
New content on TheServerSide.NETNew content on TheServerSide.NETNew content on TheServerSide.NET |
 |
 |
Language "mashups" will become more prominent, and developers will become polyglots, one programmer suggests.
SearchWinDevelopment.com offers an introduction to the language, performance, testing and data management improvements in VS 2008.
VBCode.com code snippets cover all aspects of application development, from data binding to security to the user interface.
Get up to date on XAML best practices with a variety of articles, tutorials and webcasts. [SearchWinDevelopment.com]
One team's experience with the VSTS DB edition suggests that it can improve workflow for dev teams. It also enhanced Agile efforts.
(June 24, Article)
Microsoft has begun to include DSL tools in the VSTS kit. A new book by Steve Cook and other VSTS team members helps set the stage.
(June 24, Article)
Cartoon: Be it ever so humble there is no place like your home after you get a Microsoft Home Server .
(June 18, Cartoon)
Microsoft's Thom Robbins says new technology to highlight in NET 3.5 includes AJAX, LINQ for both C# and VB, as well as tooling enhancements intended to ease the task of building WPF, WF and WCF apps.
(June 29, Podcast)
Venkat Subramaniam discusses AJAX bottlenecks, the tenets of Agile development and more. He spoke at the Ajax Experience.
(June 25, Tech Talk)
In the second of a two-part series, Michele Leroux Bustamente discusses design decisions related to the claims-based security model. Read the story and walk through the process for creating a set of claims-based utilities to encapsulate claims authorization at the service tier.
(May 24, Article)
Understanding why the Entity Framework exists and learning where it can fit into your projects can get you prepared for the eventual release early next year.
(May 10, Article)
Resource: This learning guide gives you quick access to useful links on Windows Communication Foundation security information.
(April 24, Article)
TSS.NET's Jack Vaughan spoke recently spoke with Microsoft's Brad Abrams to find out what he is seeing in the field and what the chefs in Redmond are cooking. Along the way he discusses patterns of AJAX frameworks.
(April 11, Article)
In a two-part series, Michele Leroux Bustamente explains how claims-based security is supported by WCF, and how you can implement a claims-based security model for your services.
(March 29, Article)
Windows Workflow Foundation is a new technology that many developers will need to get their heads around. In a brief excerpt adapted from Programming Windows Workflow Foundation: Practical WF Techniques and Examples using XAML and C#, K.Scott Allen considers aspects of workflow definition.
(March 22, Chapter Excerpt)
|
|