This is a pragmatic piece of Fowler on the rather dry topic of Object-relational mappings - in short, the attempt to marry an object-oriented code base with a relational data base.

Usually you’d get enough early success to commit deeply to the framework and only after a while did you realize you were in a quagmire - this is where I sympathize greatly with Ted Neward’s famous quote that object-relational mapping is the Vietnam of Computer Science

What Fowler refers to here, is Ted Neward’s article “The Vietnam Of Computer Science”

  • SorteKanin@feddit.dk
    link
    fedilink
    arrow-up
    10
    ·
    3 days ago

    Your last paragraph can be fixed even without an ORM though. Rust has libraries like diesel and sqlx that verify the sql in various ways.

      • SorteKanin@feddit.dk
        link
        fedilink
        arrow-up
        1
        ·
        2 days ago

        Diesel is an ORM

        This is kind of stretch to say though - it is not an ORM if you compare it to something like ActiveRecord. Diesel is just a DSL for writing SQL queries that are verified by the compiler.

        sqlx requires a modern macro system

        I wouldn’t say it requires using macros. You could definitely imagine verifying queries in the same way in languages without macros. But yea, this is one of the strengths of Rust I suppose.