Hacker Newsnew | past | comments | ask | show | jobs | submit | steveklabnik2's commentslogin

Awesome. Let me know how it goes, please. :)

> The Hypermedia stuff is most exciting to me,

Me too. There's nothing concrete here yet, but there's lots of space to explore and good things to build. I really want us to be a leader in this space.


I'm very excited about this as well. Any hints about what's on the roadmap?

Would love to see easy versioning with custom mime types and link headers for pagination and associated resources. Maybe that doesn't belong in core... but it would still be pretty cool.


My testing shows that versionist works just fine with rails-api apps to provide versioning capabilities. If you run into any problems, please file an issue.

https://github.com/bploetz/versionist


thanks. i'll give it a try... it wasn't on my radar. :)


Nothing specific so far. AMS should know how to put out some kind of hypermedia-enabled type. We want to build a bunch of apps and then pull an implementation out, not imagine what we think would be good and then try to build apps with it.


The organization includes ActiveModel::Serializers, which is really important for giving you normalized JavaScript output. Rabl is slow and manual, which is the opposite of the Rails philosophy. Convention over Configuration wins every time.


ActiveModel::Serializers is exactly what I was looking for, thanks!


The asset pipline isn't removed, so you don't need to do anything special.

That said, I don't think that it's ideal for heavy JS apps. Lots of possible work that could be done in this area.


> That said, I don't think that it's ideal for heavy JS apps.

Rails-api churns out JSON, JS consumes it. I can think of performance being an issue.

What are the other issues?


I've responded to your sibling.


Why don't you? Can you please elaborate on that? Thank you!


Basically, as it stands, you have to put your {Ember,Backbone,..} app in `app/assets/javascripts/app/models`, for example, which is kinda crazy. I'd like to see JavaScript become an actual first-class citizen.

Also, the pipeline has been re-written for Rails 4, but historically it's been kinda slow and buggy.

For an example of what I'm thinking about, rake-pipeline-web is interesting.


The problem with benchmarks is that they don't really correspond to reality. Your app is not a simple test app. Your site will not be running on my MacBook Air. Your users won't have the usage patterns my script does.


IMO you shouldn't do the benchmark. Let this project be a starting point for a Rails api project and/or a how to for people who want to customize Rails for their needs.

"We are building an API. Rails has extra components which aren't used but might cause overhead. Here is how to remove it."

I think that's a valid enough use-case.


Of course. It's not about showing some absolute numbers that users can expect. It's just about showing the potential overhead of a full Rails app vs Rails::API. I'd think this would be a reason why people would chose Rails::API over just Rails.

The README itself says Rails::API is faster, so not sure why a simple benchmark to back that up isn't a good idea.

edit: It really boils down to another way to visualize the overhead vs just listing what's been removed.


This is true, but they're better than nothing.


A bad benchmark is worse than nothing


What is bad about the OP'd suggest benchmark?



> Does the hypermedia support exist now, or is that a future goal?

Future goal. There's nothing at the moment, but it's a case that we're interested in. I'd love to talk about exactly what we need to do on the mailing list.

> Also, LOL at steveklabnik2 ;)

Yeah, steveklabnik would still be almost in top 100 to this day, I just looked. Sigh.


Thanks! Do you need something more than what's in the README[1], or do you mean I should have linked it from my post?

1: https://github.com/rails-api/rails-api#railsapi


This has come at a time I'm looking at Grape mounted in a Rails app for an API layer. Is there a simple way to explain to those of us with less API building experience what the pros/cons are of using rails-api over something like the Grape gem?


It's the exact same as Sinatra vs. Rails: build it all yourself vs. using a framework that has it built for you.


Just the link would have been nice, I'm not jumping on raiks api right away, but skimming the getting started guide of something new usually helps me figure out if I want to use it or not in the future.


Roger. I'll add one, thanks.


Awesome. Please let me know how I can help you build your apps more effectively.


So sorry about this. I was travelling back from Europe, and we had to coordinate between everyone who owned the various gems, so there was a bit of overlap there.

I hope to not be encouraging people to use HEAD soon.


It's ok. I think we should had fork the repo and reference that in the first place.


It already is: https://github.com/rails-api/rails-api#for-new-apps

This is not a fork of Rails, it's just a set of plugins that work together nicely. Luckily, all the work on Rails 3 means that Rails is super modular, and it's easy to break off just the bits that you want. See Crafting Rails Applications[1] for more on this topic.

1: http://plataformatec.com.br/crafting-rails-applications


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: