News for hackers. Stuff that matters.
Re:Build Your Own Web Framework in Go by vincentriemer on Friday November 14, 2014 @08:24AM (#8606958)
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.
Re:Build Your Own Web Framework in Go by pjmlp on Friday November 14, 2014 @08:36AM (#8607003)
My 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.

Re:Build Your Own Web Framework in Go by veeti on Friday November 14, 2014 @09:08AM (#8607141)
ORM works great for basic CRUD stuff like typical web applications. You don't have to use it in every part of your application.
Re:Build Your Own Web Framework in Go by pjmlp on Friday November 14, 2014 @09:41AM (#8607308)
Until you have the whole world banging into your site.
Re:Build Your Own Web Framework in Go by wriq on Friday November 14, 2014 @11:23AM (#8607881)
Not 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.
Re:Build Your Own Web Framework in Go by aikah on Friday November 14, 2014 @09:05AM (#8607129)
> 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.

Re:Build Your Own Web Framework in Go by pjmlp on Friday November 14, 2014 @09:41AM (#8607305)
I don't even know what an hydrator is!
Re:Build Your Own Web Framework in Go by randallsquared on Friday November 14, 2014 @10:59AM (#8607739)
A hydrator populates an object from other data.
Re:Build Your Own Web Framework in Go by pjmlp on Friday November 14, 2014 @01:13PM (#8608549)
30 years of experience and never heard that in DB programming.

Thanks for the tip.

Re:Build Your Own Web Framework in Go by nmerouze on Friday November 14, 2014 @09:23AM (#8607216)
I'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.