PKP Bugzilla – Bug 5912
Monograph value object contains references to DAOs
Last modified: 2010-11-02 15:40:56 PDT
We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.
The signoff-related accessors in the Monograph object instantiate DAOs and access data in the database. We usually implement application objects as simple value objects and let them be populated by the DAO. So usually the DAOs populate the application objects while the application objects remain unaware of the DAO. (See the classical GoF DAO pattern).
If these fields have an important performance impact when populated or cannot be populated in all circumstances then we usually design subclasses with these accessors to be used when use-cases require the extra fields while leaving the base Monograph class alone, see the many Submission derivatives for examples.
What are the reasons for parting from the DAO pattern in Monograph?
Same for getAuthors() and getPrimaryAuthor().
Please also see #5913 for the author accessors.
These are convenience functions, there mostly because authors used to be stored in the Monograph object as an array, but are now handled completely in the AuthorDAO (though there was really no reason to maintain backwards-compatibility there, since there is no backwards in OMP). I'm tempted to keep these methods in the Article and Paper classes to maintain backwards-compatibility though. Lets close this bug and continue any discussion in bug 5231.
Thanks Matt, that makes sense to me. And yes, agreed, we can discuss that in 5231.
*** This bug has been marked as a duplicate of bug 5231 ***