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

Differences Between HashMap vs HashSet In Java.
HashSet HashMap HashSet implements Set interface. HashMap implements Map interface. HashSet stores the data as objects. HashMap stores the data as key-value pairs. HashSet...

Benefits of Design Patterns in Application Development
Application developments is a tedious job. Programmers write code and test it again and again to make sure their software works fine. So designing complex software is a hard nut to crack. Skilled programmers...

What is a Programming Language
What is a Language? Language is a communication system of human. What is a programming Language? A programming Language is a formal constructed language design to communicate...

On the Job training is always best
On the job training always provides an opportunity to learn the best industry practices. While you work on real time you would encounter many challenges that will force you to learn many new things. Class...
M

What are the JSP implicit objects ?
JSP provides Nine implicit objects by default. They are as follows with corresponding Object Type: i) out --> JspWriter ii) request -->HttpServletRequest iii) response --> HttpServletResponse iv)...
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