|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Automatically generating ActionScript service classes?Hey,
Has anyone tinkered around with automatically generating ActionScript, given a PyAMF gateway? I ask because it's sort of annoying to keep my services in sync… And I get jealous when I see the Java and PHP guys click "import web service" and magically get all sorts of helpful code generated for them. _______________________________________________ PyAMF users mailing list - users@... http://lists.pyamf.org/mailman/listinfo/users |
|
|
Re: Automatically generating ActionScript service classes?Hi David!
The only project that I know of which attempts to do such a thing is http://code.google.com/p/pyamfcodegen/ I personally haven't used it but there is a nice screencast from the author at http://basaratali.blogspot.com/2009/02/python-actinscript-code-gen.html . Hth, Nick On 14 Oct 2009, at 23:44, David Wolever wrote: > Hey, > Has anyone tinkered around with automatically generating > ActionScript, given a PyAMF gateway? > > I ask because it's sort of annoying to keep my services in sync… And > I get jealous when I see the Java and PHP guys click "import web > service" and magically get all sorts of helpful code generated for > them. > _______________________________________________ > PyAMF users mailing list - users@... > http://lists.pyamf.org/mailman/listinfo/users _______________________________________________ PyAMF users mailing list - users@... http://lists.pyamf.org/mailman/listinfo/users |
|
|
Re: Automatically generating ActionScript service classes?There is a big difference between a Service and a Business Delegate. Do you just want a service where a class:
- can be instantiated, and 1 method makes the call, with parameters, in the order they appear in the Python equivalent method
- dispatch a success/error event for the result - publicly expose the result If that's acceptable, I can see how this would be nice to not only auto-gen the services, but then write FlexUnit4 tests for them as well to ensure they actually work out of the box.
...the only thing I find hard about the above is parsing .py files. I could do it in AS3, but I suck in Python. Anyway, I know a bunch of people have done this in Java & PHP; so I while I'd still build an abstraction layer on top of it, it would be a dope feature to have. In order of priority, I'd vote for easier Django model integration like Nick or whoever discussed awhile ago...
On Wed, Oct 14, 2009 at 6:44 PM, David Wolever <wolever-pyamf@...> wrote: Hey, _______________________________________________ PyAMF users mailing list - users@... http://lists.pyamf.org/mailman/listinfo/users |
|
|
Re: Automatically generating ActionScript service classes?On 14-Oct-09, at 6:49 PM, Jesse Warden wrote:
> There is a big difference between a Service and a Business > Delegate. Do you just want a service where a class: > - can be instantiated, and 1 method makes the call, with parameters, > in the order they appear in the Python equivalent method > - dispatch a success/error event for the result > - publicly expose the result > If that's acceptable, I can see how this would be nice to not only > auto-gen the services, but then write FlexUnit4 tests for them as > well to ensure they actually work out of the box. Yup, that's what I'm thinking of. > ...the only thing I find hard about the above is parsing .py files. > I could do it in AS3, but I suck in Python. Well I know how to do all the .py introspection that will be required… So I think we'll be able to work something out ;) _______________________________________________ PyAMF users mailing list - users@... http://lists.pyamf.org/mailman/listinfo/users |
|
|
Re: Automatically generating ActionScript service classes?On 14-Oct-09, at 6:48 PM, Nick Joyce wrote:
> The only project that I know of which attempts to do such a thing is http://code.google.com/p/pyamfcodegen/ > I personally haven't used it but there is a nice screencast from the > author at http://basaratali.blogspot.com/2009/02/python-actinscript-code-gen.html > . Hhmm… It's a nice screenshot, and he's got some cool ideas (ie, storing session state), but I think (as we talked about on IRC), it's infeasible to use. He uses Python comments to declare types… Which means you've got to parse the .py files, instead of discovering them with introspection. That'd lead to brittle code and generally makes me very weary… _______________________________________________ PyAMF users mailing list - users@... http://lists.pyamf.org/mailman/listinfo/users |
| Free embeddable forum powered by Nabble | Forum Help |