R1-RPC/J Frequently Asked Questions
List of Questions- What is R1-RPC/J?
- What is the Competitieve Edge of R1-RPC/J?
- How does R1-RPC/J Compare to the Blaze Data Services?
- What are the Key Features of R1-RPC/J?
- Does R1-RPC/J Support messaging?
- What is R1-RPC/J's Licensing Model? What is the Price?
- How Can I Distribute My Application Built With R1-RPC/J?
- How does R1-RPC/J Compare to Other RPC Solution?
- How Would a Product such as R1-RPC/J Compare to Your Home-Grown Solution?
- How Can I Evaluate R1-RPC/J?
- Does R1-RPC/J Work with the Spring Framework?
- Does R1-RPC/J Work with Pure AS3 Flash Projects?
- How Big is R1-RPC/J?
- Is R1-RPC/J Open Source?
- What Support Can I Get?
- How Easy is it to Develop With R1-RPC/J?
- Could You Show Me a Quick Example of RPC?
- Why the R1-RPC/J Solution is So Simple and Elegant?
- How is Automatic RPC Unit Testing Possible with R1-RPC/J?
- Can I Use the Unit Testing Framework for My Own Test Cases?
- Why R1-RPC/J Reflects Less is More?
- What New Features are Planned for R1-RPC/J?
- Author's Words.
Disclaimer: Flex™, Flash™, ActionScript™ and AS3™ are the trademarks of the Adobe® Systems, Inc. Java™ is the trademark of Sun Microsystems, Inc. For brevity, these terms will be used in this document without the trademark symbols.
What is R1-RPC/J?
Answer: The following diagram depicts everything about R1-RPC/J, including the RPC use case to address, your coding responsibility, development flow, and its major features. This question is better answered by the R1-RPC/J White Paper.

What is the Competitieve Edge of R1-RPC/J?
Answer: R1-RPC/J is designed for Flex/Flash-Java RPC and does it right. It is very easy to understand and program, and simple to configure. Light-weight and small, it also packs many useful and important feathres for client-server applications. To better understand these claims, refer to the R1-RPC/J White Paper and the R1-RPC/J User's Guide.
How does R1-RPC/J Compare to the Blaze Data Services?
Answer: There is a head-to-head comparison between R1-RPC/J and BlazeDS (as well as DWR) in the White Paper.
What are the Key Features of R1-RPC/J?
Answer: Read the Table of Content of the R1-RPC/J User's Guide to get a wholesome picture of the solution. The major features are listed below.
Flex-Java RPC:
- Provides a simple and elegant solution to the likely confusing issue of Flex-Java RPC.
- Server-side Java is just POJO façade and VO classes. AS3 classes are generated from these POJO, so that makeing remote calls in AS3 is almost like directly calling Java façade methods. (This painless RPC allows you to completely focus on your business logic and program naturally in both Java and AS3.)
- The Java VO class may embed AS3 code, so that the generated AS3 VO classes can be used as a part of the client-side object model. Can specify bindability for the generated AS3 VO class at class and property level.
- Java VO classes can extend other VOs, and can be static inner classes.
- Built-in CHAP user registration and login support. Plain-text password login is also support. RPC methods can be authenticated or not.
- Cooperative polling and RPC-piggyback messaging.
- Aspect-Oriented Programming (AOP) support for RPC.
- Server-side exception handling in AS3 and session timeout control.
Automated Testing:
- Can automatically create an RPC unit testing application to test out the RPC. This can be done totally independant of your application with zero effort. (It is invaluable for test-driven development and multi-team collaboration.)
- Can control the test case order.
- Can test user-authenticated methods.
- Can easily add your own unit testing (not limited to single RPC) using the same test application.
Tools:
- Command-line tools and Ant tasks for automating builds.
Does R1-RPC/J Support messaging?
Answer: Yes, as mentioned in the answer to the previous question.
What is R1-RPC/J's Licensing Model? What is the Price?
Answer: The licensing model is per J2EE web application, regardless how many CPUs the web app is running on. Currently the cost is US$3000 per J2EE web application. For OEM or bulk sale, please contact us to negotiate a much lower per-distribution cost.
How Can I Distribute My Application Built With R1-RPC/J?
Answer: See the answer to the question "What is R1-RPC/J's Licensing Model? What is the Price?".
How does R1-RPC/J Compare to Other RPC Solution?
Answer: The White Paper has a section that answers this question.
How Would a Product such as R1-RPC/J Compare to Your Home-Grown Solution?
Answer: General-purpose solutions (such as RPC) developed in-house for specific enterprise applications typically take advantage of the project-specific knowledge and are usually highly coupled, more compact and efficient. However, they will likely suffer from lack of thorough study, the pressure of the application delivery, and possibly the inexperience of the designers. The result is often that the home-grown general-puporse solution is less scalable (for other projects), not as efficient as it should be, poor documentation and testability, etc. The worst nightmare is that such solutions are being developed along with the application, breaking down the fluidity of the whole development process. This has been seen happening and it will happen.
In contrast, using a well established general-purpose solution removes all such issues. R1-RPC/J certain will do that for your projects, existing and future. Overall, it is better off to replace in-house general-purpose solutions with standard or commercial solutions, as many wise project leaders recognize. If you examine its features, you will probably agree that it is a good move to mave to R1-RPC/J now!
How Can I Evaluate R1-RPC/J?
Answer: You can download the software and do development without a license file. Without a license file, a server may abort after a certain period of running. To run the web application for production use, you must purchase a license to deploy along with the web application. With a valid license file, the server would never abort.
Does R1-RPC/J Work with the Spring Framework?
Answer: R1-RPC/J has built-in support for the Spring Framework.
Does R1-RPC/J Work with Pure AS3 Flash Projects?
Answer: R1-RPC/J works with Flash programs and pure AS3 projects. It has been used with Flex 3 SDK and Flash CS3.
How Big is R1-RPC/J?
Answer: The clisne swc libray is 24K bytes; the server-side jar file is 120K.
Is R1-RPC/J Open Source?
Answer: R1-RPC/J is not open sourced, except for the unit test framework, which is completely open source; you can modify and do anything for your needs.
What Support Can I Get?
Answer: Anyone can ask questions via email. Paid customers have the priority and are guaranteed to get answered.
How Easy is it to Develop With R1-RPC/J?
Answer: It should be very easy, thanks to R1-RPC/J's rich documentation and concise examples. Find an example that is closest in nature to your project, and clone its development settings.
Could You Show Me a Quick Example of RPC?
Answer: The following is a simple Java façade class:
package sample;
public class FriendlyFacade implements r1.rpc.RemoteFacade
{
/**
* @ASTestInput [ 'James' ]
* @ASTestResult x == 'Hello, James!'
*/
public String sayHi(String name) {
return "Hello, " + name + '!';
}
}
The following is the gist of its generated AS3 counterpart:
package sample
{
import r1.core.r1_internal;
import r1.rpc.RPC;
import r1.rpc.RPCFacade;
public class FriendlyFacade extends RPCFacade
{
public function FriendlyFacade(rpc:RPC=null, encoding:int=0) {
super(rpc, encoding);
}
/////////////////////////////////////////////////////////////////////////////
//
// In the facade methods, the first parameter, receiver, can be one of
// the following:
//
// 1. A callback function with this signature:
//
// function callback(retVal:ReturnType=null, err:ErrorResult=null):void;
//
// 2. An array of [ host, field ], where host[field] is to receive the value.
// Failure will be handled by the system.
//
// 3. An array of [ host, field, failureCallback ], where host[field] is to
// receive the value, and in case of failure, the failureCallback will be
// invoked; this function has this signature:
//
// function failureCallback(err:ErrorResult):void;
//
// receiver can be null, meaning to use default error handling and
// ignore the status of the call or its return value, if any.
//
/////////////////////////////////////////////////////////////////////////////
public function sayHi(receiver:*, name:String):void {
r1_internal::call("sayHi", [name], receiver);
}
}
}
This is the client code using the RPC:
<?xml version="1.0" encoding="utf-8"?>
<Application layout="absolute" xmlns="http://www.adobe.com/2006/mxml"
creationComplete="RPC.initSingleRPC('rpc')">
<Script><![CDATA[
import r1.rpc.RPC;
import r1.rpc.RPCResult;
import sample.FriendlyFacade;
private var facade:FriendlyFacade = new FriendlyFacade();
private function sayHiCB(result:String, rpcResult:RPCResult):void {
if (!rpcResult.success) {
output.text = "Error: " + rpcResult.errorDetail.message
} else {
var txt:String = output.text;
if (txt == null || txt == '')
output.text = result
else
output.text = txt + '\n' + result
}
}
]]></Script>
<Form label="Direct Call" width="100%" height="100%">
<FormItem label="Name:" direction="horizontal">
<TextInput id="myName"/>
<Button label="Say Hi!" click="facade.sayHi(sayHiCB, myName.text)"/>
</FormItem>
<FormItem label="Output:" width="100%" height="100%">
<TextArea id="output" width="100%" height="100%"/>
</FormItem>
</Form>
</Application>
Why the R1-RPC/J Solution is So Simple and Elegant?
Answer: The key to understanding the simplicity and elegance of R1-RPC/J is to realize the disparaty between the server- and client-side object models. These two are completely different in terms of purpose and content. Serializing object graphs is not only unnecessary but conceptually incorrect.
R1-RPC/J adopts a simple façade pattern and restricts VO classes from having object references. This clarifies and defines the problem space, which leads to a concise yet elegant solution and toolkit.
How is Automatic RPC Unit Testing Possible with R1-RPC/J?
Answer: Thanks to the façade pattern and code generation technique, automated RPC unit testing is easily achievable. In R1-RPC/J, you specify the unit test input and the expected result with special javadoc tags, and unit test cases are generated. These test cases are then linked to a predefined UI framework to produce a unit test application. The following is a screenshot.

Can I Use the Unit Testing Framework for My Own Test Cases?
Answer: Absolutely. See R1-RPC/J User's Guide.
Why R1-RPC/J Reflects Less is More?
Answer: R1-RPC/J is lean and mean. It only contains original code and just does RPC; unlike some Java server-side frameworks for Flex, R1-RPC/J does not bundle any open source projects for bloated functionalities. It just takes a thin façade on the Java side, and the application designers are free to use any combinations of server technologies to their hearts' content. We believe in "less is more".
What New Features are Planned for R1-RPC/J?
Answer: More transport formats are being developed. These include binary format, and encrypted binary format. The latter, coupled with CHAP login, would enable quite secure applications using HTTP; performance can be better (than HTTPS) because you can selectively encrypt certain transactions.
The beauty of R1-RPC/J is, this low-level transport development is completely transparent to you the developers; when you upgrade to the new version, better default transport will be used and your code does not need any changes.
There are other features envisioned for the future releases that would further expand the horizon for R1-RPC/J. Should you have specific needs or wishes, please feel free to send to us, and we will review and possibly incorporate in the next release!
Author's Words.
Answer: This R1-RPC/J product well reflects the belief that "simple is good". The key steps for building a good simple solution is to understand the problem well, reach a comprehensive conclusion, formulate a practical solution, and produce enough facilities that are as easy-to-use as possible.
For general solutions, it takes multiple iterations to mature. Software quality does not happen overnight. For users, good documentation is extremely important. R1-RPC/J has gone though a number of revisions, and has been tested for all areas. The documentation is rich and complete, and the road map for future development is clear. We are committed to its success and your successes. Please do not hesitate to report any issues, comments and desires to us; they will only benefit you and other developers. This is yet another benefit of using a solution that is used by many teams and maintained by a dedicated organization.
