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
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.
I'm unaware of a MongoDB element, but perhaps you could use the Polymer firebase element as a reference.
来源:https://stackoverflow.com/questions/24688291/is-there-a-polymer-component-that-simplifies-communications-with-mongodb