On Tue, Jan 19, 2010 at 03:37, Jean-Baptiste BRIAUD -- Novlog <
[email protected]> wrote:
>
> On Jan 18, 2010, at 19:56 , Derrell Lipman wrote:
>
> On Mon, Jan 18, 2010 at 04:21, Jean-Baptiste BRIAUD -- Novlog <
> [email protected]> wrote:
>
> I, too, have a new Java RPC implementation which is not yet committed to
> the contrib repository. Mine is intended to be very, very simple
>
> Could you please elaborate ?
> All the benefit I mentioned in my previous email doesn't mean it is complex
> to use.
>
Nope, I wasn't implying that. What I meant is that it has no "extra"
features, so it's a very small code base. I'm making use of
org.json.simple.*, and my JSON-RPC server code is in three classes, JsonRpc
(the server itself); JsonRpcError (the class for errors thrown by rpc
methods); and AbstractRpcClass (extended by classes implementing rpc
methods). The total code size is 636 lines, probably at least half of which
is comments. It's therefore simple to read and understand.
It may actually be more complex to use than yours, as I don't serialize
arbitrary classes -- rather the rpc methods are given as input, and build
responses as output, based on JSONObject and JSONArray classes -- so for
sophisticated applications, it is probably more work to use this. I wrote it
as a project for getting more experience writing Java. Don't worry about
this as "competition" :-) since it's more likely to be used as example code
for a very basic JSON-RPC server than in any large-scale deployments. It
also doesn't currently support qooxdoo Dates.
> Our implementation is very simple to use, it will be difficult to be
> simpler :
> - nothing special to do in the classes to serialized/deserialize. Using
> transient keyword is just plain old Java standard for serialization.
> Also see other email to understand different way to express (compile-time
> or run-time) you want/don't want some attribute in the serialization.
> - here is a Controller example :
>
> import java.rmi.Remote;
> import java.rmi.RemoteException;
>
> public class CustomerController implements Remote {
>
> public Customer[] methodTemplate(/*, HERE THE PARAM */) throws
> RemoteException {}
> }
>
> You see ? Nothing outside standard JDK to import, only RMI packages.
>
Yup, it sounds nice. I look forward to looking at what you've done.
Derrell
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel