You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Stephan Klevenz (JIRA)" <ji...@apache.org> on 2010/07/22 13:28:51 UTC
[jira] Created: (CMIS-242) API improvement for methods having long
parameter list
API improvement for methods having long parameter list
------------------------------------------------------
Key: CMIS-242
URL: https://issues.apache.org/jira/browse/CMIS-242
Project: Chemistry
Issue Type: Improvement
Components: opencmis-client
Reporter: Stephan Klevenz
Fix For: 0.2.0-incubating
The parameter list of methods like
Document createDocument(Map<String, ?> properties, ContentStream contentStream, VersioningState versioningState,
List<Policy> policies, List<Ace> addAces, List<Ace> removeAces, OperationContext context);
is very long and often many of the parameters will be set simply to null. API usability and code readability is not nice.
I suggest to overload method for the 80% use case having a shorter parameter list. In this example it could be
Document createDocument(Map<String, ?> properties, ContentStream contentStream);
Rule of thumb could be to have at least one overloaded method where all parameters related to optional features are removed.
WDYT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CMIS-242) API improvement for methods having
long parameter list
Posted by "Florian Müller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918636#action_12918636 ]
Florian Müller commented on CMIS-242:
-------------------------------------
+1
> API improvement for methods having long parameter list
> ------------------------------------------------------
>
> Key: CMIS-242
> URL: https://issues.apache.org/jira/browse/CMIS-242
> Project: Chemistry
> Issue Type: Improvement
> Components: opencmis-client
> Reporter: Stephan Klevenz
> Assignee: Stephan Klevenz
> Fix For: 0.2.0-incubating
>
>
> The parameter list of methods like
> Document createDocument(Map<String, ?> properties, ContentStream contentStream, VersioningState versioningState,
> List<Policy> policies, List<Ace> addAces, List<Ace> removeAces, OperationContext context);
> is very long and often many of the parameters will be set simply to null. API usability and code readability is not nice.
> I suggest to overload method for the 80% use case having a shorter parameter list. In this example it could be
> Document createDocument(Map<String, ?> properties, ContentStream contentStream);
> Rule of thumb could be to have at least one overloaded method where all parameters related to optional features are removed.
> WDYT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CMIS-242) API improvement for methods having
long parameter list
Posted by "Florent Guillaume (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12902872#action_12902872 ]
Florent Guillaume commented on CMIS-242:
----------------------------------------
Agreed.
> API improvement for methods having long parameter list
> ------------------------------------------------------
>
> Key: CMIS-242
> URL: https://issues.apache.org/jira/browse/CMIS-242
> Project: Chemistry
> Issue Type: Improvement
> Components: opencmis-client
> Reporter: Stephan Klevenz
> Fix For: 0.2.0-incubating
>
>
> The parameter list of methods like
> Document createDocument(Map<String, ?> properties, ContentStream contentStream, VersioningState versioningState,
> List<Policy> policies, List<Ace> addAces, List<Ace> removeAces, OperationContext context);
> is very long and often many of the parameters will be set simply to null. API usability and code readability is not nice.
> I suggest to overload method for the 80% use case having a shorter parameter list. In this example it could be
> Document createDocument(Map<String, ?> properties, ContentStream contentStream);
> Rule of thumb could be to have at least one overloaded method where all parameters related to optional features are removed.
> WDYT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (CMIS-242) API improvement for methods having long
parameter list
Posted by "Florent Guillaume (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Florent Guillaume reopened CMIS-242:
------------------------------------
I'd like to remove OperationContext from the short version of the APIs, as they are usually unneeded and always available in the long version. Anyone against this?
> API improvement for methods having long parameter list
> ------------------------------------------------------
>
> Key: CMIS-242
> URL: https://issues.apache.org/jira/browse/CMIS-242
> Project: Chemistry
> Issue Type: Improvement
> Components: opencmis-client
> Reporter: Stephan Klevenz
> Assignee: Stephan Klevenz
> Fix For: 0.2.0-incubating
>
>
> The parameter list of methods like
> Document createDocument(Map<String, ?> properties, ContentStream contentStream, VersioningState versioningState,
> List<Policy> policies, List<Ace> addAces, List<Ace> removeAces, OperationContext context);
> is very long and often many of the parameters will be set simply to null. API usability and code readability is not nice.
> I suggest to overload method for the 80% use case having a shorter parameter list. In this example it could be
> Document createDocument(Map<String, ?> properties, ContentStream contentStream);
> Rule of thumb could be to have at least one overloaded method where all parameters related to optional features are removed.
> WDYT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CMIS-242) API improvement for methods having long
parameter list
Posted by "Florent Guillaume (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Florent Guillaume resolved CMIS-242.
------------------------------------
Resolution: Fixed
Done.
http://svn.apache.org/viewvc?rev=1005432&view=rev
> API improvement for methods having long parameter list
> ------------------------------------------------------
>
> Key: CMIS-242
> URL: https://issues.apache.org/jira/browse/CMIS-242
> Project: Chemistry
> Issue Type: Improvement
> Components: opencmis-client
> Reporter: Stephan Klevenz
> Assignee: Stephan Klevenz
> Fix For: 0.2.0-incubating
>
>
> The parameter list of methods like
> Document createDocument(Map<String, ?> properties, ContentStream contentStream, VersioningState versioningState,
> List<Policy> policies, List<Ace> addAces, List<Ace> removeAces, OperationContext context);
> is very long and often many of the parameters will be set simply to null. API usability and code readability is not nice.
> I suggest to overload method for the 80% use case having a shorter parameter list. In this example it could be
> Document createDocument(Map<String, ?> properties, ContentStream contentStream);
> Rule of thumb could be to have at least one overloaded method where all parameters related to optional features are removed.
> WDYT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CMIS-242) API improvement for methods having long
parameter list
Posted by "Stephan Klevenz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephan Klevenz reassigned CMIS-242:
------------------------------------
Assignee: Stephan Klevenz
Are there any further objectives to this issue? Otherwise I will going to fix this next couple of days.
> API improvement for methods having long parameter list
> ------------------------------------------------------
>
> Key: CMIS-242
> URL: https://issues.apache.org/jira/browse/CMIS-242
> Project: Chemistry
> Issue Type: Improvement
> Components: opencmis-client
> Reporter: Stephan Klevenz
> Assignee: Stephan Klevenz
> Fix For: 0.2.0-incubating
>
>
> The parameter list of methods like
> Document createDocument(Map<String, ?> properties, ContentStream contentStream, VersioningState versioningState,
> List<Policy> policies, List<Ace> addAces, List<Ace> removeAces, OperationContext context);
> is very long and often many of the parameters will be set simply to null. API usability and code readability is not nice.
> I suggest to overload method for the 80% use case having a shorter parameter list. In this example it could be
> Document createDocument(Map<String, ?> properties, ContentStream contentStream);
> Rule of thumb could be to have at least one overloaded method where all parameters related to optional features are removed.
> WDYT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CMIS-242) API improvement for methods having long
parameter list
Posted by "Stephan Klevenz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephan Klevenz resolved CMIS-242.
----------------------------------
Resolution: Fixed
API extended accordingly to the proposal
> API improvement for methods having long parameter list
> ------------------------------------------------------
>
> Key: CMIS-242
> URL: https://issues.apache.org/jira/browse/CMIS-242
> Project: Chemistry
> Issue Type: Improvement
> Components: opencmis-client
> Reporter: Stephan Klevenz
> Assignee: Stephan Klevenz
> Fix For: 0.2.0-incubating
>
>
> The parameter list of methods like
> Document createDocument(Map<String, ?> properties, ContentStream contentStream, VersioningState versioningState,
> List<Policy> policies, List<Ace> addAces, List<Ace> removeAces, OperationContext context);
> is very long and often many of the parameters will be set simply to null. API usability and code readability is not nice.
> I suggest to overload method for the 80% use case having a shorter parameter list. In this example it could be
> Document createDocument(Map<String, ?> properties, ContentStream contentStream);
> Rule of thumb could be to have at least one overloaded method where all parameters related to optional features are removed.
> WDYT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CMIS-242) API improvement for methods having
long parameter list
Posted by "Stephan Klevenz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918612#action_12918612 ]
Stephan Klevenz commented on CMIS-242:
--------------------------------------
I'm fine with this.
+1
> API improvement for methods having long parameter list
> ------------------------------------------------------
>
> Key: CMIS-242
> URL: https://issues.apache.org/jira/browse/CMIS-242
> Project: Chemistry
> Issue Type: Improvement
> Components: opencmis-client
> Reporter: Stephan Klevenz
> Assignee: Stephan Klevenz
> Fix For: 0.2.0-incubating
>
>
> The parameter list of methods like
> Document createDocument(Map<String, ?> properties, ContentStream contentStream, VersioningState versioningState,
> List<Policy> policies, List<Ace> addAces, List<Ace> removeAces, OperationContext context);
> is very long and often many of the parameters will be set simply to null. API usability and code readability is not nice.
> I suggest to overload method for the 80% use case having a shorter parameter list. In this example it could be
> Document createDocument(Map<String, ?> properties, ContentStream contentStream);
> Rule of thumb could be to have at least one overloaded method where all parameters related to optional features are removed.
> WDYT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.