| |
"We absolutely love this service, our web site's rank jumped 10 pages in three months after join.
Best of all, it is FREE! Thanks a million, forperfect!"
Jim - LA, CA |
| |
"Great idea, great service, I cannot thank you enough!"
Michael - NY, NY
|
| |
|
 |
 |
| |
|
 |
 |
| |
Add URL to all major search engines for free. Act now! |
| |
|
 |
 |
| |
Links page lists the recommended services from our members. |
|
|
 |
Remote Scripting Library is here for Free Download.
Why remote scripting?
Remote scripting gives you, the web developer, the ability in Web applications to run client side
javascript code and run server side Java code at the same time. Usually you create client Javascript
to control a web application's user interface. Now with remote scripting, your user's action on the
interface can trigger your client javascript function to call server side Java function to perform
server tasks, including database queries, middle-tier business logic, and so on. When server side
java function is done with the task, it returns the result to your client Javascript callback function,
then your client javascript function can use the result to partially update some components of your web.
This is nice because it naturally preserves the client user's interface state without loading the page
from web server.
"Because remote scripting runs on the server while the client page is still active, your scripts are
greatly simplified and the application can present a richer, more responsive interface to the user."
- quoted from Microsoft Remote Scripting site.
What is remote scripting?
Remote scripting is essentially a RPC, Remote Procedure Call. In client-server diagram, it allows client
program to run the methods in server side and retrieve information from server easily.
Microsoft has a remote scripting, why do I need this library?
Microsoft has a remote scripting library, it uses an Java applet in client side to proxy the communication
with the web server. This requires the user to install JVM on his/her machine. Java JVM has many versions,
if a user installed a wrong version of JVM, the code is not going to work.
Microsoft Remote Scripting targets at Javascript, ASP platform. If you run a JSP engine on server side, you
need create your server side code to listen the function call from Java applet.
Who developed Remote Scripting?
Brent Ashley developed the remote scripting client library. He cleverly took advantage of the DHTML, using
layer, iframe etc to proxy the communicate with the web server. Since layer and iframe are built-in browser
support, no extra download is needed. It works naturally with the browser.
Erik Hatcher publised his server side code for Ashley's remote scripting in 2001. Ashley's code has changed
since then. We developed/improved the library based on Ashley and Erik's ideas.
What is the difference?
In one of my recent JSP Java web application, I had hard time to get the code working. So, I decide
to wrote the Java server side code based on Erik's idea. A few things I did:
- I fixed the encoding bug, in Ashley
and Erik's code, if function parameter has + in the value, the + will turn into space on server side.
- I added
logging support. The log function is left to the concrete subclass writer.
- This server side library is purely
for Ashley's JSRS client code, instead of handling Microsoft Remote Scripting and Ashley's using if else statement.
In most of cases, user will not mix Microsoft remote scripting and Ashley's
remote scripting in one web application. It makes more senses just dealing with Ashley's JSRS client.
- The server side library is developed over JVM 1.4. Measures have been taken to maintain good performances.
How to use it?
Step 1: Download the library.
Step 2: Uncompress the zip file. You will see at least two important files: jsrsClient_rev.js, RemoteScripting.java.
Step 3: Copy the jsrsClient_rev.js file to your web application document root filesystem tree.
Step 4: Copy the RemoteScripting.java to your normal java source package, remember change the package statement at the top.
Step 5: Create a servlet, extends RemoteScripting class.
Step 6: Implement log function, implement the methods you want to run at server side in your servlet.
Step 7: In your client HTML or JSP page, create your callback function for the server side method to call.
Step 8: Whenever you want to make server side procedure call, call this:
jsrsExecute(<your servlet name>, <callback function name>, <server side function name>, [optional parameter], [debug true or false]);
Step 9: Done. Now try your code.
A set of sample code is included for your reference: RSTest.html, RSTest.java (servlet).
Help?
If you need help, please post message in our Remote Scripting BBS. If you want to notify if someone answers your question, please
register a BBS account, edit your profile. You may also visit Ashley's forum for help. If you still have question, email us at: sales forperfect.com. We will try to help you. Web development consulting service
is available at a minimum fee.
|
|