--
You received this message because you are subscribed to the Google Groups "Spring Framework for Delphi" group.
To post to this group, send email to spri...@googlegroups.com.
To unsubscribe from this group, send email to spring4d+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/spring4d/-/MoyzIZwN0hoJ.
For more options, visit https://groups.google.com/groups/opt_out.
You may look at the link http://www.spring4d.org/spring4d-in-action/spring4d-in-action-series/ to see the parts.Most common types are stable. The collections framework are still experimental. The DI framework is useful but still in review and we may introduce some more features in it. The Spring4D in action will be paused as this kind of articles are very time consume and maybe we will put it in a book some day. Instead, we are going to write some simple articles to illustrate how to use the framework.
As I mentioned in another thread try to develop your code without having the “magic” of a DI Container in your mind but stick to SOLID principles and use “manual” dependency injection.
Just a bit mind storming on how to solve that particular problem:
Situation: You have multiple instances of ISkype and a IUser instance. Now you want to pass that IUser to a method of the correct ISkype instance to remove it there.
Solution 1.: Keep the ISkype reference in your IUser so you can directly call to it.
Disadvantages:
- cross references of interfaces and the necessary handling of that
- if you cannot modify the classes/interfaces you have to keep that outside of them, so maybe you have to use a dictionary or some other kind of lookup
Solution 2.: Build a proxy for your ISkype instances and call on that.
Disadvantages:
- you have to find the correct ISkype instance inside the proxy to route the call to it
Please tell us how you are obtaining the IUser and ISkype instances (do you implement any of them?) so we know if there is a possibility to intercept the resolving at some point to keep the IUser/ISkype relation.
Stefan