Recommended: Sing it, brah! 5 fabulous songs for developers
JW's Top 5
Hi,
We are developing a new application having client-server kind of architecture.
Both the ends need to be written in Java.
*At highlevel it will be like this.*
1. client-send request to server.
2. server-based on request type it will do some
operation and will populate some complex java object
which needs to be passed to client.
*To accomplish this we have following options.*
a. Using RMI
b. Using Web Service.
c. Or using simple HTTP protocol (servlet)
The key point to remember here while choosing the above technology is the java objects which will be passed to client are prone to changes. And we don't want to rebuilt the other layer because there is change in one layer.
So if we use RMI or Webservice there will be stubs and skeleton and changing in skeletons requires a need to change in Stubs as well.
We thought here http protocol will help where we will serialize the data and post it on wire. and this will be deserialized at other end back to Java object.
*This data which we are going to post will be in one of the following formats:*
1. JSON
2. XML
3. Binary.
I'm new to JSON and tried some sample examples. But I think it is not very powerful and straight forward for serialization and deseralization in Java. (My java objects are going to be complex in natures having generics, complex collections and nested objects.)
So is JSON suitable for such requirement?
*So bottom line is I have following two questions:*
1. For my client server architecture (client and server
can be hosted on same server) where key need is
changing in one layer should not require to rebuilt the
other layer.
So for this requirement what is the appropriate
methodology?
2. On wire for data transmisson which format to use:
xml, json, binary or some other?
Thanks,
Leena