4 ms·
And as expected there's no mention of interacting with a database. The lack of a decent orm is the only thing keeping me from using Go for some side projects.
by vincentriemer 12y ago
And as expected there's no mention of interacting with a database. The lack of a decent orm is the only thing keeping me from using Go for some side projects.
- pjmlp 12y agoMy work is mostly spent in JVM and .NET world and I am not a big fan of Go's design, so I am already biased. However I am the first voice against ORMs in any project I work on. If you care about performance, nothing beats tuned prepared stated going through the wire and stored procedures for heavy duty work. In a few projects we improved batch processing times by a few hours just by throwing the ORM into the garbage can.
- aikah 12y ago> If you care about performance, nothing beats tuned prepared stated going through the wire and stored procedures for heavy duty work. for "heavy duty work",sure.Now write your own hydrators,again,again and again,and let's see how maintainable your code is. Now the fact is ,it's impossible to write an ORM in Go,without throwing all type safety,just like Java pre-generics,you'd cast and down-cast to Ojbect.
- pjmlp 12y agoI don't even know what an hydrator is!
- randallsquared 12y agoA hydrator populates an object from other data.
- pjmlp 12y ago30 years of experience and never heard that in DB programming. Thanks for the tip.
- veeti 12y agoORM works great for basic CRUD stuff like typical web applications. You don't have to use it in every part of your application.
- pjmlp 12y agoUntil you have the whole world banging into your site.
- wriq 12y agoNot a problem that most people will have. If for some reason you do then hopefully you'll be able to monetize that popularity and hire someone who's actually really good it. ORM's are not optimal but they do let you make something quickly if you're not well versed in writing optimized queries, stored procedures, etc. For people like me dropping ORM's seem like a premature optimization.
- nmerouze 12y agoI'm the author of the post. I will be addressing this topic soon, but it's a very vast subject, it takes time to write good articles about database interactions and best practices.