News for hackers. Stuff that matters.
Re:Show HN: Vue-Model – Models with HTTP Actions for Vue.js by rlander on Thursday October 12, 2017 @06:06PM (#15461680)
Might be the first time I've seen the words "elegant", "simple" and "Django's ORM" in the same sentence. You could say it's easy to get started with, or do simple queries, but it's definitely not simple nor elegant.
Re:Show HN: Vue-Model – Models with HTTP Actions for Vue.js by davidscolgan on Thursday October 12, 2017 @06:30PM (#15461826)
Haha, to each their own. There is such a thing as the object-relational impedance mismatch for a reason. I'm currently learning Elixir and Phoenix and it's ORM Ecto has some really interesting ideas. Functional programming seems to map to relational databases better than object oriented does.
Re:Show HN: Vue-Model – Models with HTTP Actions for Vue.js by erik14th on Friday October 13, 2017 @01:43AM (#15463508)
Ecto is really interesting, but it's not an actual ORM[0], Elixir doesn't deal with objects, there's a free book on ecto that's pretty interesting:

[0]http://pages.plataformatec.com.br/ebook-whats-new-in-ecto-2-...

Re:Show HN: Vue-Model – Models with HTTP Actions for Vue.js by davidscolgan on Friday October 13, 2017 @08:26AM (#15464983)
Oh, I guess that's true in the sense that it doesn't map to objects but it accomplishes the same goal in a functional style. Maybe call it a Struct-Relational Mapper.
Re:Show HN: Vue-Model – Models with HTTP Actions for Vue.js by rlander on Friday October 13, 2017 @01:48PM (#15467795)
Yup, Ecto is awesome. For a project this recent, it does a lot of things right and gets out of your way when you need plain sql.

I've been using Django for a decade and there are simple queries that were impossible with the ORM until recently.

If you have to twist the ORM into spitting out the SQL you already know how to build, you know there's something wrong.