You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Michael Bolz (JIRA)" <ji...@apache.org> on 2013/12/20 10:04:07 UTC

[jira] [Comment Edited] (OLINGO-83) Annotation processor refactoring

    [ https://issues.apache.org/jira/browse/OLINGO-83?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13851496#comment-13851496 ] 

Michael Bolz edited comment on OLINGO-83 at 12/20/13 9:03 AM:
--------------------------------------------------------------

h4. Feedback

* package names of core and api
** Module 'annotation-processor-api': To keep naming and content consistent we should move classes which are not directly related to an annotation processor into {{annotation-core}} module and hence keep (add) only '(Java) annotation' based api interfaces/classes into this module.
** Module 'annotation-processor-core': Keep naming

* check consistency with JPA processor
In the JPA modules the packages are named 'org.apache.olingo.odata2.processor.core.jpa.\*' and 'org.apache.olingo.odata2.processor.api.jpa.\*' which IMHO does not fit to the library package names 'org.apache.olingo.odata2.core.\*' and 'org.apache.olingo.odata2.api.\*'.
I would propose a root package name of 'org.apache.olingo.odata2.api.\*' and 'org.apache.olingo.odata2.core.\*' (which would result in 'org.apache.olingo.odata2.jpa.core.\*' and 'org.apache.olingo.odata2.jpa.api.\*' for the JPA module).
*Any other opinions?*

* artifact naming
Artifact names fit to module names and can be kept.

* code review recommended
I agree but I suggest to do this within the [Create tests for 'Annotation-processor' module issue|https://issues.apache.org/jira/browse/OLINGO-86].

* naming and structure of ref scenario (lib + web)
IMHO it is not necessary to split the reference scenario (implementation) into two modules. But based on that actual all other modules have done it this way the '\*-processor-webref' could be split into '\*-processor-web' and '\*-processor-web'.

Below you find the _Current state_, my _proposal_ and the _proposed state_ to visualise all above. 
Feedback is welcome  ;o)
Kind regards, Michael

h4. Current state:
* annotation-processor-api
** Packages: 
*** org.apache.olingo.odata2.api.data
* annotation-processor-core
** Packages: 
*** org.apache.olingo.odata2.core.annotation.data
*** org.apache.olingo.odata2.core.annotation.edm
*** org.apache.olingo.odata2.core.annotation.processor
*** org.apache.olingo.odata2.core.annotation.util
* annotation-processor-webref
** Packages: 
*** org.apache.olingo.odata2.ref.annotation.processor
*** org.apache.olingo.odata2.ref.annotation.model

h4. Proposal:
* Rename packages:
** org.apache.olingo.odata2.api.data -> org.apache.olingo.odata2.annotation.processor.api (which contains the new {{AnnotationServiceFactory}})
** org.apache.olingo.odata2.core.annotation.data -> org.apache.olingo.odata2.annotation.processor.core.datasource which additional contains {{DataSource}} and {{ValueAccess}} (formerly in API module)
** org.apache.olingo.odata2.core.annotation.edm -> org.apache.olingo.odata2.annotation.processor.core.edm 
** org.apache.olingo.odata2.core.annotation.processor -> org.apache.olingo.odata2.annotation.processor.core
** org.apache.olingo.odata2.core.annotation.util -> org.apache.olingo.odata2.annotation.processor.core.util
** org.apache.olingo.odata2.ref.annotation.processor -> org.apache.olingo.odata2.annotation.processor.ref
** org.apache.olingo.odata2.ref.annotation.model -> org.apache.olingo.odata2.annotation.processor.ref.model
* Split (and rename) module 'annotation-processor-webref' to 'annotation-processor-web' and 'annotation-processor-web' to be consistent with reference implementations in other modules
* Move:
** {{DataSource}} and {{ValueAccess}} in org.apache.olingo.odata2.annotation.processor.core.datasource ('annotation-processor-core')
** {{DataSourceProcessor}} in org.apache.olingo.odata2.annotation.processor.core ('annotation-processor-core')
* Add:
** {{AnnotationServiceFactory}} in org.apache.olingo.odata2.api ('annotation-processor-api')

h4. Proposed state:
* annotation-processor-api
** Packages: 
*** org.apache.olingo.odata2.annotation.processor.api which contains the new {{AnnotationServiceFactory}}
* annotation-processor-core
** Packages: 
*** org.apache.olingo.odata2.annotation.processor.core which additional contains {{DataSourceProcessor}} (formerly in API module)
*** org.apache.olingo.odata2.annotation.processor.core.datasource which additional contains {{DataSource}} and {{ValueAccess}} (formerly in API module)
*** org.apache.olingo.odata2.annotation.processor.core.edm
*** org.apache.olingo.odata2.annotation.processor.core.util
* annotation-processor-ref
** Packages: 
*** org.apache.olingo.odata2.annotation.processor.ref
*** org.apache.olingo.odata2.annotation.processor.ref.model
* annotation-processor-web which only bundles a {{war}} and do not contains any java source code



was (Author: mirbo):
h4. Feedback

* package names of core and api
General naming of module 'annotation-processor-\*'.
There are not only '(Java) annotation' based api parts and implementations.
Perhaps a more generic naming schema like 'datasource-processor' or 'data-processor' would fit more to the content?
(Initial naming was based on the 'PocEdmAnnotations' feature).

* check consistency with JPA processor
In the JPA modules the packages are named 'org.apache.olingo.odata2.processor.core.jpa.\*' and 'org.apache.olingo.odata2.processor.api.jpa.\*' which IMHO does not fit to the library package names 'org.apache.olingo.odata2.core.\*' and 'org.apache.olingo.odata2.api.\*'.
I would propose 'org.apache.olingo.odata2.api.datasource.\*' and 'org.apache.olingo.odata2.core.datasource.\*' (which would result in 'org.apache.olingo.odata2.jps.core.\*' and 'org.apache.olingo.odata2.jpa.api.\*' for the JPA module).
*Any other opinions?*

* artifact naming
Based on module and package renaming the artifacts would also be renamed (accordingly).

* code review recommended
I agree but I suggest to do this within the [Create tests for 'Annotation-processor' module issue|https://issues.apache.org/jira/browse/OLINGO-86].

* naming and structure of ref scenario (lib + web)
IMHO it is not necessary to split the reference scenario (implementation) into two modules. But based on that actual all other modules have done it this way the '\*-processor-webref' could be split into '\*-processor-web' and '\*-processor-web'.

Below you find the _Current state_, my _proposal_ and the _proposed state_ to visualise all above. 
Feedback is welcome  ;o)
Kind regards, Michael

h4. Current state:
* annotation-processor-api
** Packages: 
*** org.apache.olingo.odata2.api.data
* annotation-processor-core
** Packages: 
*** org.apache.olingo.odata2.core.annotation.data
*** org.apache.olingo.odata2.core.annotation.edm
*** org.apache.olingo.odata2.core.annotation.processor
*** org.apache.olingo.odata2.core.annotation.util
* annotation-processor-webref
** Packages: 
*** org.apache.olingo.odata2.ref.annotation.processor
*** org.apache.olingo.odata2.ref.annotation.model

h4. Proposal:
* Rename 'annotation-processor-\*' to 'datasource-processor-\*'
* Rename packages:
** org.apache.olingo.odata2.api.data -> org.apache.olingo.odata2.api.datasource.data which contains {{DataSource}} and {{ValueAccess}}
** NEW: org.apache.olingo.odata2.api.datasource.processor which contains {{DataSourceProcessor}}
** org.apache.olingo.odata2.core.annotation.data -> org.apache.olingo.odata2.core.datasource.data
** org.apache.olingo.odata2.core.annotation.edm -> org.apache.olingo.odata2.core.datasource.edm 
** org.apache.olingo.odata2.core.annotation.processor -> org.apache.olingo.odata2.core.datasource.processor
** org.apache.olingo.odata2.core.annotation.util -> org.apache.olingo.odata2.core.datasource.util
** org.apache.olingo.odata2.ref.annotation.processor -> org.apache.olingo.odata2.ref.datasource
** org.apache.olingo.odata2.ref.annotation.model -> org.apache.olingo.odata2.ref.datasource.model
* Split (and rename) module 'annotation-processor-webref' to 'datasource-processor-web' and 'datasource-processor-web' to be consistent with reference implementations in other modules

h4. Proposed state:
* datasource-processor-api
** Packages: 
*** org.apache.olingo.odata2.api.datasource.data which contains {{DataSource}} and {{ValueAccess}}
*** org.apache.olingo.odata2.api.datasource.processor which contains {{DataSourceProcessor}}
* datasource-processor-core
** Packages: 
*** org.apache.olingo.odata2.core.datasource.data
*** org.apache.olingo.odata2.core.datasource.edm
*** org.apache.olingo.odata2.core.datasource.processor
*** org.apache.olingo.odata2.core.datasource.util
* datasource-processor-ref
** Packages: 
*** org.apache.olingo.odata2.ref.datasource
*** org.apache.olingo.odata2.ref.datasource.model
* datasource-processor-web which only bundles a {{war}} and do not contains any java source code



> Annotation processor refactoring
> --------------------------------
>
>                 Key: OLINGO-83
>                 URL: https://issues.apache.org/jira/browse/OLINGO-83
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-annotation
>            Reporter: Stephan Klevenz
>            Assignee: Michael Bolz
>            Priority: Blocker
>             Fix For: V2 1.1.0
>
>
> Package naming of annotation processor are not clear and need to be discussed. In detail:
> - package names of core and api
> - check consistency with JPA processor
> - artifact naming
> - code review recommended
> - naming and structure of ref scenario (lib + web)



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)