News for hackers. Stuff that matters.
Re:Why we ditched Django for Microservices by adambratt on Monday January 12, 2015 @09:14AM (#8873915)
Using Django Rest Framework is practically the EASIEST tool for building microservices I've ever used. It's incredible how awesome it is for building APIs. We were recently looking at building out some new services in Flask or Express. We compared the advantages of each to DRF and quickly concluded that it wasn't worth it. DRF has so much commonly used stuff done for you and it sets up one of the best standards for REST API's I've ever seen.
Re:Why we ditched Django for Microservices by mpdehaan2 on Monday January 12, 2015 @09:59AM (#8874157)
Love DRF. Really easy, super flexible to modify (we did a lot of stuff with RBAC), the API browser is an amazing feature.
Re:Why we ditched Django for Microservices by karuth on Monday January 12, 2015 @09:39AM (#8874051)
Flask is so minimal. Curious what were the disadvantages that weighed against chosing Flask.
Re:Why we ditched Django for Microservices by rattray on Monday January 12, 2015 @09:58AM (#8874153)
Flask is too minimal. Using DRF is like having code written for you. Because, you know, the code was written (and battle-tested) for you. Why start from a log every time when you can get a wheel for free?
Re:Why we ditched Django for Microservices by adambratt on Monday January 12, 2015 @11:00AM (#8874566)
DRF includes all the serialization and loose object structure for you to build off of.

We've been using DRF pretty seriously for over a year and have yet to find a feature that we want that isn't already implemented or easy to implement on top of it.

Re:Why we ditched Django for Microservices by tmwatson100 on Monday January 12, 2015 @09:26AM (#8873978)
We actually use DRF. Although I actually find it overcomplicated for what it does.
Re:Why we ditched Django for Microservices by adambratt on Monday January 12, 2015 @09:39AM (#8874052)
Not sure what you're trying to do. But we've found the best part of DRF is that it creates a great structure to build off of and gets everyone writing APIs the same way.

We haven't separated many of our services out but we actually have extended a lot on top of DRF. We created a way to do internal requests, so now instead of passing querysets to HTML views we actually do an internal API call. In the future, that code can be moved into it's own service.

Abstracting things out like this allow us to plan for microservices in the future while not having to deal with tons of different codebases and deploy strategies right now.

In the past year as we've scaled from 3 to 20 developers, I would say that DRF is the single-most crucial element that helped us scale the team without any massive issues.

Re:Why we ditched Django for Microservices by eliben on Monday January 12, 2015 @09:34AM (#8874027)
Gah, it's perfectly possible to use Django without DRF for simple REST services. If you need simple things, it's not a big deal.