Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails API + Emberjs #706

Closed
GabKlein opened this issue Jan 20, 2016 · 11 comments
Closed

Rails API + Emberjs #706

GabKlein opened this issue Jan 20, 2016 · 11 comments

Comments

@GabKlein
Copy link

I'm using more and more often a Rails API app coupled with Ember-cli app.
I so that Thoughtbot is using Ember as well and I was wonder if:

I would be kind of neat to be able to pass command line options into the susperders new projectname to make it compatible.

Even cooler if suspenders could support Ember-cli with all the Thoughtbot frontend libs.
Ember-cli is also very easily deployable on Heroku.

@geoffharcourt
Copy link
Contributor

cc: @seanpdoyle

@seanpdoyle
Copy link
Contributor

@GabKlein thanks for opening this issue!

I think this is a great idea!

Unfortunately, it looks like it's currently blocked by #698.

Once we resolve how to generate an API-only app, the ember-cli integration should be pretty straightforward (generating the ember-cli-rails initializer, scaffolding out a new ember-cli application, etc).

@tute
Copy link
Contributor

tute commented Mar 3, 2016

@seanpdoyle do we use suspenders for many new Ember.js apps, in a way that it would make sense for us to create a flag for it?

Broader than this issue: what exactly are the differences between an API-only rails and a full suspended app? Would it make sense to add --api as an option, as we have heroku and github, to take those into account?

@seanpdoyle
Copy link
Contributor

I fear that an --ember tag would be more complicated than a Gemfile entry and an initializer (ignoring the possibility of --api for now)

We'd have to ensure that the ember-cli package is npm installed globally, and we'd have to npm install --save-dev ember-cli-rails-addon somehow.

@tute is that something Suspenders is capable of or has done in the past?

@tute
Copy link
Contributor

tute commented Mar 4, 2016

@tute is that something Suspenders is capable of or has done in the past?

Suspenders is capable if it makes sense for us. I think it is a question of how many times do we setup ember-cli-rails projects in an automatable way.

@tute
Copy link
Contributor

tute commented May 17, 2016

After #676, we'll be able to solve this with generators, which might live in a separate extension project.

@toobulkeh
Copy link
Contributor

Does thoughtbot use https://github.com/cerebris/jsonapi-resources? That seems to be the prevailing JSONapi implementation in Rails, currently.

@tute
Copy link
Contributor

tute commented May 18, 2016

It sounds like JSON-API is the API Spec of choice for Thoughtbot then. Is that correct?
[...]
Does thoughtbot use https://github.com/cerebris/jsonapi-resources? That seems to be the prevailing JSONapi implementation in Rails, currently.

I asked colleagues, these are some of their responses:

I think we've been using JSON-API on Ember projects because it's the blessed API spec by Ember?
If you use JSON-API get ready to be hated by your mobile developers!
I don't think that's limited to mobile developers. Even doing Ember I'd prefer to avoid JSON-API. It's not worth the overhead, even as the blessed solution.
I asked this question recently, "no" to JSON-API was pretty unanimous.
I like JSON API honestly, if it's Rails and you have something good at consuming the API, JSONAPI::Resources is top-notch. I'm totally an Ember hater though, which is sad bc JSONAPI is actually really nice with a good consumer

We don't have a silver-bullet choice for this, and it will depend on whom/what are we interfacing with.

@toobulkeh
Copy link
Contributor

Would multiple generators for different options be accepted into suspenders? Or are you shooting for more of the current 1-option default?

@tute
Copy link
Contributor

tute commented May 19, 2016

Would multiple generators for different options be accepted into suspenders?

I don't think we would accept them into this project, as we only encode the defaults that works for most (when not every) thoughtbot generated app. That said, generators wouldn't need to be accepted, as they can work as extension projects.

Thanks!

@tute
Copy link
Contributor

tute commented Jul 1, 2016

We don't have such a clear blueprint for frontend-heavy applications, so I don't think this is something we can include into suspenders. Each frontend-heavy application we have developed have been different enough that extracting the common parts wouldn't make us more productive.

Thanks for your input!

@tute tute closed this as completed Jul 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants