Skip to content

tlrobinson/ojrpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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"

About

Very simple Objective-J RPC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published