This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Cohension - Service Locator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Cohension - Service Locator" Watch "Cohension - Service Locator" New topic

Cohension - Service Locator

Shannon Sims
Ranch Hand

Joined: Jul 03, 2003
Posts: 197
I'm reading the Head First Servlets & JSP book. Page 779 states that the Service Locator is based on: hiding complexity and separation of concern. Couldn't the Service Locator also be based on cohension too? Reading page 743, Cohension is described as "the degree to which a class is designed for one, cohesive, task or purpose. This to me seems to fit the Service Locator? The Service Locator performs registry lookups...isn't this a cohesive pattern? Would someone please clarify to help me understand how the Service Locator isn't? And also what about Front Controller, cohension seems to fit since it's purpose is to navigate an app's request to the appropriate place?

Thank you in advance for your feedback.
I agree. Here's the link:
subject: Cohension - Service Locator
It's not a secret anymore!