<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://pkp.sfu.ca/bugzilla/bugzilla.dtd">

<bugzilla version="4.2.5+"
          urlbase="http://pkp.sfu.ca/bugzilla/"
          
          maintainer="pkp-hosted@sfu.ca"
>

    <bug>
          <bug_id>5912</bug_id>
          
          <creation_ts>2010-09-20 09:35:00 -0700</creation_ts>
          <short_desc>Monograph value object contains references to DAOs</short_desc>
          <delta_ts>2010-11-02 15:40:56 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>OMP</product>
          <component>General</component>
          <version>1.0</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>5231</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="jerico">jerico.dev</reporter>
          <assigned_to name="PKP Support">pkp-support</assigned_to>
          <cc>mattcrider</cc>
          
          

      

      

      

          <long_desc isprivate="0">
            <commentid>21164</commentid>
            <who name="jerico">jerico.dev</who>
            <bug_when>2010-09-20 09:35:37 -0700</bug_when>
            <thetext>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?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>21165</commentid>
            <who name="jerico">jerico.dev</who>
            <bug_when>2010-09-20 09:38:46 -0700</bug_when>
            <thetext>Same for getAuthors() and getPrimaryAuthor().</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>21169</commentid>
            <who name="jerico">jerico.dev</who>
            <bug_when>2010-09-20 10:20:27 -0700</bug_when>
            <thetext>Please also see #5913 for the author accessors.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>21555</commentid>
            <who name="Matthew Crider">mattcrider</who>
            <bug_when>2010-10-08 11:00:18 -0700</bug_when>
            <thetext>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&apos;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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>21563</commentid>
            <who name="jerico">jerico.dev</who>
            <bug_when>2010-10-08 15:45:37 -0700</bug_when>
            <thetext>Thanks Matt, that makes sense to me. And yes, agreed, we can discuss that in 5231.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>21897</commentid>
            <who name="jerico">jerico.dev</who>
            <bug_when>2010-11-02 15:40:56 -0700</bug_when>
            <thetext>

*** This bug has been marked as a duplicate of bug 5231 ***</thetext>
          </long_desc>
      
      

    </bug>

</bugzilla>