Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow easier definition of property configurers (ie in the Assembly) #20

Closed
jasperblues opened this issue May 24, 2013 · 2 comments
Closed

Comments

@jasperblues
Copy link
Member

Typhoon supports property configurers. The current way to define them is:

TyphoonComponentFactory* factory = [TyphoonBlockComponentFactory factoryWithAssembly:[ApplicationAssembly assembly]];

id <TyphoonResource> configurationProperties = [TyphoonBundleResource withName:@"Configuration.properties"];
[factory attachMutator:[TyphoonPropertyPlaceholderConfigurer configurerWithResource:configurationProperties]];

It might be nice to allow definition of configurers in the Assembly (code or xml).

@eriksundin
Copy link
Contributor

This would be convenient. As a proposition even further, could it be a good idea to introduce the concept of infrastructure components?

A component recognised and picked-up by the factory but not included in the registry. The TyphoonPropertyPlaceHolderConfigurer being a good example, that if defined in the assembly automatically being attached as a mutator before component definitions are processed.

Opens up for adding other infrastructure components later, AOP components for example if that is in the road map.

I've put together a draft implementation for it here:
https://github.com/eriksundin/Typhoon/tree/infrastructure_components

@jasperblues
Copy link
Member Author

Hi Erik,

That would be exactly right. Perfect.

(I couldn't find the draft spec - link takes me to main page. . but get the gist).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants