Two Laptop Bag*
The moose likes Spring and the fly likes Injected Services - Fewer Large services versus many smaller services.  Best Practice? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Injected Services - Fewer Large services versus many smaller services.  Best Practice?" Watch "Injected Services - Fewer Large services versus many smaller services.  Best Practice?" New topic
Author

Injected Services - Fewer Large services versus many smaller services. Best Practice?

Gary Wolgast
Greenhorn

Joined: Aug 13, 2002
Posts: 9
In my current job, we are using jsf 1.2 and Spring 2.5. We are currently developing an application that has roughly 50 or so discrete entities. Most of the entities are related in one way or another to an "application" entity. This entity is a super entity to which most of the others are related in a one-to-many relationship in the data model. Using Spring DI we have built a few small services and have ended up with a "super size" service that was originally intended to serve the application entity only, but now serves up a large portion of the other related entities using discrete DAOs for each entity. My question: Was this the best way to design this model (One large service serving many different entities) or should we have created smaller bite size services as in 1 service for 1 or 2 entities, regardless of it's relationship to other entities? I'm just looking for opinions about whether fewer large services or many smaller services is better.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Totally depends, but in general, giant services are a pain to maintain.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Injected Services - Fewer Large services versus many smaller services. Best Practice?
 
Similar Threads
Sample Questions for 288 - Need answers
First hibernate experiement..got questions...
Moving bean logic to regular java classes
@JoinTable or @JoinCol...
What else is Spring good for?