UriParam EndPoint, Component, Configuration

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

UriParam EndPoint, Component, Configuration

arno noordover
Today I asked Andrea a question about when to use UriParams in Endpoints, Components or Configuration.

His reaction was:
The are difference related to the purpose of each element:

- A component acts as factory for Endpoints related to it, so the options at component level should be considered with this in mind
- An endpoint is an abstraction that model the end of a channel through which a system can send or receive messages, so everything related to what the endpoint does in his work should be considered an endpoint option
- The configuration has only readability function: if you have many options it is better to use a class for this and maintain the endpoint code clean without all getter and setter methods. It is up to the developer to choose if use a configuration or not.
Based on this reponse I would do the following:
- put UriParam that are more or less environment specific in the component;
- put UriParam that might differ per EndPoint in the endpoint;
- If it is needed for readability introduce a configuration class and put the parameters in this class.

Questions I have are:
- Did I translate this correctly?
- Should we create developers documents in the new gitbook website?