You are viewing a plain text version of this content. The canonical link for it is here.
Posted to droids-dev@incubator.apache.org by "Eugen Paraschiv (JIRA)" <ji...@apache.org> on 2011/02/20 13:30:38 UTC
[jira] Commented: (DROIDS-126) Bypass Protocol and Parser factories
and make CrawlingWorker ask for it's collaborators directly
[ https://issues.apache.org/jira/browse/DROIDS-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997138#comment-12997138 ]
Eugen Paraschiv commented on DROIDS-126:
----------------------------------------
I'm aware that there have been other discussions about the usage of factories. My hope is to get some feedback here and hopefully simplify this API, by:
1. introducing 2 new methods that do not go through the factory:
droid.getProtocol(uri);
droid.getParser(contentType);
2. not publishing the factory related API
3. removing the 2 factories altogether
> Bypass Protocol and Parser factories and make CrawlingWorker ask for it's collaborators directly
> ------------------------------------------------------------------------------------------------
>
> Key: DROIDS-126
> URL: https://issues.apache.org/jira/browse/DROIDS-126
> Project: Droids
> Issue Type: Improvement
> Reporter: Eugen Paraschiv
>
> The factory usage in CrawlingWorker and CrawlingDroids makes the API hard to use and breaks the Law of Demeter - instead of the worker asking for what it needs, it has to first ask for the factory and then retrieve it's collaborator from it:
> droid.getProtocolFactory().getProtocol(uri);
> droid.getParserFactory().getParser(contentType);
> This makes the API harder to use and introduces unnecessary complexity into the API.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira