I'm adding some logic to my web app to lookup geo-coordinates for a user, store them, then using those coordinates lookup the timezone and store that. My first go at this was to add a GeoCodeUser() method to a MappingService i had defined to do other map-related tasks. Because looking up the two bits of data relied on two different REST services, I broke the two lookup tasks into AddressGeoCoder and TimeZoneCoder and used those to retrieve the data and the UserRepository to store them. The odd part of this solution is that though this method needs access to the repository and two 'coders', the other methods in the class didn't. So every time I use that service to do other things I'm getting dependencies I don't need and then dropping them. So here is what I am wondering:
Should this be in a service (since it's coordinating different operations) or possible in the 'User' model object itself?
If so, should I be defining a service based on it's dependencies & area of interest (i.e. UserGeoCodingService), or just area of interest (MappingService) with extra dependencies?
Thanks so much for your insight!
James