I''m planning on creating a single page application using AngularJS on the client side. I''m not sure if I should use Rails as it is, or the Rails API gem or some other solution. Anyone got any suggestions on how you structured your application? Should I be using the asset pipeline? Or should all client side stuff be separated from Rails? I''ll be creating a simulation engine for this application to simulate results that the application will show. Using Rails I thought I''d make the simulation engine a Rails Engine to separate the logic from the rest of the application. Is that a good idea? Can the Rails API gem make use of engines? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/BpXjPsMr4l4J. For more options, visit https://groups.google.com/groups/opt_out.
tamouse mailing lists
2013-Apr-03 23:45 UTC
Re: Help with single page application structure
On Tue, Apr 2, 2013 at 8:43 AM, Johan Vauhkonen <johan.vauhkonen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m planning on creating a single page application using AngularJS on the > client side. > > I''m not sure if I should use Rails as it is, or the Rails API gem or some > other solution. > Anyone got any suggestions on how you structured your application? > > Should I be using the asset pipeline? Or should all client side stuff be > separated from Rails? > > I''ll be creating a simulation engine for this application to simulate > results that the application will show. > Using Rails I thought I''d make the simulation engine a Rails Engine to > separate the logic from the rest of the application. > Is that a good idea? Can the Rails API gem make use of engines?A colleague and I were having a very similar discussion today. He allowed as he just wrote his own asset pipeline, combining together all the various compilers and converters and such into something pretty simple that he''s using under Sinatra. He had said he initially thought about using Rails minimally for the asset pipeline, but then came up with this. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
I think for me, using Sinatra would mean I''d have to write a lot of things that Rails bring which I don''t want to. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/IaOIv-46b6EJ. For more options, visit https://groups.google.com/groups/opt_out.
tamouse mailing lists
2013-Apr-04 12:16 UTC
Re: Help with single page application structure
On Apr 4, 2013 1:35 AM, "Johan Vauhkonen" <johan.vauhkonen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I think for me, using Sinatra would mean I''d have to write a lot ofthings that Rails bring which I don''t want to Agreed; we were talking alternatives and for his needs, he really only needed the pipeline.I was just trying to illustrate that stripping Rails isn''t the only direction one can go. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Is it a viable alternative to separate client and back end? To have AngularJS take care of everything client side and Rails take care of only the back end? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/ougmJcF-FxEJ. For more options, visit https://groups.google.com/groups/opt_out.
tamouse mailing lists
2013-Apr-04 12:31 UTC
Re: Help with single page application structure
On Apr 4, 2013 7:20 AM, "Johan Vauhkonen" <johan.vauhkonen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Is it a viable alternative to separate client and back end? > > To have AngularJS take care of everything client side and Rails take careof only the back end?>Absolutely, you can go so far as to have your SPA initial download be a static index.HTML in ../public, and just have your routes speak JSON to the Angular requests. I''m working on this currently only using backbone and underscore. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On Apr 4, 2013, at 8:31 AM, tamouse mailing lists wrote:> > On Apr 4, 2013 7:20 AM, "Johan Vauhkonen" <johan.vauhkonen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Is it a viable alternative to separate client and back end? > > > > To have AngularJS take care of everything client side and Rails take care of only the back end? > > > > Absolutely, you can go so far as to have your SPA initial download be a static index.HTML in ../public, and just have your routes speak JSON to the Angular requests. I''m working on this currently only using backbone and underscore.There''s a few Railscasts that cover Ember and Angular and they all start from this premise. You use Rails, but you don''t do that much in it. It''s just there providing the persistence, and all of your real work happens in the public folder. Walter -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
I''ve initially made a HomeController that serves the initial index view (with it set as the root in routes) but I think I like the /public way better. Thanks for the idea! On Thursday, 4 April 2013 14:31:09 UTC+2, tamouse wrote: Absolutely, you can go so far as to have your SPA initial download be a> static index.HTML in ../public, and just have your routes speak JSON to the > Angular requests. I''m working on this currently only using backbone and > underscore. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/O2rtjdsyAmQJ. For more options, visit https://groups.google.com/groups/opt_out.
Do you disable Rails routing somehow when using client-side routing? On Thursday, 4 April 2013 14:31:09 UTC+2, tamouse wrote: Absolutely, you can go so far as to have your SPA initial download be a> static index.HTML in ../public, and just have your routes speak JSON to the > Angular requests. I''m working on this currently only using backbone and > underscore. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/A2wuSHFuh5UJ. For more options, visit https://groups.google.com/groups/opt_out.