Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » Where to put logic in bindings
Where to put logic in bindings [message #1403109] Mon, 21 July 2014 12:16 Go to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
Posting a discussion taken from a mail thread with Karel Goderis:

>> Karel: Also, If you have a ThingHandler instance per Thing, where would you put all the logic, caches etc that you need to manipulate Things objects ? in the binding, in a Bridge,...?

> Me: Probably best to have this in the Bridge as a Bridge gives you access to a subsystem (for which you might want to do caching etc.). From a ThingHandler you can always get back to the ThingHandler of the Bridge to call methods on it.

Karel: Ok - So, what's then left to do in the Binding itself? That being said, given that bindings are Extensions, would that open the door for new functionalities such as direct inter-binding communication? or can we have multi-Thing bindings, e.g. a Binding that deals with different types of Things? I just refer back to my favorite use case whereby I would like to have my IRTrans IR receivers/transmitters act in conjunction with my HDMI Video matrix
Re: Where to put logic in bindings [message #1403116 is a reply to message #1403109] Mon, 21 July 2014 12:46 Go to previous message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
Well, there is nothing like a "XXXBinding" class anymore - all logic is within the handlers (and optionally in other classes that you create for your convenience).
Regarding inter-binding connections: Note that a paramount design goal has always been the modular architecture. So in general, there should be no links between different bindings.
This said, there is nonetheless the possibility to make specific functionality available to others - note that the handler classes lie in an exported package. So any public method on them becomes a public API of your binding. So you can potentially create bindings that have a dependency on a specific other binding and use or extend its functionality.

Regards,
Kai
Previous Topic:Concurrency in rules
Next Topic:Concept of a person
Goto Forum:
  


Current Time: Thu Sep 26 00:43:27 GMT 2024

Powered by FUDForum. Page generated in 0.03827 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top