Hehe this is an interesting topic for me as i work for a company which is quite polarised on platform evangelism (.NET vs Java). All the .NET guys love LINQ and the Java guys don't know what they're on about. I've had the pleasure of using it for a short term C# project and the one thing that stood out for me as dangerous (linq to SQL) was how easily you can forget that you're dealing with potentially expensive data queries in the background. I guess it boils down to the misuse of ORMs. If developers don't understand HOW the data is being queried, they cannot possibly account for performance deficits or even begin to understand where the performance problem is let alone how to fix it.
(probably off-topic, but related...)
I've experienced a few issues before where (using Hibernate) we have had performance bottlenecks (thousands of concurrent users) where the requirement would be querying a combination of simple fields on an entity, but because the developers used reverse engineered hibernate mappings on a normalised database, the ORM was doing numerous joins in the background and pulling back an enormous amount of data which was not needed and came at quite a price. We ended up writing custom queries which dramatically improved the performance of the system.
So i guess i'm nervous of a language abstraction for querying large data repositories in high-performance environments. As cool as it is, it can be troublesome. Although, more of an ORM concern than a LINQ concern. Anyone else have these types of problems before?
I agree it certainly is a great abstraction! I guess my comments were targeted more at the pitfalls of ORM tools rather than Linq. Although, I do believe that Linq2sql is an 'enabler' as far as this is concerned. I don't see many developers asking questions about the side-effects of using Linq2sql (or other ORMs ), which worries me. The integration with datastructures of other types is useful though - I think java could really do with language integration as far as XML querying goes - it's part of almost all of our everyday lives and at the core of enterprise integration, so it makes sense that we should bring it into the language.
Would love to hear more about your involvement in the Java space!
Hi Tim - ORMs certainly can be enablers for excessive round trips to the DB, but they can also provide opportunities for smart frameworks to do clever optimizations. The more information your compiler and your framework have, the better, and LINQ provides a lot of information. In general, I've always thought modern languages should have generic language level support for queries over in-memory data structures, XML, databases, etc. I've seen multiple attempts to get it right including Oracle's ill fated SQL extensions to Java, but Anders Hejlsberg and his team were the first to really nail it with LINQ.
re: involvement in the Java space - Our team page contains details about our Java involvement. I poured many hours of my life into contributing to the Java community but I'm rather disappointed with the current velocity of its evolution and the politics in general.
© 2023 Created by Daniel Leuck. Powered by