Your SlideShare is downloading. ×
0
Dwr
Dwr
Dwr
Dwr
Dwr
Dwr
Dwr
Dwr
Dwr
Dwr
Dwr
Dwr
Dwr
Dwr
Dwr
Dwr
Dwr
Dwr
Dwr
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Dwr

1,252

Published on

Published in: Technology
1 Comment
1 Like
Statistics
Notes
No Downloads
Views
Total Views
1,252
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
19
Comments
1
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. @Andre_Mayer
  • 2. wtf dwr? <ul><li>DWR¹ is a Java library that enables Java on the server and JavaScript in a browser to interact and call each other as simply as possible. </li></ul><ul><li>DWR is Easy Ajax² for Java </li></ul><ul><li>¹ Direct Web Remoting </li></ul><ul><li>²A synchronous J avascript a nd X ML </li></ul>
  • 3. Joe Walker
  • 4. <ul><li>DWR consists of two main parts: </li></ul><ul><ul><li>A Java Servlet running on the server that processes requests and sends responses back to the browser. </li></ul></ul><ul><ul><li>JavaScript running in the browser that sends requests and can dynamically update the webpage. </li></ul></ul>
  • 5. <ul><li>DWR will generate the JavaScript to allow web browsers to call Java code . It can marshal virtually any data (using JSON) including collections, POJOs, XML and binary data like images and PDF files. </li></ul>
  • 6. why use dwr? <ul><li>DWR will give you productivity by enabling you call your java classes/methods with very few lines of javascript code </li></ul>
  • 7. script browser side <ul><li>Avoid complex XMLHttpRequest code, DOM manipulation, use DWR instead ;) </li></ul>
  • 8.  
  • 9.  
  • 10.  
  • 11. web.xml
  • 12. dwr.xml <ul><li>This definitions will generate javascript file in runtime named Chat.js </li></ul>
  • 13.  
  • 14. 5
  • 15. Chat.js
  • 16. engine.js
  • 17.  
  • 18. it works!!
  • 19. Advantages Disadvantages Easy integration between Java and JavaScript Only works in Java platform. Integrates with Spring Beans; Marshalling: JSON may be unsafe unless you are using unpredictable URLs. Real possibility to keep your MVC standard Going through not standard way in “transfer technologies” using AJAX (old-fashion) instead web sockets (socket.io) Integrates with leading Java Frameworks ( Spring, JSF, Hibernate) Debugging in console; Cross-browser

×