Greetings,
I have a hypothetical question to pose to this body of talented
programmers. I have constructed a Service class that uses
Ajax.Request objects to send requests, it has two methods per request,
one which receives a DTO(data transfer object(hash)) and the other
which receives the request, upon receiving the request it dispatches a
custom event and all the listeners of that service receive the XHR,
works great.
My dillema is the idea of having the components which need to invoke
the service to request fresh data. Do I..
A) Have a reference of the service in the component class and
reference that method directly
B) Have the service watch for an event of the component.
As of now I''ve begun to implement option B but im concerned about the
amount of abstract coupling that is going on, has anyone implemented a
similar system and found success in one pattern or another?
Best Regards,
Matt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---