5 ms·
I learned Rails via Code School and Michael Hartl's excellent tutorial, and almost began building real apps with it before settling on Django + REST Framework +
by ralmidani 9y ago
I learned Rails via Code School and Michael Hartl's excellent tutorial, and almost began building real apps with it before settling on Django + REST Framework + Ember. 2 years later, I'm now learning React.
With ES6/ES7/ES8 becoming reality, I would welcome a move toward a JS/CoffeeScript framework that allows sharing of code between client and server.
But of all the options I have seen, nothing offers the simplicity of elegance of Django's Models and REST Framework's ModelSerializers.
It's really a shame there is no "perfect" isomorphic alternative to Django and Rails, because so much time is wasted doing the research and making the tweaks necessary to get the client and server to talk to each other properly. Not to mention having to learn the intricacies (and idiosyncrasies) of two languages and avoid mistaking one's idioms for the other's.
One of my long-term goals is to learn enough JS/CoffeeScript to be able to port parts of Django and REST Framework to Node.js and the client, along with enhancements that make pub/sub easy, and glue that enables effortless connection to a view library like React.
I realize there are existing solutions that almost achieve what I want, but none is ideal (Backbone doesn't support ES6 classes and doesn't do isomorphic out of the box, Meteor prefers MongoDB over an RDBMS, etc.)
- kumarvvr 9y agoWould you use Django+DRF over NodeJS??
- ralmidani 9y agoThat's what I'm using right now, although I wish I had a viable alternative that would enable me to write elegant CoffeeScript for both client and server.
- kumarvvr 9y agoI am just getting into Django, was just wondering whether NodeJS is a viable alternative to Django+DRF. Seems to me that Python is a much more mature language than JS.
- ralmidani 9y agoSails.js [0] is very nice, although I personally haven't been convinced to abandon Django+DRF in its favor yet. For one, its docs suggest ES6 classes aren't supported yet. Meteor+React [1] is also very interesting, but my understanding is Meteor doesn't support relational databases out of the box. [0] http://sailsjs.com/ http://sailsjs.com/ [1] https://www.meteor.com/tutorials/react/creating-an-app https://www.meteor.com/tutorials/react/creating-an-app
- Daishiman 9y agoAs of yet there is nothing remotely close in feature parity and developer niceties to DRF in Node. Given that there are no tightly integrated monolithical frameworks in JS land, I doubt there will be for a while.
- Daishiman 9y agoAs of yet there is nothing remotely close in feature parity and developer niceties to DRF in Node. Given that there are no tightly integrated monolithical frameworks in JS land, I doubt there will be for a while.
- rockostrich 9y agoTypeScript is probably your best bet. Static typing the same classes on the front and backend is going to make any REST API easier to develop. Another alternative is using something like protobuf [1] to define your data models. [1] https://github.com/google/protobuf https://github.com/google/protobuf
- ralmidani 9y agoI'm interested in TS, but I've been working with CoffeeScript (and Python) for 2 years and am very fond of significant whitespace (and not at all fond of semicolons and curly braces). There was a Typed CoffeeScript project, but nothing is active now. And CoffeeScript 2, with built-in support for JSX, is in beta.