← Back to team overview

slub.team team mailing list archive

Re: [Merge] lp:~zeutschel/goobi-production/extended-jersey-api into lp:goobi-production

 

Review: Needs Fixing

Preamble: "Blueprint" for the API implementation was this IBM article: http://www.ibm.com/developerworks/web/library/wa-aj-tomcat/

> Imho, the specification linked doesn’t say that java objects to be processed
> by Jaxb must conform to the javabeans specification. 
True, but we are dealing with data model elements here anyway, which in a Java sense, are beans. The only rationale for creating the org.goobi.webapi.beans package is that original Goobi "beans" are not implemented as JavaBeans at all.

> To prevent
> misunderstanding and to prevent the Goobi source code from being blowed up
> with unused functionality I removed the unused code again and renamed the
> package ‘beans’ into ‘elements’; because it contains classes representing XML
> elements in some ways, but there is no need that these classes are beans.
I actually don't know, what functionality Jersey expects from serialization classes. But: setter and getter methods are more of a symptom of Java language verbosity than unused code. We should not fall into the bad habit of suppressing compiler warnings just for convenience!

> 
> If you do not at all agree with this, you may also merge revision 121 of the
> branch which provides the unused code, but I really would like to discourage
> this.
Hm, this is hard to do now. If I cannot just merge your branch, I would have to cherry-pick your changes in a separate personal branch to include all the code needed.

My proposal:

1- Just include the setter and getter methods again. 
2- Do not move classes to elements package but implement them as JavaBeans.
3- Move all data retrieval logic to seprate DAO classes and place them in org.goobi.webapi.dao.
4- Do not load and deserialize every process object in order to find templates and related projects! This uses up far too much resources and processing time. Instead, use the proper Hibernate criteria API (have a look at org.goobi.webapi.dao.GoobiProcessDAO).
-- 
https://code.launchpad.net/~zeutschel/goobi-production/extended-jersey-api/+merge/133905
Your team Saxon State Library Team is subscribed to branch lp:goobi-production.


References