Coder Social home page Coder Social logo

RocketPants 2.x Planning about rocket_pants HOT 16 OPEN

sutto avatar sutto commented on July 26, 2024
RocketPants 2.x Planning

from rocket_pants.

Comments (16)

jsmestad avatar jsmestad commented on July 26, 2024

@Sutto added 3 items to the planning document. Look forward to your feedback.

from rocket_pants.

Sutto avatar Sutto commented on July 26, 2024

@jsmestad sweet - will take a look this afternoon (also, Have twitter disabled this week so can't reply there).

from rocket_pants.

adamburmister avatar adamburmister commented on July 26, 2024

Could I also suggest referring to http://www.slideshare.net/stormpath/rest-jsonapis for some ideas.

Particularly surrounding hypermedia linking on instances, collections, and meta (pagination, etc).

Other ideas: _expand= param to expand response nodes.

Is there a timeline for v2? I've been researching options for my new Rails based API and think RocketPants is the final choice, so will be in a position to contribute.

from rocket_pants.

Sutto avatar Sutto commented on July 26, 2024

Awesome, thanks!

There isn't a timeline at the moment, but I'm aiming to work on it a bit over the christmas break.

WRT to expand, I'd considered it - the biggest issue with that is it's actually incredibly complex to implement efficiently,
so it's the sort of thing I'd prefer to do from a gem instead.

On 14/12/2012, at 3:33 AM, Adam Burmister [email protected] wrote:

Could I also suggest referring to http://www.slideshare.net/stormpath/rest-jsonapis for some ideas.

Particularly surrounding hypermedia linking on instances, collections, and meta (pagination, etc).

Other ideas: _expand= param to expand response nodes.

Is there a timeline for v2? I've been researching options for my new Rails based API and think RocketPants is the final choice, so will be in a position to contribute.


Reply to this email directly or view it on GitHub.

from rocket_pants.

mbhnyc avatar mbhnyc commented on July 26, 2024

One thing I ran into that I was surprised wasn't covered in rocketpants 1.0 was CORS (Cross-Origin Resource Sharing) support, for example, here's what i had to add to my application_controller to have an API that was accessible from a backbone.js app i'm working on:

before_filter :cor
  def cor
    headers["Access-Control-Allow-Origin"] = "*"
    headers["Access-Control-Allow-Methods"] = %w{GET POST PUT DELETE}.join(",")
    headers["Access-Control-Allow-Headers"] = %w{Origin Accept Content-Type X-Requested-With X-CSRF-Token Authorization}.join(",")
    head(:ok) if request.request_method == "OPTIONS"
  end

Obviously this is pretty permissive, and the Allow-Origin value should be configurable - but responding to an OPTIONS request seems like a good addition to me.

from rocket_pants.

jsmestad avatar jsmestad commented on July 26, 2024

@Sutto what are your thoughts on basing rocket_pants off of rails_api ActionController::API. I am spiking on this was we speak and wanted to get your feedback. One thing I would also like to see is a bit easier to configure what "ActiveModelSerializer" to call. I have begun versioning my serializers is why I bring it up.

from rocket_pants.

Sutto avatar Sutto commented on July 26, 2024

@jsmestad awesome, I like that idea - I haven't had any time at all to work on stuff for a while, so eager to see what you come up with!

from rocket_pants.

Sutto avatar Sutto commented on July 26, 2024

@jsmestad how'd your spike going? I've got some time set aside to work on RocketPants 2.0 right now and figured I'd check in before going ahead :)

from rocket_pants.

jsmestad avatar jsmestad commented on July 26, 2024

@Sutto I will put together a gist of where I made it to. The issue I ran into was trying to make RocketPants use the Responder stuff built into Rails instead of just replacing all of it with a single renderer (like it is now)


Here is a gist. Ignore the name as I just renamed it to Tradesman to avoid conflict with an existing RocketPants install.

https://gist.github.com/jsmestad/8029732

Keep in mind rolled into this is changing versioning to use Accept headers again (just like my rocket_shorts fork). The only thing NOT working is getting the serializer_hash to output in the format of:

{
  account: {
    id: 1,
    name: "Company LLC"
  }
}

when calling respond_with @account and

{
  accounts: [{
    id: 1,
    name: "Company LLC"
  }]
}

when calling respond_with @accounts. Right now it just outputs with no root value which isnt consistent with what AM::Serializers look for.

It should be easy I just ran out of time. I also do versioning via different ActiveModelSerializers rather than other methods. Let me know if you have any feedback or want me to package something up.

from rocket_pants.

chadwtaylor avatar chadwtaylor commented on July 26, 2024

Most popular and annoying question: "When?"

I am about to consider using Rocket Pants for existing API. I just read that 2.0 is in the works and wondered if I should wait out a bit until 2.0 comes out... or proceed with 1.0. Please advise.

from rocket_pants.

Sutto avatar Sutto commented on July 26, 2024

I'd honestly go with 1.0 for the moment - My goal is going to be to make the transition from 1.0 to 2.0 super easy (read: minimal changes, a built in compatibility layer) - but as you've seen this has dragged on a bit. I'm again spending some time working on it, but I've not been able to historically prioritise this pretty well - so I can't give a hard date on 2.0

from rocket_pants.

chadwtaylor avatar chadwtaylor commented on July 26, 2024

Thanks for the prompt response! I'll go ahead and work with 1.0, thanks.

from rocket_pants.

chadwtaylor avatar chadwtaylor commented on July 26, 2024

Eagerly waiting for the 2.0 release - how is that going?

from rocket_pants.

mbhnyc avatar mbhnyc commented on July 26, 2024

Order us around @Sutto, maybe we can help :)

from rocket_pants.

chadwtaylor avatar chadwtaylor commented on July 26, 2024

Eagerly waiting for the 2.0 release... has that been dropped?

from rocket_pants.

Sutto avatar Sutto commented on July 26, 2024

To be brutally honest - It's not been dropped, but I've definitely dropped the ball. All of my time has been very, very focused on my day job (http://gyde.tv) so I've had zero time to work on it. I still want to see 2.0 done (and have a good idea of what needs to be done) - but I've been distracted by work that I haven't been able to get it done - or organising stuff for people to do.

I still want to see 2.0 - I use rocket pants dailly, but we're on an older rails 3.2 app / nothing new has been needed that has given me the excuse to work on it... yet.

from rocket_pants.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.