Mailinglist Archive: yast-devel (163 mails)

< Previous Next >
Re: [yast-devel] use-activeresource
  • From: Martin Kudlvasr <mkudlvasr@xxxxxxx>
  • Date: Thu, 10 Sep 2009 14:41:28 +0200
  • Message-id: <200909101441.28800.mkudlvasr@xxxxxxx>
On Thursday 10 September 2009 11:18:14 Klaus Kaempf wrote:
* Duncan Mac-Vicar Prett <dmacvicar@xxxxxxx> [Sep 10. 2009 11:03]:
And what we describe as missing features is the ability to do:

class Interface < YastResource::Base
any_that_implements ''

instead of using has_prefix


Actually, there's no possibility to control the resource URI in Rails
because it is assembled from the controller name and module

But this means, that we'll have to solve controller name conflicts anyway. If
2 of our partners develop a plugin with the same controller name, there will
still be a name conflict problem.

And that's why we've choosen the 'implements interface'
approach because it doesn't require any knowledge about the
implementation (controller name) of the service side.

I see, that the benefit of interfaces is, that we can have several webservice
resources implementing the same interface. Webserver chooses the proper
resource according to the supplied interface name. I think this is a good
approach (although we will still have to solve interface name conflicts of 3rd
party plugins).
What I see as the problem is, that the translation from "interface name" to
"resource URI" is not factored out. The webclient may want to ask for
webservice resource URI, but certainly not about whether the resource is
"singular" or "nested". For example I cannot imagine a webclient plugin, which
would change its behaviour according to change of "singular" or "nested". This
info is only needed by proxy_for, which tries to be universal and all-

I think that Martin's problem (...any_that_implements
''...) can be solved by directly using
ResourceController on webservice. Then use the path from resource[:href] to
appropriately setup an ActiveResource (actually the enriched Martin's version

Martin Kudlvasr

PS: Later it would be nice to be able to get a URI from interface in a RESTful
way. Like:
instead of:

SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG N├╝rnberg)

To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >