You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Bolz, Michael" <mi...@sap.com> on 2014/06/03 10:48:09 UTC

Re: JSON serialization for server use case

Hi together,

>> * Furthermore the JSONEntity and AtomEntity could be merged into a
>>single Entity.
> The only reason why JSONEntityImpl and JSONEntityImpl exist is for usage
with Jackson annotations: as you can see, both barely extend
AbstractEntity.

>> * The use of the Jackson ObjectMapper (in JSON case) seems not
>>necessary. Perhaps the AbstractODataSerializer could use the
>>"JSONEntitySerializer" similar to the "AtomSerializer" (This would also
>>help in merging JSONEntity and AtomEntity by removing the @Json*
>>annotations).
> It seems feasible.

After feedback from Francesco I started with above change but
unfortunately it took more time then expected.
I'am currently in a state in which the common and server parts are changed
(it compiles) but now a lot (client) tests fails because of the changes.

Hence I started with also making changes in the "*Deserialization" parts
to get all work again.
@Francesco: I hope this is no problem for you if with this changes also
some "client" parts are refactored?

I think I will create a "feature/refactore" branch and push all changes as
soon I have a presentable state.
If this is done I write here and ask for more feedback  ;o)

Kind regards,
Michael




On 27.05.14 15:50, "Francesco Chicchiriccò" <il...@apache.org> wrote:

>On 27/05/2014 15:42, Bolz, Michael wrote:
>>Hi together,
>>
>>I started to take a look into the JSON Serialization for the server use
>>case.
>>
>>Therefore I checked the "JSONEntitySerializer" in the commons package
>>and found following points which could be improved:
>>    * The common Entity (JSONEntity and AtomEntity) with the separated
>>Property and Value interfaces is complex and overloaded. Perhaps this
>>could be improved by reducing (merge?) Property and Value to a single
>>class.
>
>Value is also used for instance annotations (via Valuable), here's why
>Property and Value are separated.
>
>>Furthermore the JSONEntity and AtomEntity could be merged into a single
>>Entity.
>
>The only reason why JSONEntityImpl and JSONEntityImpl exist is for usage
>with Jackson annotations: as you can see, both barely extend
>AbstractEntity.
>
>>    * The use of the Jackson ObjectMapper (in JSON case) seems not
>>necessary. Perhaps the AbstractODataSerializer could use the
>>"JSONEntitySerializer" similar to the "AtomSerializer" (This would also
>>help in merging JSONEntity and AtomEntity by removing the @Json*
>>annotations).
>
>It seems feasible.
>
>>And following points are missing but necessary for server usage:
>>    * Use of an existing EDM for type information (instead of setting
>>and/or guessing type like in client use case)
>
>On client-side this is done at higher level, in the ODataBinder
>implementations, when an EdmEnabledODataClient instance is being used,
>as opposite of plain ODataClient.
>
>>    * Differentiation between the metadata output formats
>>"json-full/-minimal/-none"
>>
>>Based on above points I think about the creation of an own JSON
>>Serializer for the server.
>>
>>WDYT?
>
>I don't see any issue with it: only consider that besides client code,
>also the FIT static servers are using the commons (de)serializers.
>
>Regards.
>
>--
>Francesco Chicchiriccò
>
>Tirasa - Open Source Excellence
>http://www.tirasa.net/
>
>Involved at The Apache Software Foundation:
>member, Syncope PMC chair, Cocoon PMC, Olingo PMC
>http://people.apache.org/~ilgrosso/
>
>


Re: JSON serialization for server use case

Posted by "Bolz, Michael" <mi...@sap.com>.
Hi together,

with the last "commit/push" I integrated the ODataJsonSerializer into the
'tecsvc' module.

In addition all changes from the feature branch "OLINGO-317" are merged
into the "master" branch.
The further development for the serialization use cases in the server will
be in the "master" branch.
Hence, the feature branch for "OLINGO-317" is fully merged and will be
closed/removed.

As before feedback is welcome  ;o)

Commit "[OLINGO-317] Merge feature branch into master"
with ID: (45b7289f88da120e6911c60bf52ed64d753183bf)
Git Commit: http://s.apache.org/0708-Olingo-317-master or [1]
Git Branch: http://s.apache.org/Olingo-317 or [2]

Kind regards,
Michael

[1] 
https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=45b7
289f88da120e6911c60bf52ed64d753183bf
[2] 
https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=shortlog;h=re
fs/heads/Olingo-317_DeSerializerRefactoring





On 03.07.14 09:17, "Bolz, Michael" <mi...@sap.com> wrote:

>Hi together,
>
>with the last "commit/push" I added tests for the ODataJsonSerializer and
>fixed some minor issues.
>In addition the latest "master" changes are also merged into the
>OLINGO-317 feature branch.
>
>@All: I would merge this at begin of next week into the master if there
>are no objections.
>As before feedback is welcome  ;o)
>
>Commit "[OLINGO-317] Merge with current master"
>with ID: (66f26e5b6ac3e2e3dd9c69bb6f2fbbe69baee87d)
>Git Commit: http://s.apache.org/0703-Olingo-317-master or [1]
>Git Branch: http://s.apache.org/Olingo-317 or [2]
>
>Kind regards,
>Michael
>
>[1]
>https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=66f
>2
>6e5b6ac3e2e3dd9c69bb6f2fbbe69baee87d
>[2]
>https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=shortlog;h=r
>e
>fs/heads/Olingo-317_DeSerializerRefactoring
>
>

Re: JSON serialization for server use case

Posted by "Bolz, Michael" <mi...@sap.com>.
Hi together,

with the last "commit/push" I added tests for the ODataJsonSerializer and
fixed some minor issues.
In addition the latest "master" changes are also merged into the
OLINGO-317 feature branch.

@All: I would merge this at begin of next week into the master if there
are no objections.
As before feedback is welcome  ;o)

Commit "[OLINGO-317] Merge with current master"
with ID: (66f26e5b6ac3e2e3dd9c69bb6f2fbbe69baee87d)
Git Commit: http://s.apache.org/0703-Olingo-317-master or [1]
Git Branch: http://s.apache.org/Olingo-317 or [2]

Kind regards,
Michael

[1] 
https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=66f2
6e5b6ac3e2e3dd9c69bb6f2fbbe69baee87d
[2] 
https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=shortlog;h=re
fs/heads/Olingo-317_DeSerializerRefactoring


Re: JSON serialization for server use case

Posted by "Bolz, Michael" <mi...@sap.com>.
Hi Francesco,

Thanks for feedback.

I already looked at the source code and improved it.
Unfortunately in the 'AtomDeserializer' and 'ODataBinderImpl' I can only
add an 'SuppressWarning' because the cast is necessary and a refactor
would blow up the code.
If you have a better solution, I'm open to it ;o)

Kind regards,
Michael





On 30.06.14 08:29, "Francesco Chicchiriccò" <il...@apache.org> wrote:

>Hi Michael,
>I've built the master after your latest changes; everything works fine
>with Java 7; with Java 6, while the build runs successfully, I got some
>warnings:
>
>[WARNING] 
>/home/ilgrosso/work/olingo4/lib/commons-core/src/main/java/org/apache/olin
>go/commons/core/serialization/JsonDeserializer.java:[344,39]
>[unchecked] unchecked cast
>found   : java.lang.Object
>required: java.util.List<org.apache.olingo.commons.api.data.Property>
>[WARNING] 
>/home/ilgrosso/work/olingo4/lib/commons-core/src/main/java/org/apache/olin
>go/commons/core/serialization/AtomDeserializer.java:[170,109]
>[unchecked] unchecked cast
>found   : java.lang.Object
>required: java.util.List<org.apache.olingo.commons.api.data.Property>
>
>[WARNING] 
>/home/ilgrosso/work/olingo4/lib/client-core/src/main/java/org/apache/oling
>o/client/core/serialization/v4/ODataBinderImpl.java:[233,60]
>[unchecked] unchecked cast
>found   : java.lang.Object
>required: java.util.List<org.apache.olingo.commons.api.data.Property>
>
>[WARNING] 
>/home/ilgrosso/work/olingo4/ext/client-proxy/src/main/java/org/apache/olin
>go/ext/proxy/commons/ComplexInvocationHandler.java:[185,45]
>[unchecked] unchecked call to add(E) as a member of the raw type
>java.util.Collection
>
>Regards.
>
>On 30/06/2014 07:44, Bolz, Michael wrote:
>> Hi together,
>>
>> As announced I "pushed" the changes from the "Olingo-317 Feature" branch
>> into "master" branch.
>>
>> Commit "Merge branch 'master' into Olingo-317_DeSerializerRefactoring"
>> with ID: (adcf933d52425c93ce57d5f280a33b3a2c609211)
>> Git Commit: http://s.apache.org/Olingo-317-master or [1]
>> Git Branch: http://s.apache.org/Olingo-317 or [2]
>>
>> Kind regards,
>> Michael
>>
>> [1]
>> https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=
>> adcf933d52425c93ce57d5f280a33b3a2c609211
>> [2]
>> 
>>https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=shortlog;h=
>>re
>> fs/heads/Olingo-317_DeSerializerRefactoring
>>
>>
>>
>> On 27.06.14 14:46, "Bolz, Michael" <mi...@sap.com> wrote:
>>
>>> Hi together,
>>>
>>> with the last "commit/push" I refactored the 'Value' hierarchy and
>>> according classes.
>>> As result the 'Value' interface was removed and functionality was
>>>moved in
>>> 'Valuable' interface.
>>> In addition the '*Value' interfaces (and according '*Impl' classes)
>>>were
>>> also removed (except of 'LinkedComplexValue').
>>>
>>> @All: I would merge this at begin of next week into the master if
>>> there are no objections.
>>> As before feedback is welcome  ;o)
>>>
>>> Commit "[OLINGO-317] Refactoring of 'Value-classes'"
>>> with ID: (a2874142c5fb5478b96f7a0d3083ce81924a9fd2)
>>> Git Commit: http://s.apache.org/0627-Olingo-317 or [1]
>>> Git Branch: http://s.apache.org/Olingo-317 or [2]
>>>
>>> Kind regards,
>>> Michael
>>>
>>> [1]
>>> 
>>>https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=a
>>>28
>>> 7
>>> 4142c5fb5478b96f7a0d3083ce81924a9fd2
>>> [2]
>>> 
>>>"https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=shortlog;
>>>h=
>>> r
>>> efs/heads/Olingo-317_DeSerializerRefactoring"
>
>-- 
>Francesco Chicchiriccò
>
>Tirasa - Open Source Excellence
>http://www.tirasa.net/
>
>Involved at The Apache Software Foundation:
>member, Syncope PMC chair, Cocoon PMC, Olingo PMC
>http://people.apache.org/~ilgrosso/
>

Re: JSON serialization for server use case

Posted by Francesco Chicchiriccò <il...@apache.org>.
Hi Michael,
I've built the master after your latest changes; everything works fine 
with Java 7; with Java 6, while the build runs successfully, I got some 
warnings:

[WARNING] 
/home/ilgrosso/work/olingo4/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeserializer.java:[344,39] 
[unchecked] unchecked cast
found   : java.lang.Object
required: java.util.List<org.apache.olingo.commons.api.data.Property>
[WARNING] 
/home/ilgrosso/work/olingo4/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomDeserializer.java:[170,109] 
[unchecked] unchecked cast
found   : java.lang.Object
required: java.util.List<org.apache.olingo.commons.api.data.Property>

[WARNING] 
/home/ilgrosso/work/olingo4/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/v4/ODataBinderImpl.java:[233,60] 
[unchecked] unchecked cast
found   : java.lang.Object
required: java.util.List<org.apache.olingo.commons.api.data.Property>

[WARNING] 
/home/ilgrosso/work/olingo4/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexInvocationHandler.java:[185,45] 
[unchecked] unchecked call to add(E) as a member of the raw type 
java.util.Collection

Regards.

On 30/06/2014 07:44, Bolz, Michael wrote:
> Hi together,
>
> As announced I "pushed" the changes from the "Olingo-317 Feature" branch
> into "master" branch.
>
> Commit "Merge branch 'master' into Olingo-317_DeSerializerRefactoring"
> with ID: (adcf933d52425c93ce57d5f280a33b3a2c609211)
> Git Commit: http://s.apache.org/Olingo-317-master or [1]
> Git Branch: http://s.apache.org/Olingo-317 or [2]
>
> Kind regards,
> Michael
>
> [1]
> https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=
> adcf933d52425c93ce57d5f280a33b3a2c609211
> [2]
> https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=shortlog;h=re
> fs/heads/Olingo-317_DeSerializerRefactoring
>
>
>
> On 27.06.14 14:46, "Bolz, Michael" <mi...@sap.com> wrote:
>
>> Hi together,
>>
>> with the last "commit/push" I refactored the 'Value' hierarchy and
>> according classes.
>> As result the 'Value' interface was removed and functionality was moved in
>> 'Valuable' interface.
>> In addition the '*Value' interfaces (and according '*Impl' classes) were
>> also removed (except of 'LinkedComplexValue').
>>
>> @All: I would merge this at begin of next week into the master if
>> there are no objections.
>> As before feedback is welcome  ;o)
>>
>> Commit "[OLINGO-317] Refactoring of 'Value-classes'"
>> with ID: (a2874142c5fb5478b96f7a0d3083ce81924a9fd2)
>> Git Commit: http://s.apache.org/0627-Olingo-317 or [1]
>> Git Branch: http://s.apache.org/Olingo-317 or [2]
>>
>> Kind regards,
>> Michael
>>
>> [1]
>> https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=a28
>> 7
>> 4142c5fb5478b96f7a0d3083ce81924a9fd2
>> [2]
>> "https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=shortlog;h=
>> r
>> efs/heads/Olingo-317_DeSerializerRefactoring"

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/


Re: JSON serialization for server use case

Posted by "Bolz, Michael" <mi...@sap.com>.
Hi together,

As announced I "pushed" the changes from the "Olingo-317 Feature" branch
into "master" branch.

Commit "Merge branch 'master' into Olingo-317_DeSerializerRefactoring"
with ID: (adcf933d52425c93ce57d5f280a33b3a2c609211)
Git Commit: http://s.apache.org/Olingo-317-master or [1]
Git Branch: http://s.apache.org/Olingo-317 or [2]

Kind regards,
Michael

[1] 
https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=
adcf933d52425c93ce57d5f280a33b3a2c609211
[2] 
https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=shortlog;h=re
fs/heads/Olingo-317_DeSerializerRefactoring



On 27.06.14 14:46, "Bolz, Michael" <mi...@sap.com> wrote:

>Hi together,
>
>with the last "commit/push" I refactored the 'Value' hierarchy and
>according classes.
>As result the 'Value' interface was removed and functionality was moved in
>'Valuable' interface.
>In addition the '*Value' interfaces (and according '*Impl' classes) were
>also removed (except of 'LinkedComplexValue').
>
>@All: I would merge this at begin of next week into the master if
>there are no objections.
>As before feedback is welcome  ;o)
>
>Commit "[OLINGO-317] Refactoring of 'Value-classes'"
>with ID: (a2874142c5fb5478b96f7a0d3083ce81924a9fd2)
>Git Commit: http://s.apache.org/0627-Olingo-317 or [1]
>Git Branch: http://s.apache.org/Olingo-317 or [2]
>
>Kind regards,
>Michael
>
>[1] 
>https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=a28
>7
>4142c5fb5478b96f7a0d3083ce81924a9fd2
>[2] 
>"https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=shortlog;h=
>r
>efs/heads/Olingo-317_DeSerializerRefactoring"

Re: JSON serialization for server use case

Posted by "Klevenz, Stephan" <st...@sap.com>.
+1

On 27.06.14 14:46, "Bolz, Michael" <mi...@sap.com> wrote:

>@All: I would merge this at begin of next week into the master if
>there are no objections.
>


Re: JSON serialization for server use case

Posted by "Bolz, Michael" <mi...@sap.com>.
Hi together,

with the last "commit/push" I refactored the 'Value' hierarchy and
according classes.
As result the 'Value' interface was removed and functionality was moved in
'Valuable' interface.
In addition the '*Value' interfaces (and according '*Impl' classes) were
also removed (except of 'LinkedComplexValue').

@All: I would merge this at begin of next week into the master if
there are no objections.
As before feedback is welcome  ;o)

Commit "[OLINGO-317] Refactoring of 'Value-classes'"
with ID: (a2874142c5fb5478b96f7a0d3083ce81924a9fd2)
Git Commit: http://s.apache.org/0627-Olingo-317 or [1]
Git Branch: http://s.apache.org/Olingo-317 or [2]

Kind regards,
Michael

[1] 
https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=a287
4142c5fb5478b96f7a0d3083ce81924a9fd2
[2] 
"https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=shortlog;h=r
efs/heads/Olingo-317_DeSerializerRefactoring"

FW: JSON serialization for server use case

Posted by "Bolz, Michael" <mi...@sap.com>.
Hi together,

As announced last week I have done the merge of actual state of
[OLINGO-317] back into the master branch.
As always feedback is welcome ;o)

Kind regards,
Michael



On 17.06.14 15:00, "Bolz, Michael" <mi...@sap.com> wrote:

>Hi together,
>
>with the last "commit/push" I refactored the "ContentType" class and
>merged the latest master changes into the feature branch.
>
>@All: I would merge this by end of the week into the master if there are
>no objections. So take a look into and feedback is welcome  ;o)
>
>Commit "[OLINGO-317] Refactored ContentType" with ID:
>(ab6fd5e2b8b2b01731c2ba771763e6b126baa28b)
>Git Commit: 
>"https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=ab
>6
>fd5e2b8b2b01731c2ba771763e6b126baa28b"
>Git Branch: 
>"https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=shortlog;h=
>r
>efs/heads/Olingo-317_DeSerializerRefactoring"
>
>
>Kind regards,
>Michael
>

Re: JSON serialization for server use case

Posted by "Bolz, Michael" <mi...@sap.com>.
Hi together,

with the last "commit/push" I refactored the "ContentType" class and
merged the latest master changes into the feature branch.

@All: I would merge this by end of the week into the master if there are
no objections. So take a look into and feedback is welcome  ;o)

Commit "[OLINGO-317] Refactored ContentType" with ID:
(ab6fd5e2b8b2b01731c2ba771763e6b126baa28b)
Git Commit: 
"https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=ab6
fd5e2b8b2b01731c2ba771763e6b126baa28b"
Git Branch: 
"https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=shortlog;h=r
efs/heads/Olingo-317_DeSerializerRefactoring"


Kind regards,
Michael


RE: JSON serialization for server use case

Posted by "Kobler-Morris, Sven" <sv...@sap.com>.
+1 

from me 

Sven

-----Original Message-----
From: Bolz, Michael [mailto:michael.bolz@sap.com] 
Sent: Freitag, 13. Juni 2014 09:44
To: dev@olingo.apache.org
Subject: Re: JSON serialization for server use case

* PGP - S/MIME Signed by an unverified key: 13.06.2014 at 09:43:49

Hi together,

yesterday I renamed and moved some packages and classes for a more consistent naming and grouping. 

Commit "[OLINGO-317] Rename and move of some packages and classes" with ID: (b15439ffc4c5bc1dee11bea65439f905c6d1b165)
Git Commit: "https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=b15439ffc4c5bc1dee11bea65439f905c6d1b165"
Git Branch: "https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=shortlog;h=refs/heads/Olingo-317_DeSerializerRefactoring"

@All: I would like to merge this also today together with the last changes in the master (because it does not change any functionality).

WDYT?
Or there are any objections?

Kind regards,
Michael


On 12.06.2014, at 08:36, Francesco Chicchiriccò <il...@apache.org> wrote:

> On 11/06/2014 14:48, Bolz, Michael wrote:
>> Hi together,
>> 
>> it took longer then expected but a few minutes ago I finished the
>> refactoring (removed separation between ATOM/JSON Entities, introduced
>> separation between data and de/serialization and get rid of all not
>> necessary Jackson-Annotations).
>> Now all tests (also the FIT) are running.
>> Feel free to look into the changes (available at
>> "Olingo-317_DeSerializerRefactoring" branch, Commit: "[OLINGO-317]
>> Finished DeSerializer refactoring" with Id:
>> [70afb2acc50aef1270858bad75eb8dc125b08c3f]) and give feedback.
> 
> Hi Michael,
> I had a quick look at the changes and everything looks generally fine.
> 
> Side note: I had to remove a non-existing dependency from lib/serer-testsvc
> 
> https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=634d75b7993d0b4ec6221ac6b2e13e6edd9d31de
> 
>> By end of this week I would then merge the changes into the master branch
>> if there are no objections.
> 
> +1
> 
> Regards.
> 
>> On 06.06.14 14:51, "Bolz, Michael" <mi...@sap.com> wrote:
>> 
>>> Hi togehter,
>>> 
>>> for the JSON serialization for server use case I created a own branch.
>>> Currently the state is that all below "lib" compiles and tests are
>>> working.
>>> Unfortunately the tests within the "fit" currently are not completely
>>> working.
>>> But for a first look/compare/feedback all is pushed in "lib" in the branch
>>> "OLINGO-317_JSON-for-server" and I created an according feature issue in
>>> JIRA (https://issues.apache.org/jira/browse/OLINGO-317).
>>> Feel free to give feedback and therefore have a nice weekend  ;o)
>>> 
>>> Kind regards,
>>> Michael
> 
> -- 
> Francesco Chicchiriccò
> 
> Tirasa - Open Source Excellence
> http://www.tirasa.net/
> 
> Involved at The Apache Software Foundation:
> member, Syncope PMC chair, Cocoon PMC, Olingo PMC
> http://people.apache.org/~ilgrosso/
> 


* D046871 <mi...@sap.com>
* Issuer: SAP-AG - Unverified

RE: JSON serialization for server use case

Posted by "Huesken, Jens" <je...@sap.com>.
+1

-----Original Message-----
From: Bolz, Michael [mailto:michael.bolz@sap.com] 
Sent: Freitag, 13. Juni 2014 09:44
To: dev@olingo.apache.org
Subject: Re: JSON serialization for server use case

* PGP - S/MIME Signed by an unverified key: 13.06.2014 at 09:43:49

Hi together,

yesterday I renamed and moved some packages and classes for a more consistent naming and grouping. 

Commit "[OLINGO-317] Rename and move of some packages and classes" with ID: (b15439ffc4c5bc1dee11bea65439f905c6d1b165)
Git Commit: "https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=b15439ffc4c5bc1dee11bea65439f905c6d1b165"
Git Branch: "https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=shortlog;h=refs/heads/Olingo-317_DeSerializerRefactoring"

@All: I would like to merge this also today together with the last changes in the master (because it does not change any functionality).

WDYT?
Or there are any objections?

Kind regards,
Michael


On 12.06.2014, at 08:36, Francesco Chicchiriccò <il...@apache.org> wrote:

> On 11/06/2014 14:48, Bolz, Michael wrote:
>> Hi together,
>> 
>> it took longer then expected but a few minutes ago I finished the
>> refactoring (removed separation between ATOM/JSON Entities, introduced
>> separation between data and de/serialization and get rid of all not
>> necessary Jackson-Annotations).
>> Now all tests (also the FIT) are running.
>> Feel free to look into the changes (available at
>> "Olingo-317_DeSerializerRefactoring" branch, Commit: "[OLINGO-317]
>> Finished DeSerializer refactoring" with Id:
>> [70afb2acc50aef1270858bad75eb8dc125b08c3f]) and give feedback.
> 
> Hi Michael,
> I had a quick look at the changes and everything looks generally fine.
> 
> Side note: I had to remove a non-existing dependency from lib/serer-testsvc
> 
> https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=634d75b7993d0b4ec6221ac6b2e13e6edd9d31de
> 
>> By end of this week I would then merge the changes into the master branch
>> if there are no objections.
> 
> +1
> 
> Regards.
> 
>> On 06.06.14 14:51, "Bolz, Michael" <mi...@sap.com> wrote:
>> 
>>> Hi togehter,
>>> 
>>> for the JSON serialization for server use case I created a own branch.
>>> Currently the state is that all below "lib" compiles and tests are
>>> working.
>>> Unfortunately the tests within the "fit" currently are not completely
>>> working.
>>> But for a first look/compare/feedback all is pushed in "lib" in the branch
>>> "OLINGO-317_JSON-for-server" and I created an according feature issue in
>>> JIRA (https://issues.apache.org/jira/browse/OLINGO-317).
>>> Feel free to give feedback and therefore have a nice weekend  ;o)
>>> 
>>> Kind regards,
>>> Michael
> 
> -- 
> Francesco Chicchiriccò
> 
> Tirasa - Open Source Excellence
> http://www.tirasa.net/
> 
> Involved at The Apache Software Foundation:
> member, Syncope PMC chair, Cocoon PMC, Olingo PMC
> http://people.apache.org/~ilgrosso/
> 


* D046871 <mi...@sap.com>
* Issuer: SAP-AG - Unverified

Re: JSON serialization for server use case

Posted by "Bolz, Michael" <mi...@sap.com>.
Hi together,

yesterday I renamed and moved some packages and classes for a more consistent naming and grouping. 

Commit "[OLINGO-317] Rename and move of some packages and classes" with ID: (b15439ffc4c5bc1dee11bea65439f905c6d1b165)
Git Commit: "https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=b15439ffc4c5bc1dee11bea65439f905c6d1b165"
Git Branch: "https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=shortlog;h=refs/heads/Olingo-317_DeSerializerRefactoring"

@All: I would like to merge this also today together with the last changes in the master (because it does not change any functionality).

WDYT?
Or there are any objections?

Kind regards,
Michael


On 12.06.2014, at 08:36, Francesco Chicchiriccò <il...@apache.org> wrote:

> On 11/06/2014 14:48, Bolz, Michael wrote:
>> Hi together,
>> 
>> it took longer then expected but a few minutes ago I finished the
>> refactoring (removed separation between ATOM/JSON Entities, introduced
>> separation between data and de/serialization and get rid of all not
>> necessary Jackson-Annotations).
>> Now all tests (also the FIT) are running.
>> Feel free to look into the changes (available at
>> "Olingo-317_DeSerializerRefactoring" branch, Commit: "[OLINGO-317]
>> Finished DeSerializer refactoring" with Id:
>> [70afb2acc50aef1270858bad75eb8dc125b08c3f]) and give feedback.
> 
> Hi Michael,
> I had a quick look at the changes and everything looks generally fine.
> 
> Side note: I had to remove a non-existing dependency from lib/serer-testsvc
> 
> https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=634d75b7993d0b4ec6221ac6b2e13e6edd9d31de
> 
>> By end of this week I would then merge the changes into the master branch
>> if there are no objections.
> 
> +1
> 
> Regards.
> 
>> On 06.06.14 14:51, "Bolz, Michael" <mi...@sap.com> wrote:
>> 
>>> Hi togehter,
>>> 
>>> for the JSON serialization for server use case I created a own branch.
>>> Currently the state is that all below "lib" compiles and tests are
>>> working.
>>> Unfortunately the tests within the "fit" currently are not completely
>>> working.
>>> But for a first look/compare/feedback all is pushed in "lib" in the branch
>>> "OLINGO-317_JSON-for-server" and I created an according feature issue in
>>> JIRA (https://issues.apache.org/jira/browse/OLINGO-317).
>>> Feel free to give feedback and therefore have a nice weekend  ;o)
>>> 
>>> Kind regards,
>>> Michael
> 
> -- 
> Francesco Chicchiriccò
> 
> Tirasa - Open Source Excellence
> http://www.tirasa.net/
> 
> Involved at The Apache Software Foundation:
> member, Syncope PMC chair, Cocoon PMC, Olingo PMC
> http://people.apache.org/~ilgrosso/
> 


Re: JSON serialization for server use case

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 11/06/2014 14:48, Bolz, Michael wrote:
> Hi together,
>
> it took longer then expected but a few minutes ago I finished the
> refactoring (removed separation between ATOM/JSON Entities, introduced
> separation between data and de/serialization and get rid of all not
> necessary Jackson-Annotations).
> Now all tests (also the FIT) are running.
> Feel free to look into the changes (available at
> "Olingo-317_DeSerializerRefactoring" branch, Commit: "[OLINGO-317]
> Finished DeSerializer refactoring" with Id:
> [70afb2acc50aef1270858bad75eb8dc125b08c3f]) and give feedback.

Hi Michael,
I had a quick look at the changes and everything looks generally fine.

Side note: I had to remove a non-existing dependency from lib/serer-testsvc

https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=634d75b7993d0b4ec6221ac6b2e13e6edd9d31de

> By end of this week I would then merge the changes into the master branch
> if there are no objections.

+1

Regards.

> On 06.06.14 14:51, "Bolz, Michael" <mi...@sap.com> wrote:
>
>> Hi togehter,
>>
>> for the JSON serialization for server use case I created a own branch.
>> Currently the state is that all below "lib" compiles and tests are
>> working.
>> Unfortunately the tests within the "fit" currently are not completely
>> working.
>> But for a first look/compare/feedback all is pushed in "lib" in the branch
>> "OLINGO-317_JSON-for-server" and I created an according feature issue in
>> JIRA (https://issues.apache.org/jira/browse/OLINGO-317).
>> Feel free to give feedback and therefore have a nice weekend  ;o)
>>
>> Kind regards,
>> Michael

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/


Re: JSON serialization for server use case

Posted by "Bolz, Michael" <mi...@sap.com>.
Hi together,

it took longer then expected but a few minutes ago I finished the
refactoring (removed separation between ATOM/JSON Entities, introduced
separation between data and de/serialization and get rid of all not
necessary Jackson-Annotations).
Now all tests (also the FIT) are running.
Feel free to look into the changes (available at
"Olingo-317_DeSerializerRefactoring" branch, Commit: "[OLINGO-317]
Finished DeSerializer refactoring" with Id:
[70afb2acc50aef1270858bad75eb8dc125b08c3f]) and give feedback.
By end of this week I would then merge the changes into the master branch
if there are no objections.

Kind regards,
Michael





On 06.06.14 14:51, "Bolz, Michael" <mi...@sap.com> wrote:

>Hi togehter,
>
>for the JSON serialization for server use case I created a own branch.
>Currently the state is that all below "lib" compiles and tests are
>working.
>Unfortunately the tests within the "fit" currently are not completely
>working.
>But for a first look/compare/feedback all is pushed in "lib" in the branch
>"OLINGO-317_JSON-for-server" and I created an according feature issue in
>JIRA (https://issues.apache.org/jira/browse/OLINGO-317).
>Feel free to give feedback and therefore have a nice weekend  ;o)
>
>Kind regards,
>Michael 

Re: JSON serialization for server use case

Posted by "Bolz, Michael" <mi...@sap.com>.
Hi togehter,

for the JSON serialization for server use case I created a own branch.
Currently the state is that all below "lib" compiles and tests are working.
Unfortunately the tests within the "fit" currently are not completely
working.
But for a first look/compare/feedback all is pushed in "lib" in the branch
"OLINGO-317_JSON-for-server" and I created an according feature issue in
JIRA (https://issues.apache.org/jira/browse/OLINGO-317).
Feel free to give feedback and therefore have a nice weekend  ;o)

Kind regards,
Michael 

Re: JSON serialization for server use case

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 03/06/2014 10:48, Bolz, Michael wrote:
> Hi together,
>
>>> * Furthermore the JSONEntity and AtomEntity could be merged into a
>>> single Entity.
>> The only reason why JSONEntityImpl and JSONEntityImpl exist is for usage
> with Jackson annotations: as you can see, both barely extend
> AbstractEntity.
>
>>> * The use of the Jackson ObjectMapper (in JSON case) seems not
>>> necessary. Perhaps the AbstractODataSerializer could use the
>>> "JSONEntitySerializer" similar to the "AtomSerializer" (This would also
>>> help in merging JSONEntity and AtomEntity by removing the @Json*
>>> annotations).
>> It seems feasible.
> After feedback from Francesco I started with above change but
> unfortunately it took more time then expected.
> I'am currently in a state in which the common and server parts are changed
> (it compiles) but now a lot (client) tests fails because of the changes.
>
> Hence I started with also making changes in the "*Deserialization" parts
> to get all work again.
> @Francesco: I hope this is no problem for you if with this changes also
> some "client" parts are refactored?

As long as all unit tests and integration tests under fit still succeed, 
no problems at all.
I would also say that any API change should be prior discussed, instead.

> I think I will create a "feature/refactore" branch and push all changes as
> soon I have a presentable state.

+1

> If this is done I write here and ask for more feedback  ;o)

Fine.

Regards.

> On 27.05.14 15:50, "Francesco Chicchiriccò" <il...@apache.org> wrote:
>
>> On 27/05/2014 15:42, Bolz, Michael wrote:
>>> Hi together,
>>>
>>> I started to take a look into the JSON Serialization for the server use
>>> case.
>>>
>>> Therefore I checked the "JSONEntitySerializer" in the commons package
>>> and found following points which could be improved:
>>>     * The common Entity (JSONEntity and AtomEntity) with the separated
>>> Property and Value interfaces is complex and overloaded. Perhaps this
>>> could be improved by reducing (merge?) Property and Value to a single
>>> class.
>> Value is also used for instance annotations (via Valuable), here's why
>> Property and Value are separated.
>>
>>> Furthermore the JSONEntity and AtomEntity could be merged into a single
>>> Entity.
>> The only reason why JSONEntityImpl and JSONEntityImpl exist is for usage
>> with Jackson annotations: as you can see, both barely extend
>> AbstractEntity.
>>
>>>     * The use of the Jackson ObjectMapper (in JSON case) seems not
>>> necessary. Perhaps the AbstractODataSerializer could use the
>>> "JSONEntitySerializer" similar to the "AtomSerializer" (This would also
>>> help in merging JSONEntity and AtomEntity by removing the @Json*
>>> annotations).
>> It seems feasible.
>>
>>> And following points are missing but necessary for server usage:
>>>     * Use of an existing EDM for type information (instead of setting
>>> and/or guessing type like in client use case)
>> On client-side this is done at higher level, in the ODataBinder
>> implementations, when an EdmEnabledODataClient instance is being used,
>> as opposite of plain ODataClient.
>>
>>>     * Differentiation between the metadata output formats
>>> "json-full/-minimal/-none"
>>>
>>> Based on above points I think about the creation of an own JSON
>>> Serializer for the server.
>>>
>>> WDYT?
>> I don't see any issue with it: only consider that besides client code,
>> also the FIT static servers are using the commons (de)serializers.
>>
>> Regards.

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/