>All Tutorials 
Ajax and .NET Ajax and .NET RSS XML
Ajax and ColdFusion Ajax and ColdFusion RSS XML
Ajax and Java Ajax and Java RSS XML
Ajax and PHP Ajax and PHP RSS XML
Ajax and SOA Ajax and SOA RSS XML
Ajax Goodies Ajax Goodies RSS XML
Ajax Tool Ajax Tool RSS XML
Facebook MockAjax Facebook MockAjax RSS XML
Google Web Toolkit Google Web Toolkit RSS XML
JavaScript Framework JavaScript Framework RSS XML
Ruby on Rails Ruby on Rails RSS XML
Technique Introduction Technique Introduction RSS XML
Without XMLHttpRequest Without XMLHttpRequest RSS XML
Yahoo! UI Yahoo! UI RSS XML

Ajax for Java developers: Ajax with Direct Web Remoting - dwr cart ajax java methods javascript item web

 
Registered tutorials: 501
Registered Users: 36172



Rating: 1.33 out of 3 votes cast


  
Category: Ajax and Java

Tags Map

access accessible add added additemtocart addtocartbuttonhandler ajax application applications approach array article articles attribute avoid based batching bean build button call callback called calling calls cart case catalog catalogdao cell class classes clicked client clients code config cons content contents convert converted converterbean convertor create creator creatornew dao data deal developers developerworks development direct displaycart displayed domain download dwr dwrxml easily easy element elements engine expected expose exposed expression extra field figure file form framework function functionality functionitem functions generated getcart good grained http ibm id implement implementation implementing important include information instance invoked item items java javabeans javascript json learn level library list listing map matching mccarthy members method methods nameclass named nameinclude names object objects obtain order page pages param perform philip point populate previous price product products pros provide public quantity rate remember remote remoted remoting representation representations representing request requests resources response return returns role row rpc scenario search security serialization series server services servlet session shopping shown shows side simple simply single source specifies state store string table takes technical technologies technology tells test time top total types ui update user var web work working write writing xml xmlhttprequest

Keyword Cloud Navigation Map

Ajax for Java developers: Ajax with Direct Web Remoting

Digg this   Post to del.icio.us

Abstract: This tutorial shows how to take things one step further, using a framework that formalizes your ability to make remote procedure calls on server-side Java objects from JavaScript client code.

Level: Intermediate

Philip McCarthy ([email protected]), Software development consultant, Independent

08 Nov 2005

Exciting as it is, adding Ajax functionality to your applications can mean a lot of hard work. In this third article in the Ajax for Java developers series, Philip McCarthy shows you how to use Direct Web Remoting (DWR) to expose JavaBeans methods directly to your JavaScript code and automate the heavy-lifting of Ajax.

Understanding the fundamentals of Ajax programming is essential, but if you're building complex Ajax UIs, it's also important to be able to work at a higher level of abstraction. In this third article in the Ajax for Java developers series, I build on last month's introduction to data serialization techniques for Ajax, introducing a technique that will let you avoid the nitty-gritty details of serializing Java objects.

In the previous article, I showed you how to use JavaScript Object Notation (JSON) to serialize data in a format easily converted into JavaScript objects on the client. With this setup, you can invoke remote service calls using JavaScript code and receive JavaScript object graphs in response, not unlike making a remote procedure call. This time, you learn how to take things one step further, using a framework that formalizes your ability to make remote procedure calls on server-side Java objects from JavaScript client code.

DWR is an open source, Apache licensed solution consisting of server-side Java libraries, a DWR servlet, and JavaScript libraries. While DWR is not the only Ajax-RPC toolkit available for the Java platform, it is one of the most mature, and it offers a great deal of useful functionality. See Resources to download DWR before proceeding with the examples.

What is DWR?

In the simplest terms, DWR is an engine that exposes methods of server-side Java objects to JavaScript code. Effectively, with DWR, you can eliminate all of the machinery of the Ajax request-response cycle from your application code. This means your client-side code never has to deal with an XMLHttpRequest object directly, or with the server's response. You don't need to write object serialization code or use third-party tools to turn your objects into XML. You don't even need to write servlet code to mediate Ajax requests into calls on your Java domain objects.



Read Full Tutorial...



Reviews:

Rate and Review This Site

No reviews yet


Statistic Information About this Resource:


Total Hits: 756
Unique Hits: 656


  Daily Weekly Monthly
  Unique Total Unique Total Unique Total
Average 0.2 0.2 0.2 0.2 12 13.6
Current 0 0 2 2 2 2
Previous 0 0 0 0 1 1
Jan 23 0 0 0 0 8 9
Jan 22 0 0 0 0 27 30
Jan 21 0 0 0 0 1 1
Jan 20 0 0 0 0 55 64
Jan 19 1 1 0 0 3 3
Jan 18 0 0 0 0 23 26
Jan 17 0 0 0 0 0 0
Jan 16 1 1 0 0 0 0
Highest 10 13 30 32 90 109


Script Execution Time: 0.95896 | SQL Queries: 10 | Members: 501
Ajax Tutorial Top List - Powered by Aardvark Topsites PHP 5.1.2