Live data from Hacker News

Show HN: Vue-Model – Models with HTTP Actions for Vue.js

github.com

21–30 of 46 posts

Re: Show HN: Vue-Model – Models with HTTP Actions for Vue.js

#22
Nice. Will give it a whirl in my next project.

Question for the author: is this "production-ready", or is it a toy project? If I start using this, do I have to worry about you abandoning the project six months down the line as you become interested in other things?

That in my mind is the biggest issue with open-source in general: people release stuff into the wild but don't follow through.

Re: Show HN: Vue-Model – Models with HTTP Actions for Vue.js

#23
post #10

Earlier quoted context omitted.

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.

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.

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

#24

Ah the legacy of Rails. Active Record anti-patterns for everything.

If stuff like handling validation errors properly() is part of the Rails legacy then I would happily embrace it.

() I'm not seing that a lot from the frontend people here.

Re: Show HN: Vue-Model – Models with HTTP Actions for Vue.js

#25

I'm usually a Django backend developer doing the whole server-rendered static html type sites, but I've attempted to venture into the world of single page apps a few times. The thing that always tripped me up was figuring out the frontend model layer. Nothing I've used, whether Redux or Vuex or Mobx or whatever else seemed as elegant and simple as say the Django ORM is on the backend. There were always missing pieces…

I strongly believe that you are used to thinking in the MVC way of thinking. Redux (and alternatives) are not the classical MVC structure and it takes some time to get used to it. In a backend environment, a controller might call a Model's function, take some data and return them back. In a frontend app, especially in the componentized world of React, things are quite different because you don't have controllers, your components are deep nested in your app's tree, they may query an API to get data or they may query the local cache. A simple model per component/multiple components approach won't work.

Once you get used to it, you will actually see that it's even more flexible and easy to write applications and can even benefit your backend code as well. E.g., I have stopped creating models on my backend code and instead, I am writing modules that may query a table, or two tables or talk to another API. I am using them whenever it makes sense to, not just the controllers.

My background is from creating both backend and frontend apps and I hope the above to holds true since I've been there but let me know if I am wrong here.

Re: Show HN: Vue-Model – Models with HTTP Actions for Vue.js

#26
@author: please take a look at http://feathersjs.com - your work is very interesting, but you should make it a layer on top of a modular backend service and feathers would be a good choice, but maybe people would like to use phoenix or other backends on the server.

Also you may be interested in http://derbyjs.com/ and do some research about operational transformations.

Ah, and please do not forget that in a real app you need to lock the records users are editing, but not indefinitely.

Thanks and happy coding!

Re: Show HN: Vue-Model – Models with HTTP Actions for Vue.js

#30

@author: please take a look at http://feathersjs.com - your work is very interesting, but you should make it a layer on top of a modular backend service and feathers would be a good choice, but maybe people would like to use phoenix or other backends on the server. Also you may be interested in http://derbyjs.com/ and do some research about operational transformations. Ah, and please do not forget that in a real app…

Another interesting read for anyone designing CRUD software in 2017: https://ipfs.io/blog/30-js-ipfs-crdts.md
Post reply on HN