I think code is better organized and has better testability if service methods are implemented as instance methods on a service class instead of static methods on the domain classes
On Thu, Aug 18, 2011 at 9:08 AM, Alexander Orlov <[email protected]>wrote: > I think using ServiceLocator boils down to > > "Methods that return a Request object in the client interface are > implemented as static methods in the service class. Alternatively, they may > be implemented as instance methods in a service object returned by a > ServiceLocator." > > what pretty much describes how SL works. An obvious advantage of using SL > is that you don't clutter your data model classes with any related methods. > > But are there further *advantages of using SL *(and therefore implementing > not static but instance methods)* vs. implementing static methods*? > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-web-toolkit/-/EcdfWQm-gIQJ. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > -- Magno Machado Paulo http://blog.magnomachado.com.br http://code.google.com/p/emballo/ -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
