The Artima Developer Community
Sponsored Link

Java Buzz Forum
Requesting dynamic information from HTML without Reloading

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Goldy Lukka

Posts: 1008
Nickname: xyling
Registered: Jan, 2004

Goldy Lukka is a Java Developer and an Entrepreneur. He is Founder of xyling.com.
Requesting dynamic information from HTML without Reloading Posted: Dec 14, 2004 2:51 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Goldy Lukka.
Original Post: Requesting dynamic information from HTML without Reloading
Feed Title: Xyling Java Blogs
Feed URL: http://www.javablogs.xyling.com/thisWeek.rss
Feed Description: Your one stop source for Java Related Resources.
Latest Java Buzz Posts
Latest Java Buzz Posts by Goldy Lukka
Latest Posts From Xyling Java Blogs

Advertisement
Have you ever wished, your HTML page had not gone for a ROUND TRIP (loading most of the page again for a part of dynamic information) from the server to get a small piece of information?

Consider this scenario. A user is filling his registration form. The user selects his country of residence. At this point you want the HTML form to auto fill the "State/City" drop box with the available options on the SERVER SIDE DATABASE. What will you do?

You have 3 solutions.
1. Write the JavaScript that has all the information from the server (regarding the states for EACH country) before loading the HTML form. (Expensive in terms of size and Latency).

2. Let the page refresh (i.e. go back to server to load most of the redundant information again) and display "States" for the Country user has selected. (ROUND TRIP)

3. Use Direct Web Remoting. This technique allows JavaScript to call server side Java Programs without requiring a FULL ROUND TRIP. Direct Web Remoting (DWR as it is called) is a simple servlet plugin that allows you to expose selected Java methods directly via JavaScript.

Google suggest uses similar technology. Try typing any letter or word in the search box and wait for a second.

DWR makes writing dynamic web pages that interact with a server (like GMail) easier and simplifies server-side coding.

DWR is licenced under LGPL. Title of this page will take you to the DWR project home page.

NOTE: Do read the issues relating to security and readiness for a stable performance.

[Resource-Type: Tips; Category: Java/J2EE, Web; XRating: 4]

Read: Requesting dynamic information from HTML without Reloading

Topic: Twiddling on whether my Tests use mocks or The Real Thing (tm) Previous Topic   Next Topic Topic: J2ME Open Source Software Directory

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use