5 ms·
Show HN: Todos: Backbone.js example + Google App Engine (Python)
- deleted 15y ago[deleted]
- cosmorocket 15y agoThanks for the demo and source. I am trying out Backbone and GAE too. What I wonder about and asked on StackOverflow but didn't get a clear answer is how to join together Backbone on the client side and ProtoRPC on the server side. Do you have any ideas? Thanks.
- joetyson 15y agoThere isn't really a mapping between backbones models and protorpc. Backbone.js assumes the model layer is RESTful where protorpc assumes you will make method calls, each via a POST call. I'm interested in what a model layer would look like using protorpc. One idea is to take a similar path of abstraction as the underlying appengine datastore api does: use protocol buffers to express an "entity". So you might have: { entity_type: 'Book', entity_fields: [ { field_type: int, field_name: 'title', required: true } ] } This would be a proto definition called, "Entity". From here you could build procedure calls that send entities for doing common routines, such as updates, or deletes. If you can make a structure like this work, you can build an api with javascript which hides the protobufs from you all together.. When you call Model.get('Book').create({title: 'My book'}), it constructs the Entity protobuf and calls the remote call for creating a new entity. Just an idea! Also - protorpc is in fresh development, so it's a good idea to join the discussion group and make suggestions: https://groups.google.com/forum/#!forum/google-protorpc-discuss https://groups.google.com/forum/#!forum/google-protorpc-disc...
- preek 15y agoThis is actually great work! What licence will you apply to the source code?
- ccarpenterg 15y agoThanks. Well I'm not sure. Anyway the Backbone.js app and design (html/css/img) was contributed by Jérôme Gravel-Niquet (http://jgn.me/ http://jgn.me/) to be included as an example into the Backbone.js repository. All the credits for him. I just commented one line and added other one to the Backbone.js app. And I've developed the whole GAE application.
- preek 15y agoIf you put it on Github, you probably should figure it out. I'm not sure what happens if you don't put any explicit licence in there, but I think that it is just public domain right now. Especially if you say that you don't have any licence in mind. Just sayin', if you don't mind, public domain is as good as it gets if you want to share your code.
- piotrSikora 15y agoPublic domain? Based on what exactly? Unless there is license granting you some rights, you don't have any rights to that code (you cannot legally download, use, modify, copy or redistribute it).
- preek 15y agoWhere does it say that exactly? It's a public repository and the author is explicitly linking to it while saying that he has no plans of enforcing any licence.
- piotrSikora 15y agoIn the "Copyright Act". Please don't ask me for specific quote, because I don't know US law, but from what I've read on the topic (http://www.ucop.edu/ott/faculty/crothers.html http://www.ucop.edu/ott/faculty/crothers.html, http://www.wisconsin.edu/gc-off/deskbook/copyrgt.htm http://www.wisconsin.edu/gc-off/deskbook/copyrgt.htm), it's pretty much the same as in the rest of the world, that is: Copyright is automatically granted to the creator of the work (or his employer, in case of "work for hire") and anyone who wants to legally use it needs permission (license) from the copyright holder.
- rgbrgb 15y agoWeird, I just did this exact same thing yesterday for another GAE/Backbone.js app! In my case I was using Flask though.
- eddieplan9 15y agoI did a similar simple Todos application using Backbone.js + CouchDB: https://github.com/edc/backbone-sample https://github.com/edc/backbone-sample It's about 80 lines of CoffeeScript and 0 lines of server side code. CouchDB's RESTful API makes it a really natural choice for storage backend for Backbone-powered applications.