On Wednesday 23 September 2009 15:13:47 Duncan Mac-Vicar Prett wrote:
On Tuesday 22 September 2009 14:41:43 Martin Kudlvasr wrote:
This work was done to show, that there are other (and many think better) approaches to the problem than dynamic creation of classes in service_resource.rb. So I especially ask Duncan and Klaas, what other problems service_resource solves and YastResource does not.
Please let me know what you think.
I think this is a great step forward.
Let's not forget kudos to Martin Vidner and Karel.
The argument of being able to add code to the client proxy that otherwise would go in the model is enough to convince for the benefits.
Only the name of the class does not convince me, may be the name YaST:ServiceResource::Base can be reused (there is already such class there)
The YastResource name was chosen quickly as we knew it was going to be only temporary. I personally have no preferred name. If we are going to plan a transition, we should keep 2 names for some time. Both service_resource.rb and YastResource can be used by plugins at the same time. This way we can achieve a fluent transition.
Also the initialization that needs to be done looks weird, but I can't think on something to avoid it.
Well, I combined the 2 steps in "init_interface_and_find" method which combines the 2 lines and does exactly what "load_proxy" does - init the class and call find. As Josef has pointed out the initialization part can be placed in a before filter, which would have to be different for each plugin/model. -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org