Follow

Fives stages of ORM usage

1. This will save me so much time!
2. Why are these work-arounds so complicated?!
3. Maybe if I just write a few custom-queries
4. This is hopeless! Why did I do this to myself?!
5. This is my life now. Too much work to replace it.

@mishari how did TDD change the way you talk to databases? Curious

@andrioid I was referring to your last point of not being bothered.. TDD makes changing large swaths of code much easier.

Anyway the way I do DB (and filesystem) functions these days is to make a proxy object then put the ORM code inside the proxy.

With TDD + refactoring this is how it naturally tends to form just because this pattern is easy to test.

@andrioid To 1) I may add: "Sophisticated demands certainly require manual queries, but my use case is simple. I must be the perfect target audience for this lib."

@andrioid
I tend to disagree with this.
If you use a proper data Mapper this should not be an issue.
If you go with active record ORMs, well... Good luck.

@jlhertel what is a good example of a proper data mapper?

@andrioid
For PHP there is Doctrine.
For Java you can look at Hibernate.
For other languages I don't know.

Sign in to participate in the conversation
Mastodon for Tech Folks

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!