Re: Possible bug in Calendar



Lew wrote:
Arne Vajhøj wrote:
No. That about "core business-logic classes" is just something you
brought into the discussion late.

And BTW it is not even correct. Some types of business logic requires
Calendar knowledge.

No, YOU are not even correct. I don't consider Calendar manipulations (other than just Date building) to be "business logic" any more than I consider using Collator to sort something on its way to being displayed in the UI to be "business logic". It's part of the interface layer. The business logic only knows from "milliseconds since the epoch" and, perhaps, the translations of same into Gregorian dates in (preferably) UTC+0000.

Case in point: I'm on the programming staff of a multi-million-dollar Java EE project involving electronic documents (XML, among other things) sent to a central location from all over the world. java.util.Calendar is essential to that project to coordinate the various time zones involved, including business rules as to due dates, intervals between document submissions and the like.

That is not a "case in point". Locale-specific rules may be involved in providing the localized user interfaces, including selection of which business rules to apply, but in the core logic classes I *hope* your Dates are all represented in one particular time base and that when the chosen business rules say "x is three days after y" it just adds 3*86400*1000ms to some number somewhere under the hood.

If a Locale determines whether that parameter is "three" or "five" or some other number, that doesn't matter. It's still (I hope!) happening in a layer not far beneath the UI layer.

Because if you've got mixed time-zones (or worse) in the core data representations you've got big trouble on the way.

Calendar is most assuredly a core business-logic class for that project.

No. See above.
.



Relevant Pages

  • Re: Possible bug in Calendar
    ... java.util.Calendar is essential to that project to coordinate the various time zones involved, including business rules as to due dates, intervals between document submissions and the like. ... providing the localized user interfaces, including selection of which business rules to apply, but in the core logic classes I *hope* your Dates are all represented in one particular time base and that when the chosen business rules say "x is three days after y" it just adds 3*86400*1000ms to some number somewhere under the hood. ... It's still happening in a layer not far beneath the UI layer. ... Because if you've got mixed time-zones in the core data representations you've got big trouble on the way. ...
    (comp.lang.java.programmer)
  • Re: Domain Model and Service Layer
    ... First I have a hard time reading the responses using the new Google's ... Services layer also known as application layer is a layer above domain ... the answer to your original question is to place the ... business rules live in the app layer. ...
    (comp.object)
  • Re: Biz Modeling - lets try again
    ... then people try to put it in one layer or place and argue about where ... Expert systems can apply complex business rules. ... "if parent has kids, disallow deletion of parent". ... and GUI business rules in the GUI. ...
    (comp.object)
  • Re: Biz Modeling - lets try again
    ... then people try to put it in one layer or place and argue about where ... Expert systems can apply complex business rules. ... "if parent has kids, disallow deletion of parent". ... and GUI business rules in the GUI. ...
    (comp.object)