Software Alternatives & Reviews

Is ORM still an anti-pattern?

JDBI Postgres.js
  1. Build full web applications using just SQL queries
    Pricing:
    • Open Source

    #Developer Tools #GUI Frameworks #Web Frameworks 19 social mentions

  2. 2
    See this.
    Pricing:
    • Open Source
    > I've been doing ORM on Java since Hibernate was new, and it has always sucked. Have you ever looked at something like myBatis? In particular, the XML mappers: https://mybatis.org/mybatis-3/dynamic-sql.html Looking back, I actually quite liked it - you had conditionals and ability to build queries dynamically (including snippets, doing loops etc.), while still writing mostly SQL with a bit of XML DSL around it, which didn't suck as much as one might imagine. The only problem was that there was still writing some boilerplate, which I wasn't the biggest fan of. Hibernate always felt like walking across a bridge that might collapse at any moment (one eager fetch away from killing the performance, or having some obscure issue related to the entity mappings), however I liked tooling that let you point towards your database and get a local set of entities mapped automatically, even though codegen also used to have some issues occasionally (e.g. Date types). That said, there's also projects like jOOQ which had a more code centric approach, although I recall it being slightly awkward to use in practice: https://www.jooq.org/ (and the autocomplete killed the performance in some IDEs because of all the possible method signatures) More recently, when working on a Java project, I opted for JDBI3, which felt reasonably close to what you're describing, at the expense of not being able to build dynamic queries as easily, as it was with myBatis: https://jdbi.org/ That said, with the multi-line string support we have in Java now, it was rather pleasant regardless: https://blog.kronis.dev/tutorials/2-4-pidgeot-a-system-for-millions-of-documents-the-application I don't think there's a silver bullet out there, everything from lightweight ORMs, to heavy ORMs like Hibernate, or even writing pure SQL has drawbacks. You just have to make the tradeoffs that will see you being successful in your particular project.

    #Backend Development #Databases #Web Frameworks 23 social mentions

  3. Postgres.js - The Fastest full featured PostgreSQL client for Node.js - porsager/postgres
    Demonstrate how easily and accidentally one can make an SQL injection with these: https://github.com/porsager/postgres.

    #Developer Tools #JavaScript #Web Frameworks 20 social mentions

Discuss: Is ORM still an anti-pattern?

Log in or Post with