Re: Possible bug in Calendar
- From: Harold Yarmouth <hyarmouth991476@xxxxxxxxxxx>
- Date: Tue, 11 Nov 2008 04:09:30 -0500
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.
.
- Follow-Ups:
- Re: Possible bug in Calendar
- From: Arne Vajhøj
- Re: Possible bug in Calendar
- References:
- Re: Possible bug in Calendar
- From: Harold Yarmouth
- Re: Possible bug in Calendar
- From: Arne Vajhøj
- Re: Possible bug in Calendar
- From: Harold Yarmouth
- Re: Possible bug in Calendar
- From: Arne Vajhøj
- Re: Possible bug in Calendar
- From: Lew
- Re: Possible bug in Calendar
- Prev by Date: Re: Possible bug in Calendar
- Next by Date: Re: Possible bug in Calendar
- Previous by thread: Re: Possible bug in Calendar
- Next by thread: Re: Possible bug in Calendar
- Index(es):
Relevant Pages
|