leon breedt
2005-Feb-07 01:55 UTC
[RESEARCH] ActionService 0.2.99 pre alpha bleeding edge release
Hi, This is a replacement for WebserviceHelper, trying to be more Rails-like. This release is NOT a real release. Its so you can get an idea of whats going to be in the real one. But it is useful out of the box :) The SOAP/WSDL support is pretty complete and tested (more featureful than it was with WebserviceHelper), XML-RPC is still in the pipeline. New features: * Ability to defer service object creation until request time, allowing your service object creation block access to the controller instance variables. * Ability to declare callbacks invoked before and after operation invocation [1] * Ability to send back exceptions raised by operations in SOAP fault report format. This means if you''re using a Ruby client, you get a nice stack trace in the client. Even .NET clients get an exception with a meaningful error message. See the ''examples/soap'' directory for an example of implementing a GoogleSearch service, for all you budding young search companies ;) You can get it from Subversion (will always be the latest): http://svn.xeraph.org/repos/actionservice/trunk You can also install the Gem (not guaranteed to be uptodate), as I created a RubyForge project for it. Happy, Curt? :) $ gem install actionservice It requires ActionPack 1.4.0 or later, as it uses #raw_post to get at the POSTed request. In order to use it in your applications, just add: require_gem ''actionservice'' To config/environment.rb, and start creating controllers and services that use it. Before you ask: * All APIs are subject to change, however, the current approach for declaring service and dispatching operation requests will NOT be removed, so you can rely on that appraoch existing. New (bettter) approaches may be added though, see below. * A different dispatching approach that dispatches operations directly onto controller actions (without the need for creating a seperate Service class), is planned, if it turns out to be feasible and implementable. * Proper support for ActiveRecord model classes (being able to use them in method signatures, and having things working as you expect, with the client getting a structure with members that looks like the ActiveRecord columns and relationships) is definitely planned for the real release. No more creating ActionService::Struct derivatives if you don''t want to! * RDoc documentation will not exist until a real release. Sorry! But documenting before the fact has made me stick with crap APIs instead of improving, in the past :) Patches or design approach suggestions and comments are welcome, please attach them to this ticket, I''ll be watching it. http://dev.rubyonrails.com/ticket/594 Leon [1] Yep, this is another layer. The planned new dispatching approach will remove the necessity for this layer, and allow you to use Controller filters to do the same thing. Yay DRY!