KBD

Keith Devens .com

Saturday, July 4, 2009 Flag waving
LOOT THE DOG – anyone who's ever raided MC
← 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)
:

July 2009
SunMonTueWedThuFriSat
 1234
567891011
12131415161718
19202122232425
262728293031 



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

Recent comments XML

new⇒Wizard's First Rule

> while it is cheesy to some​extent, I actually found it to be​pretty enjoy...

Keith: Jul 3, 6:33pm

I hate Norton Antivirus

I bought Norton 2009 and it is not​installing on my computer!!!
It​seems l...

o'neil: Jun 30, 11:44am

Generated in about 0.179s.

(Used 8 db queries)