KBD

Keith Devens .com

Tuesday, December 2, 2008 Flag waving
Nonsense on stilts! – Derived from Jeremy Bentham
← The VP debateWith John Kerry it really *would* have been the coalition of the bribed and coerced! →

Daily link icon Wednesday, October 6, 2004

ScriptServer - client/server communication between Javascript and PHP

Harry Fuecks has something that looks really cool. ScriptServer (Via Adam):

ScriptServer provides tools to "hook up" PHP and Javascript, for the purpose of fetching data from PHP into a web page which has already loaded, without reloading the entire page.

The objective is to make connecting a Javascript client with a PHP server as painless and error-free as possible. To this end ScriptServer allows you to define a class in PHP and call it’s methods directly (and remotely) from Javascript.

Looks like it uses XML-RPC from JS to PHP. Neat! Nope, it passes back and forth native evallable or unserializable data particular to PHP or JS. Excellent! Who needs XML?

← The VP debateWith John Kerry it really *would* have been the coalition of the bribed and coerced! →

Comments XML gif

Harry Fuecks (http://www.phppatterns.com) wrote:

Thanks for the announce. Think I'm confusing everyone because the Sourceforge site also has a fork of Simon's XML-RPC implementation (hence the site's name).

ScriptServer actually sends strings to PHP (from Javascript) ready for unserialize() while in the opposite direction it generates Javascript wrapped in an anonymous function e.g. response from Colors::listColors - on the Javascript side use eval to "unserialize" the response. Basically uses inbuilt parsers already available in PHP and Javascript; parsing (e.g. XML) is usually alot harder than generating.

∴ Harry Fuecks | 6-Oct-2004 3:27am est | http://www.phppatterns.com | #5804

Keith (http://keithdevens.com/) wrote:

Even better! Who needs XML? Kick ass. Now I need an app to try this out on.

Keith | 6-Oct-2004 3:29am est | http://keithdevens.com/ | #5805

Tim Wood wrote:

It all sounds wonderful and good. Problems:

1) The docs linked above don't link to the .zip file they refer (the one with the nifty server code). There are .tar.gz files at sourceforge.net/projects/xmlrpccom/

2) The sample code in the docs have lots of missing quotes.

3) Once I was able to fix all the problems I could find, The basic example in the quick start part still wouldn't work.

I suspect it'll be a great tool when you don't spend an hour plus with the quickstart and still not even have a working 'hello world' app. But, till then I'm going to make do with the code I found over at www.paranoidfish.org/boxes/2002/01/30/

∴ Tim Wood | 23-Oct-2004 1:12pm est | #6015

Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

December 2008
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
28293031 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 6 posts

Recent comments XML

new⇒Perl 6 1.0 in March?

Doh, my mistake. I'm aware of the​relation between Parrot and Rakudo​but I'...

Keith: Dec 2, 1:03am

Free image hosting sites

Well, TinyPic has this in its​FAQ:

> Images and videos is in​your accoun...

Keith: Dec 1, 1:13am

Join a NameValueCollection into a querystring in C#

Well with a lamba expression, this​is what I came up​with:

?!code:csharp...

Gustaf Lindqvist: Nov 30, 4:38pm

Why no generic OrderedDictionary?

Check​http://www.codeproject.com/KB/recip​es/GenericOrderedDictionary.aspx?d...

Gabrielk: Nov 27, 6:57am

WhatIsMyIP.com

http://www.thesysteminfo.com is​another good alternate to​whatismp.com... I...

Kripz: Nov 26, 8:51pm

Girls, please don't get breast implants

Actually I think it's sweet when a​man loves a woman whether she's big​or n...

218.186.12.228: Nov 26, 9:40am

Generated in about 0.184s.

(Used 8 db queries)

mobile phone