Does anyone know why that was canned a long time ago? Seemed like it wasn't such a bad idea. My very naive guess is that ORM tools didn't need SQLJ and also plugged the gap. Anyway, still curious.
Why did SQLJ die?
This isn't an authoritative answer, but I can see these reasons:
- In the early 2000's, powerful IDEs (Eclipse, Netbeans, JBuilder) made their way into the Java ecosystem. SQLJ doesn't work well with IDEs
- In the mid 2000's, everyone thought SQL itself was dead as ORMs started to hide SQL away
- Today, there are more typesafe alternatives like jOOQ (or LINQ in .NET. Disclaimer: I work for the company behind jOOQ).
Besides, there are two major flaws to SQLJ:
- SQLJ simplified embedding SQL, but never brought any additional compile-time safety, such as type checks and syntax checks.
- SQLJ is good for static SQL, but dynamic SQL (with dynamic predicate or table source composition) cannot be achieved easily.
© 2022 - 2024 — McMap. All rights reserved.