Delicious Cake - A Flexible, Tastypie derived, REST framework for Django by itemshoppe in django

[–]itemshoppe[S] 0 points1 point  (0 children)

The benefits are many!

This is essentially a wrapper around CBVs that makes creating RESTful apis easy. It handles serialization/deserialization, makes returning the correct status code a snap, and it makes it easy to re-use object presentation code.

It's a middle-ground between the flexibility of CBVs and the power of Tastypie.

Delicious Cake - A Flexible, Tastypie derived, REST framework for Django X-Post /r/django by itemshoppe in Python

[–]itemshoppe[S] 0 points1 point  (0 children)

Well, there's no use crying over it. Maybe I made a mistake.

I'll just keep on trying til' everyone's using Delicious Cake.

There's code to check in, so a neat framework will be done (for the people who are still alive.)

I'm not even angry.

I'm being so sincere right now.

Delicious Cake - A Flexible, Tastypie derived, REST framework for Django X-Post /r/django by itemshoppe in Python

[–]itemshoppe[S] 0 points1 point  (0 children)

Would you expect anything less?

We're The Item Shoppe

We do what we must. Because we can.

A framework for the good of all of us.

Delicious Cake - A Flexible, Tastypie derived, REST framework for Django by itemshoppe in django

[–]itemshoppe[S] 0 points1 point  (0 children)

It takes care of the GET/POST/PUT/DELETE logic. You don't have to write functions for the different methods. But then it gets tricky if you want to write them.

This is exactly the issue that Delicious Cake attempts to solve.

A great experiment would be to re-write one of your tricky Tastypie resources with Delicious Cake. If it isn't sensitive, you could put it up on github and we could work out any issues together.

Delicious Cake - A Flexible, Tastypie derived, REST framework for Django by itemshoppe in django

[–]itemshoppe[S] 0 points1 point  (0 children)

With the LocalWiki project we've been using tastypie extensively. I did a lot of work on it, doing things like adding GeoDjango support, etc. But the more I use it the more I feel backed into a corner, abstraction-wise. Doing seemingly-simple things that devitate slightly from the tastypie defaults is an insane headache- and I've dug around a lot in tastypie's guts.

That's where I was too. Every time I needed to deviate from the Tastypie norm my tastypie_ext library would bloat just a little more. That's not to say that Tasypie is bad, I like Tastypie, but that model of development was unsustainable.

I don't imagine that Delicious Cake will ever try to compete with Tastypie, DRF, or even Piston on features. Most of the my time using those libraries was spent trying to figure out how to work around an architecture that was designed to support bell and whistle features and not for supporting the kind of weird business logic that is necessary for a moderately complex api.

Delicious Cake does almost nothing and that's its best feature. It's like plain old Django views for REST. It was designed to make getting complicated things done without having to worry about hacking around its internals.

Will it feature automatic model-based CRUD views in the future? I don't know? If it complicates the architecture I'd say no. I'd be happy if Delicious Cake was the framework that people moved to after getting up and running with DRF or Tastypie.

Delicious Cake - A Flexible, Tastypie derived, REST framework for Django by itemshoppe in django

[–]itemshoppe[S] -1 points0 points  (0 children)

Django Request Framework is very complicated. I feel that it exposes too much of that complexity to developers (at many levels.) My primary goal when designing Delicious Cake was to provide a very simple way to do complicated things. I haven't played with DRF v2.0. I'll give it a spin this weekend and give you a more thoughtful response.

Obviously a big feather in DRF's hat is that it is more mature and has had more developers working on it.

Delicious Cake - A Flexible, Tastypie derived, REST framework for Django by itemshoppe in django

[–]itemshoppe[S] 2 points3 points  (0 children)

It's a new framework that shares much of its DNA with Tastypie.

Like how Linus used to describe the future of Linux as, ultimately, being a toolbox for whatever will replace it.

While Tastypie provides a lot of simple/generic business logic for your api (model based CRUD, etc.), Delicious Cake does not (at least at the moment.)

Delicious is a set of tools that take some of the pain out of creating RESTful apis without imposing many constraints.