Re: How to design static master data in ddd

"Caleb Cushing [email protected] [domaindrivendesign]" <[email protected]> Tue, 26 Jan 2016 19:50:54 +0000
Newsgroups gmane.comp.programming.domain-driven-design
Message-ID <CAAHKNRHfbCHzJ7tWcxC70i-y+71XJw71E_7n1EEYQwoerpQ_Qg@mail.gmail.com>
--001a11c3ac266d13ec052a420181
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

As described this could safely be a singleton/flyweight so I'd say it's a
value object.

however you might ask yourself in this case if you're only wanting to deal
with american holidays? just holidays your company observes and other major
holidays? federal holidays? do you need to distinguish between a paid
holiday, holiday everyone has off, and overtime available holiday? etc.

On Tue, Jan 26, 2016 at 11:48 AM [email protected] [domaindrivendesign] <
[email protected]> wrote:

>
>
> Hi
>
> I have to design a static holiday calendar. That data get imported on DB
> level.
>
> In the application i like to do a call like
>
> Collection<Holidays> holidaysBetween(LocalDate from, LocalDate to)
>
> The Holiday class has only two attributes. LocalDate and a boolean.
>
>
> Is the Holiday a Aggregate? I could be a ValueObject. How do you handle
> static master data in DDD?
>
> thanks
>
>
>
>
>=20
>
--=20
Caleb Cushing

http://xenoterracide.com

--001a11c3ac266d13ec052a420181
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit





<head>

<style type="text/css">
<!--

/* start of attachment style */
       .ygrp-photo-title{
         clear: both;
         font-size: smaller;
         height: 15px;
         overflow: hidden;
         text-align: center;
         width: 75px;
       }
       div.ygrp-photo{
         background-position: center;
         background-repeat: no-repeat;
         background-color: white;
         border: 1px solid black;
         height: 62px;
         width: 62px;
       }

       div.photo-title 
         a,
         div.photo-title a:active,
         div.photo-title a:hover,
         div.photo-title a:visited {
           text-decoration: none; 
       }

       div.attach-table div.attach-row {
         clear: both;
       }

       div.attach-table div.attach-row div {
         float: left;
         /* margin: 2px;*/
       }

       p {
         clear: both;
         padding: 15px 0 3px 0;
	 overflow: hidden;
       }

       div.ygrp-file {
         width: 30px;
         valign: middle;
       }
       div.attach-table div.attach-row div div a {
         text-decoration: none;
       }

       div.attach-table div.attach-row div div span {
         font-weight: normal;
       }

       div.ygrp-file-title {
         font-weight: bold;
       }
 /* end of attachment style */
        -->
        </style>
        </head>
<html>
<head>
<style type="text/css">
<!--
#ygrp-mkp {
  border: 1px solid #d8d8d8;
  font-family: Arial;
  margin: 10px 0;
  padding: 0 10px;
}

#ygrp-mkp hr {
  border: 1px solid #d8d8d8;
}

#ygrp-mkp #hd {
  color: #628c2a;
  font-size: 85%;
  font-weight: 700;
  line-height: 122%;
  margin: 10px 0;
}

#ygrp-mkp #ads {
  margin-bottom: 10px;
}

#ygrp-mkp .ad {
  padding: 0 0;
}

#ygrp-mkp .ad p {
  margin: 0;
}

#ygrp-mkp .ad a {
  color: #0000ff;
  text-decoration: none;
}
-->
</style>
</head>
<body>



<!-- |**|begin egp html banner|**| -->

<br><br>

<!-- |**|end egp html banner|**| -->


<div dir="ltr">As described this could safely be a singleton/flyweight so I&#39;d say it&#39;s a value object.<div><br></div><div>however you might ask yourself in this case if you&#39;re only wanting to deal with american holidays? just holidays your company observes and other major holidays? federal holidays? do you need to distinguish between a paid holiday, holiday everyone has off, and overtime available holiday? etc.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jan 26, 2016 at 11:48 AM <a href="mailto:[email protected]">[email protected]</a> [domaindrivendesign] &lt;<a href="mailto:[email protected]">[email protected]</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-le
 ft:1ex">






        




<div>





<br><br>




Hi<br><br>I have to design a static holiday calendar. That data get imported on DB level. <br><br>In the application i like to do a call like<br><br>Collection&lt;Holidays&gt; holidaysBetween(LocalDate from, LocalDate to)<br><br>The Holiday class has only two attributes. LocalDate and a boolean.<br><br><br>Is the Holiday a Aggregate? I could be a ValueObject. How do you handle static master data in DDD?<br><br>thanks<br><p><span><br></span></p>





<br>


<br>




<div width="1" style="color:white;clear:both"></div>



</blockquote></div><div dir="ltr">-- <br></div><div dir="ltr">Caleb Cushing<div><br></div><div><a href="http://xenoterracide.com">http://xenoterracide.com</a></div></div>




<!-- |**|begin egp html banner|**| -->

<br>


<br>

<!-- |**|end egp html banner|**| -->


<div width="1" style="color: white; clear: both;"/>__._,_.___</div>

      
  

    
    <div id="fromDMARC" style="clear:both; margin-top: 10px;">
         <hr style="height:2px ; border-width:0; color:#E3E3E3; background-color:#E3E3E3;">
         Posted by: Caleb Cushing &lt;[email protected]&gt;         <hr style="height:2px ; border-width:0; color:#E3E3E3; background-color:#E3E3E3;">
    </div>
<!-- Start Recommendations -->
<!-- End Recommendations -->



<!-- |**|begin egp html banner|**| -->

  <img src="http://geo.yahoo.com/serv?s=97476590/grpId=8116923/grpspId=1705007181/msgId=24734/stime=1453837865" width="1" height="1"> <br>

<!-- |**|end egp html banner|**| -->

  
<!-- |**|begin egp html banner|**| -->

<br>



   
     
 
        <!-- |**|begin egp html banner|**| -->
        <div id="ygrp-vital" style="background-color: #f2f2f2; font-family: Verdana; font-size: 10px; margin-bottom: 10px; padding: 10px;">

        <span id="vithd" style="font-weight: bold; color: #333; text-transform: uppercase; "><a href="https://groups.yahoo.com/neo/groups/domaindrivendesign/info;_ylc=X3oDMTJlbHY1dWwxBF9TAzk3MzU5NzE0BGdycElkAzgxMTY5MjMEZ3Jwc3BJZAMxNzA1MDA3MTgxBHNlYwN2dGwEc2xrA3ZnaHAEc3RpbWUDMTQ1MzgzNzg2NQ--" style="text-decoration: none;">Visit Your Group</a></span>

     <ul style="list-style-type: none; margin: 0; padding: 0; display: inline;">
            <li style="border-right: 1px solid #000; font-weight: 700; display: inline; padding: 0 5px; margin-left: 0;">
      <span class="cat"><a href="https://groups.yahoo.com/neo/groups/domaindrivendesign/members/all;_ylc=X3oDMTJmZDZ0NTZkBF9TAzk3MzU5NzE0BGdycElkAzgxMTY5MjMEZ3Jwc3BJZAMxNzA1MDA3MTgxBHNlYwN2dGwEc2xrA3ZtYnJzBHN0aW1lAzE0NTM4Mzc4NjU-" style="text-decoration: none;">New Members</a></span>
      <span class="ct" style="color: #ff7900;">2</span>
    </li>
                                              </ul>
  </div>


<div id="ft" style="font-family: Arial; font-size: 11px; margin-top: 5px; padding: 0 2px 0 0; clear: both;">
  <a href="https://groups.yahoo.com/neo;_ylc=X3oDMTJkMGMwMzBwBF9TAzk3NDc2NTkwBGdycElkAzgxMTY5MjMEZ3Jwc3BJZAMxNzA1MDA3MTgxBHNlYwNmdHIEc2xrA2dmcARzdGltZQMxNDUzODM3ODY1" style="float: left;"><img src="http://l.yimg.com/ru/static/images/yg/img/email/new_logo/logo-groups-137x15.png" height="15" width="137" alt="Yahoo! Groups" style="border: 0;"/></a>
  <div style="color: #747575; float: right;"> &bull; <a href="https://info.yahoo.com/privacy/us/yahoo/groups/details.html" style="text-decoration: none;">Privacy</a> &bull; <a href="mailto:[email protected]?subject=Unsubscribe" style="text-decoration: none;">Unsubscribe</a> &bull; <a href="https://info.yahoo.com/legal/us/yahoo/utos/terms/" style="text-decoration: none;">Terms of Use</a> </div>
</div>

<!-- |**|end egp html banner|**| -->

  </div> <!-- ygrp-msg -->

   


  <br>

<!-- |**|end egp html banner|**| -->


<div style="color: white; clear: both;"/>__,_._,___</div>
</body>

</html>

--001a11c3ac266d13ec052a420181--