UrbanPro
true

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Use of Service Locator Pattern

M
Milan M.
16/12/2016 0 0

If we want to reuse the java code that should be the best approach w.r.t re-usability, maintanence and saving time to concentrate on our own businbess logic/requirement. In the similar approach many patterns has been evolved which gives developer a opennes to decouple the functional logic and deploy as plug and play which is so famous as plugins in programming world. 

The plugins gives developer feasibility to reuse and extend the existing/implemented features and get benefited with that. Using the Jars we can de-couple our object creation like factory pattern and create the object at runtime depends upon the implementing factory class available on classpath. Service locator also works in same way where service provider need to define a descriptor file with the full class name of its abstract class (or interface) which contains the information of URI and its corresponding full implenting class. This way the vendor can publish its factory and implementing class within jar and put on class path to automatically come into action.

Tomorrow, if requirement gets changed or we recommended to use any other factory then simply we can add the updated jar into appended classpath and if it will get loaded first then it will be in action. So it is so easy to directly plug & play with such user frindly pattern. Such patterns are mostly we can see with xml parsers.

 

0 Dislike
Follow 0

Please Enter a comment

Submit

Other Lessons for You

10 Cool SQL Optimizations That Do Not Depend On The Cost Model
Today, we don’t want to talk about cost based optimisation, i.e. optimisations that depend on a database’s cost model. We’ll look into much simpler optimisations that can be implemented...

Interview Tip : Q1) Why Strings are immutable in java ? What happen if it was mutable in java?
As we all know that Strings in java are immutabe in nature, now the question comes why the creator made it immutable in nature, although this field used maximum in any java program. The answer to this...

How to avoid Exam Phobia
Fear before a board exam is a natural behaviour, but when fear becomes so much that learning, remembering and having difficulty in doing your regular work, it is called exam phobia. What are the symptoms...
R

Java Learning Tip
The easy way to learn any programatical language is just simple practices. Take a simple examples and practice daily one hour. And also go through the learning videos from youtube or somewhere else.

Big Data Hadoop Training
What is Big Data? Big data means really a big data, it is a collection of large datasets that cannot be processed using traditional computing techniques. Big data is not merely a data, rather it has become...
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more