Hello all, I''m about to start working on a part of my application that interfaces with an external system using HTTP (old school, not webservices). Anyway, several of my controllers will need to access this functionality, but there are some places where the functionality doesn''t fit perfectly with my design. I was thinking about putting most of the interaction with the external site in its own controller and then calling that from controllers in my application as needed. Of course, such a controller wouldn''t be associated with a model. I''m not sure what effect this will have. How would you handle it? --------------------------------- Ready for the edge of your seat? Check out tonight''s top picks on Yahoo! TV. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Will, I would hide the external system behind a Model. I view Controllers as those things that manage the interactions between the ''things'' in an application. An external system, as it appears, is another ''thing'' in your application. This gives you the ability to use this Model in other controllers, or other applications should the need arise. However, I''m sure you''ll get plenty of options from this list on which to choose a solution that fits your needs. Cheers, Mel Riffe On 6/27/07, Will Gant <williamwgant-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> > Hello all, > I''m about to start working on a part of my application that interfaces > with an external system using HTTP (old school, not webservices). Anyway, > several of my controllers will need to access this functionality, but there > are some places where the functionality doesn''t fit perfectly with my > design. I was thinking about putting most of the interaction with the > external site in its own controller and then calling that from controllers > in my application as needed. Of course, such a controller wouldn''t be > associated with a model. I''m not sure what effect this will have. > > How would you handle it? > > ------------------------------ > Ready for the edge of your seat? Check out tonight''s top picks<http://us.rd.yahoo.com/evt=48220/*http://tv.yahoo.com/>on Yahoo! TV. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I''d put it into a class under lib/ and not into a controller; controllers shall be thin and glue the view and the model. it depends how you "see" your external resource; you can look at it like a model. a bit more important could be the fact that external access to the resource will lock-up your users request and bind one of your mongrel (or rails instances) to that request. you can use backgroundrb (http:// backgroundrb.rubyforge.org/) for such cases and communicate asynchronously with your external system. On 27 Jun., 15:30, Will Gant <williamwg...-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> Hello all, > I''m about to start working on a part of my application that interfaces with an external system using HTTP (old school, not webservices). Anyway, several of my controllers will need to access this functionality, but there are some places where the functionality doesn''t fit perfectly with my design. I was thinking about putting most of the interaction with the external site in its own controller and then calling that from controllers in my application as needed. Of course, such a controller wouldn''t be associated with a model. I''m not sure what effect this will have. > > How would you handle it? > > --------------------------------- > Ready for the edge of your seat? Check out tonight''s top picks on Yahoo! TV.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
There''s nothing wrong with controllers that aren''t directly related to a model. If there are methods multiple controllers will use then I would think the best place to put them is in the application controller. Anyway, it''s a good idea to plan ahead, I think you''re on the right track. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, Please can you help me with the following: Looking for a Ruby on Rails Developer, Salary £30K-£60K, Leicester, City Centre Use the latest web technology Ruby on Rails. To develop professional web applications. Must have written previous Rail applications. Need the talents of a smart, experienced programmer. Need to be attentive to detail, a team-player and responsible. Require previous commercial experience with Ruby on Rails and dealing with Database Schema''s to Front End Applications. Involved with creative projects which are making them a big name in the gaming and video industries (sony and microsoft). Would you be interested or do you know anyone who would be interested as there are several positions available. I appreciate your help in this. Ferdouse Ara Technical Recruitment Consultant Precision Recruitment UK Ltd Tel +44 (0) 116 2545488 Fax +44 (0) 871 2778928 http://www.precisionrecruitment.co.uk -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---