Robert Burrell Donkin ha scritto:
i think that it should be possible to remove the singletons by two
independent refactorings:

 * Separating configuration concerns using the factory pattern

Do you mean having a factory to generate all of the services needed by a script parsing process and then have services injected or injecting service factories to each component?

 * Separating state concerns using a context

We already use "Context" for SieveContext that is a script level context. Maybe "Session" is a better term for a script execution context.

Maybe both ConditionManager and CommandStateManager "states" can be moved to a simple SieveSession (or simply Session) object and the SieveSession could even expose generic set/get properties to allow simpler extensibility (new commands would not depend on improvements in the core session object).

opinions welcomed

unless anyone jumps in soon, i'll take a shot at committing a first
draft sometime soon. a postumous review phase will probably be needed.

ATM it is almost impossible to make a dependency graph for jsieve because components are too much interconnected and there are too many cycles between packages and classes.

E.g: IMHO there is no clean separation between parsing and running scripts. I hope to be able to do some reorganization of the code/packages once you will have refactored it.

Stefano

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to