[
http://jira.amdatu.org/jira/browse/AMDATU-435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11691#comment-11691
]
Bram de Kruijff commented on AMDATU-435:
----------------------------------------
{quote}
Why do we register this one as a service? WinkRegistrationService is empty and
unused. There are other places where I've seen this, and I would propose we
remove all of them. [1]
{quote}
Registering any service in the registry under an interface is kind of my
default behavior. I like the explicitness, it's inspectable and other code can
depend on it without any trouble or forcing dependencies on anybody(?). Object
registrations are uninformative and decorating them with arbitrary string
properties will make as mess unless we introduce a convention like... interface
name? ;) Obviously it is true that we are committing us to (the registration
of) these interfaces.. so yeah... I'm not religious about it, just explaining
why I do it. So if you wanna propose this convention go right ahead.
{quote}
In WinkRegistrationServiceImpl there is a comment that states "Array to prevent
dependencyManager from injecting the wrong component". There is a more elegant
way to disable injection for a specific type if that's all you're trying to
avoid here.
{quote}
I'm too tired to think to think... please enlighten me! :)
> Small-ish issues after reviewing web.wink
> -----------------------------------------
>
> Key: AMDATU-435
> URL: http://jira.amdatu.org/jira/browse/AMDATU-435
> Project: Amdatu
> Issue Type: Task
> Components: Amdatu Web
> Reporter: Marcel Offermans
>
> I reviewed the code in web.wink and have a list of small-ish issues:
> # Why do we register this one as a service? WinkRegistrationService is empty
> and unused. There are other places where I've seen this, and I would propose
> we remove all of them. [1]
> # In WinkRegistrationServiceImpl there is a comment that states "Array to
> prevent dependencyManager from injecting the wrong component". There is a
> more elegant way to disable injection for a specific type if that's all
> you're trying to avoid here.
> # Both init() and destroy() clear the map of servlet components. One time is
> enough.
> [1] In general, if a component needs to be registered in the service registry
> for other reasons (because it has JAX-RS annotations for example) I would
> propose we register it as Object instead, and if we really need to further
> distinguish it, add a property. That saves us lots of marker interfaces,
> dependencies, etc.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
http://jira.amdatu.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
Amdatu-developers mailing list
[email protected]
http://lists.amdatu.org/mailman/listinfo/amdatu-developers