drogus / bulk_api

MIT License
149 stars 7 forks source link

Rails agnosticism #4

Open aflatter opened 13 years ago

aflatter commented 13 years ago

I got another quick question that might be interesting for further development:

What are the reasons for using ActionController instead of a little Rack application? Bulk::ApiController does very little things at the moment, so it might be a good time to refactor that out. The controller seems only to be used to retrieve the params hash.

Authorization callbacks could be put into class methods to prevent creation of an abstract resource.

These are just some points that appeared interesting to me and I'd love to hear what your plans are. :-)

drogus commented 13 years ago

I am all for making this Rack based instead of only Rails based, but I didn't want to start from that as it is still a bit of experiment - we don't know how people will use it and if the API will stay in current form or will evolve into something different. Making it framework agnostic and ORM agnostic would be a bit more time consuming. That said, when things are a bit more settled up, it would be really cool to make it work on any framework with any ORM.

aflatter commented 13 years ago

I totally agree with you. ORM agnosticism is not something I currently worry about as you can easily override the necessary methods in your ApplicationResource. My plan is to dig a bit deeper in the upcoming week. I will probably just go for the Rack stuff then. Are you actively developing/using this in a project?