Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Very simple Objective-J RPC

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 example
Octocat-spinner-32 OJRPCClient.j
Octocat-spinner-32 OJRPCServer.j
Octocat-spinner-32 README
README
An incredibly basic RPC mechanism for Objective-J in the browser to Objective-J on the server (via Jack: http://jackjs.org)



Requirements:

    - Cappuccino Tools installed (http://cappuccino.org/download)
    - "Jack" library (http://jackjs.org)
    - "Simple" jar in your CLASSPATH (http://simpleweb.sourceforge.net/)


Example:

    To run the example, place the a copy or symlink of the "jack" library and the Cappuccino "Frameworks" directory in the "example" directory (or run "steam create-frameworks"). Start the server by running "objj server.js" from inside "example", then navigate to "http://localhost:8080/index.html". The client will ask the RPC server to capitalize "bar", then it will alert the result.
    
    
Caveats:

    Arguments and return values must implement the CPCoding protocol (includes built-in toll free bridged types like String, Number, Boolean, Array, and Date, but NOT Object);
    

Example Server:

    @implementation Capitalizer : CPObject
    {
    }

    - (CPString)caps:(CPString)aString
    {
        return aString.toUpperCase();
    }

    @end

    capitalizer = [[Capitalizer alloc] init];

    app = [OJRPCServer serverForObject:capitalizer];
    
    
Example Client:

    var capitalizer = [OJRPCClient objectWithURL:"/capitalizer"];

    alert([capitalizer caps:"bar"]); // should alert "BAR"
Something went wrong with that request. Please try again.