Antonio Petrelli wrote:
David H. DeWolf ha scritto:
3 DefinitionsManager - cache definitions, resolve dependencies, manage localization.

It seems that it is ComponentDefinitions renamed. Or not?

Well, I almost went there, but I don't think it is. The difference is that currently ComponentDefinitions is an implementation detail of the factory. While I don't have a problem if it remains one, I do think that:

1) caching
2) inheritence resolution

should be moved outside of the factory so that those features can be reused by components that are not "created" by the factory.



The benefit of this is:
1) Allows us to support more than one factory - if we decide to down the road that it would be beneficial. A use case for this may be a system which provides defaults in the tiles-defs.xml and allows users to create other definitions through the interface which are subsequently stored in the database.

There was a similar feature in Struts-Tiles, called FactorySet, that linked one DefinitionsFactory to a key and supporting multiple keys. Dimensions for Struts-Tiles leverages this feature, while Dimensions for Tiles 2 uses only DefinitionsFactory. In particular, Dimensions uses a hierarchical default levels, e.g. if you have a Sony WAP phone (this is not an advertisment), first it tries to use definitions for your phone, if it does not find it, it tries with WAP phone, then it tries to default to base definitions. What I am trying to say is that default may be more complex than you may think, one default may be not enough.

Agreed.  I was just trying to pick a simple example :)

David

Ciao
Antonio

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



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

Reply via email to