• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Dwr
 

Dwr

on

  • 1,405 views

 

Statistics

Views

Total Views
1,405
Views on SlideShare
1,405
Embed Views
0

Actions

Likes
1
Downloads
13
Comments
1

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Dwr Dwr Presentation Transcript

    • @Andre_Mayer
    • wtf dwr?
      • 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.
      • DWR is Easy Ajax² for Java
      • ¹ Direct Web Remoting
      • ²A synchronous J avascript a nd X ML
    • Joe Walker
      • DWR consists of two main parts:
        • A Java Servlet running on the server that processes requests and sends responses back to the browser.
        • JavaScript running in the browser that sends requests and can dynamically update the webpage.
      • 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.
    • why use dwr?
      • DWR will give you productivity by enabling you call your java classes/methods with very few lines of javascript code
    • script browser side
      • Avoid complex XMLHttpRequest code, DOM manipulation, use DWR instead ;)
    •  
    •  
    •  
    • web.xml
    • dwr.xml
      • This definitions will generate javascript file in runtime named Chat.js
    •  
    • 5
    • Chat.js
    • engine.js
    •  
    • it works!!
    • 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