Arne said:
Because it is not presentation.
Who said it was presentation? I said it was not core logic. It just so
happens to belong in between those two layers.
Arne, we can add another to the list of your fallacies now -- false
dichotomy.
You do not put logic about when to do what in the PL.
No, you put universal (possibly parametrized) such logic in the core and
supply non-universal logic to the core through injection. You don't put
the latter directly in the core, though.
Knowing the length of a week is not a presentation thing.
I never said it was. I said it would be passed down from a higher layer.
You made an assumption about which layer that was.
Why do you think it is called Business Logic ?
Don't change the subject. What do you think you are, anyway, a
therapist? Turning everything around into a question to ask me is not a
proper way to discuss an objective and empirical field like computer
programming.
Oh - and layering has nothing to do with OOP
It has everything to do with OOP; it's part of program structure and one
part of abstraction and encapsulation. Abstraction and encapsulation are
pretty much the beating heart of OOP.
NO. I HAVE MISUNDERSTOOD NOTHING. YOU HAVE MISUNDERSTOOD EVERYTHING --
OOP, ENGLISH, JAVA, AND ME. PLEASE DO NOT SPEAK FROM YOUR IGNORANCE ON
ANY OF THESE TOPICS AGAIN!
That is one of the core things in BLL.
No. Again you misunderstand the purpose of the layers. The core logic of
the program is not things like "when one particular branch does
payroll", it's things like "how to do payroll in general".
If we did things your way, every branch would need its own payroll
system designed from scratch, with no code reuse! The branch-specific
rules would be mixed in with the universal how-tos of the code's job,
instead of being in a separate place that's referenced by the core code.
The proper way allows the payroll systems of the various branches to be
largely identical, except for a few branch-dependent objects,
..properties files, and what-not.
BLL does some of these things, but it is really not what BLL is
about.
The above is core things in DAL and utility classes.
We are talking past each other. You're using different names to refer to
things, and then you think that I said something incorrect about layer X
when I was really saying something correct about layer Y.
Let's break it down, shall we, so that we're all on the same page?
UI layer -- what you seem to be calling PL
Abstraction layer -- what you seem to be calling BLL
Core logic/BLL -- what you seem not to be calling anything coherent
I/O and Utils -- what you seem to be calling DAL
Library code -- Streams, HashMap, etc. (but some library code used at
every layer, especially String, Date, and collections).
With that said:
UI layer -- displays payroll reports or whatever
Abstraction layer -- wraps collections in Models for UI, provides
locale-dependent/branch-dependent business objects
such as has getNextPayrollDueDate().
Core -- knows how to do payroll, decides when from injected objects or
payroll routine only called then by abstraction layer
I/O and Utils -- actually generates the paycheques or whatever, and
manages accounting, employees, etc. tables in DB
If you still have some disagreement with the above design, be sure to
let me know. If you don't, then let this entire subject drop, as there
is nothing going on here except for a misunderstanding on your part.