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

Infrastructure components #69

Merged

Conversation

eriksundin
Copy link
Contributor

Solution for #20

Summary

  • Added a TyphoonComponentFactoryPostProcessor protocol in Factory/Config as the first 'infrastructure component' marker.
  • deprecated TyphoonComponentFactoryMutator and migrated the Patcher and PropertyConfigurer to use the new protocol. Still backwards-compatible.
  • Pick up infrastructure components in -register: and apply when the factory is loaded
  • Infrastructure components are instantiated instantly once registered
  • Added TyphoonDefinition+Infrastructure and property-placeholder xml tag for short-hand declarations.

Issues / Extensions

  • Since the components are instantiated when registered they cant have dependencies on other components in the factory. Not sure how or if this should be handled, there could be some pretty strange cases appearing if going down that path.
  • There could be a good idea to introduce a TyphoonOrderedComponent protocol if, for instance you'd want infrastructure components to be applied in order.

All this heavily influenced by Spring framework.

jasperblues added a commit that referenced this pull request Sep 8, 2013
@jasperblues jasperblues merged commit ba42adc into appsquickly:master Sep 8, 2013
@jasperblues
Copy link
Member

Nice work Erik.

I think we're early enough in development, that we could just throw away the TyphoonComponentFactoryMutator, rather than deprecate it. . . I'm not too keen on baggage.

Mutator was designed to work exactly the same way as PostProcessor, except I got the method signature a bit wrong. . . postProcessFactory:() is more flexible.

@jasperblues
Copy link
Member

We might want to introduce XML namespaces, and perhaps name-space handlers, to allow creating your own tags.

Btw Erik, you have push access, but please continue to do any experimental work on a branch.

Two approaches:

  1. Create a ticket in issues, and disucss.
  2. Develop on a branch/fork and send a pull request.

.. . If its something small or a bug-fix just go for it.

@eriksundin
Copy link
Contributor Author

Great. Thanks for the contribution directions. I'll remove the deprecations and push that.

@jasperblues
Copy link
Member

Thank you for the great work. . . really helps.

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

Successfully merging this pull request may close these issues.

2 participants