@snoop0x7b
Enterprise java is not dying.
No, it is just relegated to legacy status. Withering slowly away.
Avoiding injection through LINQ or other ORM solutions is not new.
Ah, but your Java ORM solutions only protect against injections in the basic scenarios. Enter a little complicated query - or even just a projection - and you are back to string mongering. Not a specific SQL dialect; but vulnerable string synthesis if you are not careful. Note how that is *avoided* using LINQ.
JPA (Java Persistence API) is older than linq and provides specifications for Enterprise Java ORM solutions, and does the same thing...
It does *some* of the same things. Poorly.
What you've written proves that you've never used Java for SQL beyond simple JDBC.
I been there with Java+Hibernate, pal. Several big projects.
It's 2011 now, mature ORM solutions like Hibernate have been out for years and years now and are the norm.
Yes, it certainly is the norm, as it is quite good. Very good, indeed, when you consider the card they were delt by Java.
Hibernate can do every relationship that Linq can do, plus built in transparent caching.
Yeah - that is exactly it. It have *never* seen a Hibernate solution perform beyond mediocre. Hibernate absolutely needs caching to be tolerable. And with caching comes complexity. I've been there.
I'm sorry that you're not educated on Java. Please consider learning about EJB before you make assertions that will make you look dumb to anyone who actually works with EJB.
What's with the personal attacks? I have written my share of Java code and I have butted enough head with Hibernate. Enough with your insults!
From my personal experience, having worked with both Linq and Hibernate fairly extensively, it's easy to write concise queries for both.
Me too, and nothing beats LINQ with EF (or even NHibernate) at this time.
See JPQL, it's a wholely object-based querying language that JPA will translate to parameterized SQL.
You don't get it. JPQL is just *another* string based query language. No strong typing, no editor assistance and (worse) in many situations it is *still* easier to just concatenate the parameter value. And with that the injection vulnerabilities.
It's still possible to write injectable C# code if you don't use Linq or prepared statements.
Yes. And also if I use plain C or assembly language. But with LINQ, writing correct, non-vulnerable queries are always easier then writing the vulnerable version. That's the difference.
Similarly it's still possible to write injectable PHP or Java without prepared statements.
Yes
Linq is a nice framework, but face the truth (or continue looking ignorant), ORM is not a Microsoft invention,
No, Microsoft was late to the game with an ORM. LINQ is not just an ORM, though. Actually LINQ is not an ORM at all. Entity Framework which uses LINQ is an ORM.
Did you say you had a lot of experience with LINQ?
Linq does many things that Hibernate did before it
No. LINQ is language integrated query and has nothing to do with databases at all. Hibernate is all about databases. Did you say you had experience with LINQ?
(hence why NHibernate, the .Net version continues to be very popular).
No, NHibernate became popular because Microsoft was late to the game with an ORM (like LINQ2SQL or Entity Framework).
The truth of the matter is there is no one true technology that does this, many technologies can, and do do the same thing well.
The truth is that among the mainstream strongly typed languages, only C#, VB.NET has anything like expression trees necessary for allowing strongly typed queries. Some of the dynamic languages come close by cleverly using late binding, like e.g. Rubys ActiveRecord.
The mark of a good developer is language agnosticism and a willingness to learn about more than one platform.
Agree. You can start here:
http://msdn.microsoft.com/en-us/library/bb308959.aspx