[Cialug] how are you implementing "web services"

Colin Burnett cmlburnett at gmail.com
Fri Dec 7 18:41:07 CST 2007


On Dec 7, 2007 5:41 PM, Matthew Nuzum <newz at bearfruit.org> wrote:
>
> Actually, this is very much my configuration. My application is using NuSOAP
> and I'm having problems with it in PHP5. Unfortunately, the pickle approach
> won't work for me (unless there's some magic I'm not aware of) because I use
> PHP on the server and Python and PHP on the client.

The point of XML or pickle is that it is a serialization mechanism.
So you only need to find one common to PHP and python.  There may be a
pickle something for PHP (haven't looked) or there might be a PHP
serialize() & unserialize() module for python.  XML is probably the
most neutral though.

> However, the concept is something I'm considering. If I made a RESTful
> service, the client could request the results to be serialized in a way it
> likes by inclusion of a header tag (Accept-Encoding). So, for example, it
> could send Accept-Encoding: text/json\r\n and have the results in JSON or
> text/xml for XML.

I've never used REST but what I understand is that REST is more of a
"database" approach (GET this, PUT that, DELETE this, etc.) while RPC
is action-based (call this function).  To be more correct, you should
use content-type instead of content-encoding since encoding is the
likes of 7-bit ASCII vs. UTF-8.  I hadn't considered "switching" my
encoding based on content-type.  I like it.

> For me, I'm getting tired of everything running in a browser, so I'm
> exploring (in my personal time, therefore at a slow pace) creating
> applications on the desktop that interoperate with web services or web
> applications. Therefore I want to start thinking about this type of feature
> for all my web applications.

Here I thought I was alone...  :)


Colin


More information about the Cialug mailing list