I have been looking in ServiceBuilder for a way to define a constant or similar that I could use to validate that the client is using the same version of the Interface as the server, but so far I haven’t find a way.
I know I could create a service directly that would return some value, and then check against some other value on the client… but that would not work “automatically”, i.e., without me having to remember to update the version number on the two sides by hand.
Is there an obvious way I am missing? Or how does people solve this, I would guess, very common problem?
Hopefully this will get released sooner rather than later!
Another option, althought I guess is something similar in complexity to implement, would be to be able to define constants on the RODL that would get translated to the equivalent construct on the destination langauje. That would allow us to define whatever constants we want and use them to validate the version or some other uses.
This would not remove the need to pass these values from server to the client side. Implementing this feature in the way that would not break existing clients, would be extensible and error-proof is the task we are working on.
Yes, I understand. What I’m thinking is a way to have a value (a const int would do) in the _Intf file that I could set on the RODL and then use that value in some methods I define directly to make my own version checking.
As far as I know it’s not possible to have such thing right now, but maybe could be considered for some future versions, as I think that could also be useful in some other circumstances other than a rudimentary version checking.
Yes, that could work. I’ll log this as an issue for further consideration (as we need to provide support across platforms etc). You’ll be notified once the issue is closed