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. - The usecase polymorphism approach would use inheritance rather than delegation, and this is not a desirable development. Nobody seems to have found a reasonable solution yet, so the interface is still there but deprecated. Any ideas are greatly appreciated :) -- Andreas [1] http://c2.com/cgi/wiki?MagicContainer -- 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]
