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

Basic Concepts of Web Designing
An introduction to domain names, web servers, and website hosting 1)What is the web? In a nutshell, the web is a whole bunch of interconnected computers talking to one another. The computers (on the...

Palindrome Number : Java Function
An easier way to find out whether a number is a Palindrome number or not. Eg. 121, 88, 12321 etc public boolean isPalindrome ( int n ) { int rev = 0, r; for( i = n; i > 0; i /= 10 ) { r...

How To Setup development Environment Of Java?
After installation of JAVA, we need to setup 2 environment variables. First one is JAVA_HOME and second is Path. Below steps to set up Java environment to compile & execute Java programs from command...

What Would Be Life Cycle Of A Fresher After Campus In An IT Company?
1. Basic Technical Training: Since freshers are not subject matter experts so gone through 3 - 6 months basic technical training within Organization. 2. Technical Assessment: HR sends freshers to various...

Final modifier in Java
Can’t change value of variable if marked as final. It is best practice to mark method parameter as final if its value will not changes. Variable must be initialize either using Initializer block...
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