Live data from Hacker News

What ORMs have taught me: just learn SQL (2014)

wozniak.ca

301–305 of 305 posts

Re: What ORMs have taught me: just learn SQL (2014)

#301

Earlier quoted context omitted.

"Custom" framework.. idiosyncratic code. Code that is probably not properly documented, not properly vetted, or maintained as technology evolves. It is not to say it can't be done (e.g. fb, google, ms), but the cost of doing so greatly outweighs the benefits. For example, security concerns of your "custom" framework and onboarding of new engineering into your team. And are you really in the business fo "custom" frame…

> "Custom" framework.. idiosyncratic code. Code that is probably not properly documented, not properly vetted, or maintained as technology evolves. Well, Flask is 95% just two persons [1] and 5% among 10 others. And the one responsible for creating it and writing 60% of it doesn't even have it as his first priority (has multiple other libs, codes Go, etc). A lot of widely used Javascript libs are not even that lucky.…

But that doesn't really matter, because those frameworks have mindshare. If I have a specific issue that I don't know how to solve in Angular or Flask or whatever, I can search online, and chances are good that someone has run into the exact same issue and solved it. If I'm using someone else's custom-built framework, I have to either consult the original author, which may not be practical, or figure it out myself by digging through the code. For anything that needs to be maintained in the long run, I'd take something written using a popular framework, with all its flaws, over something written from scratch any day.

Re: What ORMs have taught me: just learn SQL (2014)

#302

Sigh. Whenever I have to hurt myself at work on such issues, I find myself thinking of the web that could have been, if only... Let me backtrack a bit. There's a much better way to do things than the way we do it right now. A way that completely obviates the need for ORMs, or indeed any way to deal with the interface between application and database. You see, there would be no object-relational Impedance Mismatch (an…

This sounds really interesting, but I'm having a lot of trouble trying to follow how all that code fits together - from what code I could find. I also strongly dislike the object/function based approach to constructing HTML (which - funnily enough, is just like using an ORM to construct SQL which I like heh). Really, I don't see enough offered to counteract what little pain I feel using an ORM. The LP actually looks…

>> Really, I don't see enough offered to counteract what little pain I feel using an ORM.

In that case you'd probably find no benefit in giving up the use of one, regardless of what replaced it.

Re: What ORMs have taught me: just learn SQL (2014)

#303
post #171

Earlier quoted context omitted.

> ORMs are a tool, that's it. The relational operations of SQL and the object-oriented (or functional) logic of your application code are usually very different and it's nice to have a mapper that lets you interact with your app's language while it takes cares of automatically mapping it to SQL. Functional and relational models work really well together. At Standard Chartered we even went so far as to add relations a…

Could you provide some examples?

Sorry, lacking the time for that. But basically all the advantages of relational over hierarchical databases apply for relations vs dicts as datastructures.

Re: What ORMs have taught me: just learn SQL (2014)

#304

Ten years ago, there was a blog post every other week bemoaning ORM's. Ten years ago, those posts often had merit. In 2016, this sentiment is outdated. A few points: 1. If you think that using an ORM means you don't have to learn SQL, then you're going to have a bad time. This is where most of the bad press originates... from people who never really learned SQL or their chosen ORM. An ORM provides type checking at yo…

> 2. If you're not using an ORM, then you ultimately end up writing one.

Why? That presumes that you are using objects, doesn't it?

Re: What ORMs have taught me: just learn SQL (2014)

#305
post #205

Earlier quoted context omitted.

More like relational databases are outdated. There was one truly committed effort to bring the database model into the programming language - EJB - and there's a reason it's now a curse word. The successful systems of the past ten years have been those that moved away from the relational model, using simple datastores controlled by application code.

Only if you believe type theory and typed programming languages are outdated. I'm not impressed with NoSQL; they have no answer to the limitations of relational theory beyond simply abandoning formalism entirely.

I believe type theory and typed programming languages are very valuable. But if you keep your logic in code and your store as a dumb store then the store doesn't need to know about them.
Post reply on HN