Beginner in DWR

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Beginner in DWR

mkarthik90
Hi i am new to java as well as to DWR. Can DWR help me out in getting the values from the database when never updated without a client request. Can anyone suggest me a tutorial on this . I tried using the DWR.war file but i am not able to understand since i am not proficient in AJAX .
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Beginner in DWR

david@butterdev.com
What DWR does is described on our homepage and overview page:
http://directwebremoting.org/dwr/index.html
http://directwebremoting.org/dwr/introduction/index.html

"Hi i am new to java as well as to DWR. Can DWR help me out in getting
the values from the database when never updated without a client request. "

Your Java code will get the data from the database.  DWR will expose
that Java code and allow it to be called by the browser and serialize
the Java types returned by your Java code into a JavaScript representation.

Since you are new to Java, DWR and AJAX I suggest taking a look at the
official examples.  Start out with the most basic example -
http://directwebremoting.org/dwr-demo/simple/text.html.  The "How it
works" tab will show you some of the basics and the "Source" tab will
show you most of the code.  Reproducing and expanding on that code is a
good place to start.


On 02/18/2012 10:10 PM, mkarthik90 wrote:
> Hi i am new to java as well as to DWR. Can DWR help me out in getting the
> values from the database when never updated without a client request. Can
> anyone suggest me a tutorial on this . I tried using the DWR.war file but i
> am not able to understand since i am not proficient in AJAX .
>
> --
> View this message in context: http://dwr.2114559.n2.nabble.com/Beginner-in-DWR-tp7298090p7298090.html
> Sent from the DWR - Users mailing list archive at Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Beginner in DWR

mkarthik90
Thanks. I downloaded the WAR file and tried the example.
The class file Demo was missing so i loaded it from the source given in the HTML file as a comment .
can you suggest me any example which contacts the database using a servlet and the JS is used for updating.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Beginner in DWR

mkarthik90
As given in the introduction pages i found that DWR uses a reverse AJAX.
Can you tell me whether the servlet can automatically push the data without a request from server.
can you suggest me any available examples for making it ?

On Sun, Feb 19, 2012 at 11:27 AM, mkarthik90 <[hidden email]> wrote:
Thanks. I downloaded the WAR file and tried the example.
The class file Demo was missing so i loaded it from the source given in the
HTML file as a comment .
can you suggest me any example which contacts the database using a servlet
and the JS is used for updating.

--
View this message in context: http://dwr.2114559.n2.nabble.com/Beginner-in-DWR-tp7298090p7298125.html
Sent from the DWR - Users mailing list archive at Nabble.com.



--

Regards,

Karthikeyan.M

(Ubuntu lover)

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Beginner in DWR

mkarthik90
In reply to this post by david@butterdev.com
I tried loading the War file given in the Downloads page. When i export those in my Eclipse IDE i just have the package name with no classes files available. Where can i get the source for  having a complete understanding?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Beginner in DWR

david@butterdev.com
The source is available on our download page:
http://directwebremoting.org/dwr/downloads/index.html (dwr-src.jar).

On 02/19/2012 01:01 AM, mkarthik90 wrote:
> I tried loading the War file given in the Downloads page. When i export those
> in my Eclipse IDE i just have the package name with no classes files
> available. Where can i get the source for  having a complete understanding?
>
> --
> View this message in context: http://dwr.2114559.n2.nabble.com/Beginner-in-DWR-tp7298090p7298252.html
> Sent from the DWR - Users mailing list archive at Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Beginner in DWR

david@butterdev.com
In reply to this post by mkarthik90
DWR does have a Reverse AJAX feature which is a server-side push.  There are examples in the dwr.war (Reverse AJAX clock).

On 02/18/2012 11:27 PM, Karthikeyan Mohan wrote:
As given in the introduction pages i found that DWR uses a reverse AJAX.
Can you tell me whether the servlet can automatically push the data without a request from server.
can you suggest me any available examples for making it ?

On Sun, Feb 19, 2012 at 11:27 AM, mkarthik90 <[hidden email]> wrote:
Thanks. I downloaded the WAR file and tried the example.
The class file Demo was missing so i loaded it from the source given in the
HTML file as a comment .
can you suggest me any example which contacts the database using a servlet
and the JS is used for updating.

--
View this message in context: http://dwr.2114559.n2.nabble.com/Beginner-in-DWR-tp7298090p7298125.html
Sent from the DWR - Users mailing list archive at Nabble.com.



--

Regards,

Karthikeyan.M

(Ubuntu lover)


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Beginner in DWR

david@butterdev.com
In reply to this post by mkarthik90
"can you suggest me any example which contacts the database using a servlet
and the JS is used for updating."

You write your database code as your normally would.  A good place for it would be in a service (not a servlet).  You can then expose the methods on your service class to DWR and DWR can call them as well as any other client.



On 02/18/2012 10:57 PM, mkarthik90 wrote:

> Thanks. I downloaded the WAR file and tried the example.
> The class file Demo was missing so i loaded it from the source given in the
> HTML file as a comment .
> can you suggest me any example which contacts the database using a servlet
> and the JS is used for updating.
>
> --
> View this message in context: http://dwr.2114559.n2.nabble.com/Beginner-in-DWR-tp7298090p7298125.html
> Sent from the DWR - Users mailing list archive at Nabble.com.
>

Loading...