Lets say I have a UI bundle that renders a button from template. The
template is just a text file(s) inside UI bundle. Clicking the button calls
a service (for the purpose of this example say one with the highest rank).

The requirement is: change both the service that is called and the button
in consistent manner.

The first part is easy:
 - To change the service one can simply provide a new bundle (call it S)
containing the new service implementation (with higher rank or whatever
else it takes to make it the one that service registry will give to the UI
bundle).
 - To change the button (or even replace it with something else) one can
provide a fragment bundle (call it FB) with updated template file(s).

The question is, how to keep those consistent? That is, make sure that
either both S and FB are applied or none of them (lets assume S will
somehow ensure the service is registered or stop itself if it can't do so)!

It seams one needs to somehow declare a bidirectional dependency (I hate
the way it sounds, but that's what it in fact is, isn't it) between a
bundle and a fragment bundle. AFAIK this is not really possible as anything
specified in fragment is applied to the host! Has anyone faced similar
challenge before?


-- 
http://about.me/milen

Reply via email to