Em Tue, 15 Dec 2009 03:43:19 -0200, Kalle Korhonen
<kalle.o.korho...@gmail.com> escreveu:
That's just a typical overengineered design
(http://en.wikipedia.org/wiki/Overengineering).
What's overengineering for one can be fine for another and even
underengineering for a thir person. :)
My point is that different people have different ideas for what is the
right approach. Each one of them will have pros and cons. The best balance
is not something that has a single correct answer. That's why I named my
company Ars Machina (Latin for art of the machine): in software
development, there are always a number of different ways to do the same
thing and the art lies in the choices we make. ;)
You've changed
languages and the hell has frozen many times over before you change
your persistence layer *if* you started with a relational database.
You're right, but having DAOs defined as interfaces surely help to write
unit tests. ;) Using Tapestry-IoC, it's easy to decorate or advise
services based in interfaces.
Surely transaction management is none of domain model's business, but
if you can represent a pure business rule in your domain model, why
not?
I agree, as long as the object can do it just by looking at its fields and
fields's fields and so on. But that's just my personal choice, of course.
You are not going to use that business logic anywhere else
anyway. Exactly how many layers of indirection do there need to be?
To me, 2 is adequate for the majority of applications (business rules and
persistence). :)
Most of the Java applications today are way over-engineered for their
purpose - while RoR and php folks are running circles around us.
AFAIK, PHP development has a large tendency to write spaghetti code. The
RoR people seem to me to get a better balance, but the language is very
different (dynamic typed vs static typed), so I'm not comfortable to
compare it directly with Java.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da
Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org