Re: [angular.js] AngularJS: can it work with XMLRPC or JSONRPC?

2,752 views
Skip to first unread message

Vojta Jína

unread,
Jun 23, 2012, 3:54:30 AM6/23/12
to ang...@googlegroups.com
You can, but you have to write some helpers for it. Angular gives you $http service for sending xhr requests.

However, I would recommend you to use RESTful api with CORS.

V.

On Sat, Jun 2, 2012 at 2:02 AM, Alec Taylor <alec.t...@gmail.com> wrote:
I'm playing around with AngularJS. I have built a database using web2py.

With practically no effort I've enabled REST (CSV, XML, JSON), SOAP, XMLRPC and JSONRPC for the functions I want to expose, using Python decorators.

Now I'm wondering if it's possible to use XMLRPC or [preferably] JSONRPC with AngularJS?

If so, can you show me a tiny demo?

Thanks for your time,

Alec Taylor

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/A_ASIJ8kKDwJ.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.

Vojta Jína

unread,
Jun 23, 2012, 3:55:14 AM6/23/12
to ang...@googlegroups.com
In which case, you might take advantage of $resource, or check out examples on this mailing list, using mongo/parse/firebase/express...

V.

jamesp...@gmail.com

unread,
Jun 23, 2012, 8:08:14 PM6/23/12
to ang...@googlegroups.com
Hi Alec,

I'm 100% new to angularjs, but I hacked up a quick prototype for my own amusement today using Barrister RPC (an IDL based JSON-RPC implementation with Python and JS bindings).  Are you still looking for an example?  Here's a complete crude gist of the bits:


again, this is terrible code, but it does work, so maybe it will be useful to your efforts.

Barrister RPC is here:   http://barrister.bitmechanic.com/

cheers

-- James
Reply all
Reply to author
Forward
0 new messages