Is there a Polymer component that simplifies communications with MongoDB?

被刻印的时光 ゝ 提交于 2019-12-08 01:32:20

问题


Given the promise Polymer and web components have in simplifying development I am wondering if anyone has developed a wrapper component that simplifies talking to a MongoDB backend? Does anyone know of one?

Is this a sane idea? I guess it would need a custom server-side piece, but even so, I expected that lots of people would have written one, but I cannot find any; or is this a case where there are so many options that I should write my own node/express/mongo server?

Or is it that the AJAX component will do all the heavy lifting and I just need to use that?

Puzzled Andy


回答1:


I think that you should use Strongloop/Loopback (http://loopback.io/getting-started/) as backend and do ajax request thought Fetch (https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch). Unfortunally Fetch isn't fully supported in all browser but thanks to this polyfill (https://github.com/github/fetch) you can have a full supported fallback solution.




回答2:


I'm unaware of a MongoDB element, but perhaps you could use the Polymer firebase element as a reference.

https://github.com/polymer/firebase-element



来源:https://stackoverflow.com/questions/24688291/is-there-a-polymer-component-that-simplifies-communications-with-mongodb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!