4 ms·
Great work, Django team! I recently switched a project back to Django after some time playing with Rails. One of the biggest attractions of Rails is the asset
by ralmidani 12y ago
Great work, Django team!
I recently switched a project back to Django after some time playing with Rails.
One of the biggest attractions of Rails is the asset pipeline, but splitting the project and building the front-end with Ember-CLI takes away that advantage, leaving Django far ahead (IMO) with its cleaner ORM, less magical module importing, and Python's indented syntax.
- heyts 12y agoI'm genuinely curious, have you tried one of the asset-pipeline apps for django? I found django-pipeline actually not that bad, even though I have been recently leaning towards using front-end tools (gulp/browserify) anyway.
- ralmidani 12y agoI have not. For the front-end I'm using Ember, and Ember-CLI takes care of Emblem templates, Sass, and CoffeeScript, plus breaking code up into ES6 modules. Eventually they plan to require using it in order to get all of the features of Ember.
- misiti3780 12y agoI was using Jammit (ruby) for assets but recently switch the django-pipeline and it is working well. For front end apps, I use Grunt.js because I am to lazy to upgrade to something new
- sanderjd 12y agoI'd love to hear about your experiences with building APIs for single-page-apps between Rails and Django. Were you using rails-api or just straight-up Rails? Is there an equivalent API-focused "flavor" of Django, or if not, to what extent did you find it easy to choose not to use server-rendering functionality? I've used Django for more standard apps, and Rails for both, but I'm curious about the pros and cons of using Django for this sort of thing, because I have no experience with it.
- runjake 12y ago> Is there an equivalent API-focused "flavor" of Django? http://www.django-rest-framework.org/ http://www.django-rest-framework.org/
- chr15 12y agoDjango REST Framework is the the most popular way to build APIs with Django. Lot of neat features out of the box such as throttling and permissions make it easy to build API endpoints. http://www.django-rest-framework.org/ http://www.django-rest-framework.org/
- ralmidani 12y agoI'm still new to building APIs with Django. Last time I was immersed in Django, I was focused on server-side rendering. I forgot to mention, part of the reason I went to Rails is its built-in support for building JSON APIs (at the time there was no clear winner among the Django API frameworks). But now Django Rest Framework has matured quite well. By deriving everything from the model layer, it can help keep your API code nice and DRY.
- crdoconnor 12y agoHave you used django-pipeline? It's damned good. I wouldn't start a new project without it. Almost wish it was part of core.
- fallat 12y agoThis is why I stopped using Rails too. It was just too magical. I hate magic I can't understand.