Page 1 of 1

Re: About Question enthuware.ocpjp.v11.2.3443 :

Posted: Sat Dec 23, 2023 9:39 am
by Badem48
Hi,

There is nothing with the question but I think I am confused about the concept.
From the Boyarsky and Selikoff book I know that 'uses' keyword is for Service Locator but here it is used for Consumer. How and why?

Re: About Question enthuware.ocpjp.v11.2.3443 :

Posted: Sat Dec 23, 2023 10:55 am
by admin
The problem statement is talking about the module info of a "service user" i.e. user of a service named Order defined in OrderServiceAPI. So, I am not sure where service locator is coming into picture. Although, there is a service locator when applying the Service Locator pattern, it is not always required or even used. There is no rule saying 'uses' keyword is for Service Locator!
You may want to confirm from the author of the book about what they mean.

The 'uses' clause is used by a module to convey that it uses a service. That service is represented by an interface, which is what is mentioned in the 'uses' clause. That's it. Whether you use a service locator or not is entirely up to you.

Re: About Question enthuware.ocpjp.v11.2.3443 :

Posted: Sat Dec 23, 2023 11:36 am
by Badem48
Thank for the answer.