Andreas Hartmann wrote:
Michael Ralston wrote:
I'm wondering why the NodeCreatorInterface is deprecated and how one
should go about creating Documents without using it?
The interface is deprecated because it suffers from the MagicContainer
antipattern [1]. It is even imposed on the DocumentManager.add() method,
actually this method should be deprecated as well.
According to an early idea, the NodeCreatorInterface should be replaced
by post-processing of the created document in the corresponding "create"
usecase.
But there are some difficulties:
- Until now, Lenya doesn't support usecase polymorphism based on
resource types, that's why we couldn't remove the interface yet.
BTW, even that wouldn't help, because the creating process would depend
on the resource type of the resulting document and not on the resource
type of the document the usecase was called on (this wouldn't even have
to be a document).
-- Andreas
--
Andreas Hartmann
Wyona Inc. - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
[EMAIL PROTECTED] [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]