ScriptServer Rocks!

Well, I finally had a chance to play around with Harry’s ScriptServer.

First of all, if you are unfamiliar with the project, the goal is to hook up client side JavaScript functions with server side PHP scripts. Seamlessly, and without requiring a new HTTP requests.

And ScriptServer is great!!! It took minimal amounts of code to hook up a button of a form to collect several fields from a form, and post them directly to a class method in PHP, and allowing javascript to get a chunk of HTML back from the function for use in replacing the .innerHTML of another division on the page. The results are fantastic, no submit and quick in place edits.

The particular project I was working on that needed this kind of functionality had a large form for the base record that takes some effort to validate and update. Meanwhile, there are several one-to-many relationships that are a part of the model, which is where I am able to put the scriptserver “in place editing” to greatest effect. Essentially I handle the “quick and easy” relationships with this javascript RPC mechanism, and handle the bulk of the base record edits when the main form is submitted.

The only minor issue I encountered was with the new PHP5 case sensitivity of method names.

Anyway, kudos to Harry, works great, check it out. 8)