3 ms·
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 w
by adambratt 12y ago
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.
- tmwatson100 12y agoWe actually use DRF. Although I actually find it overcomplicated for what it does.
- adambratt 12y agoNot 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.
- eliben 12y agoGah, it's perfectly possible to use Django without DRF for simple REST services. If you need simple things, it's not a big deal.
- karuth 12y agoFlask is so minimal. Curious what were the disadvantages that weighed against chosing Flask.
- rattray 12y agoFlask 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?
- adambratt 12y agoDRF 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.
- mpdehaan2 12y agoLove DRF. Really easy, super flexible to modify (we did a lot of stuff with RBAC), the API browser is an amazing feature.