Thursday, May 4th, 2006
DWR version 2.0 milestone 2: Write Javascript using Java
Milestone 2 contains some great new features like Annotation based configuration and a customization to allow Reverse Ajax to use Jetty Continuations.
It also contains an experimental new feature to let you write Javascript using a Java API. Read on for how it works and why it can allow you to do some neat things.
Annotations: If you are using Java 5 then you can make use of the new DWR annotations thanks to Maik Schreiber. Combined with support for generic type reflection in milestone 1 (to get rid of the need for a <signature> element) you can use DWR without any need for dwr.xml. For more detail see the annotations documentation.
Jetty Continuations: The ongoing work with Reverse Ajax is to ensure that no webservers get hurt as a result of the extra load. The first piece of the puzzle is from Greg Wilkins of Jetty fame. If Reverse Ajax is turned on in a Jetty servlet engine then DWR will automatically use Jetty’s Ajax Continuations to save on server threads.
Write Javascript in Java: The New Java APIs create Javascript which is executed on the browser. We’ve started with DWRUtil and Scriptaculous Effects.
There are several reasons why you might want to do this:
- DWR can use it’s Reverse Ajax feature to make your calls affect several browsers at the same time. This make writing Chat type apps quite easy.
See the full release notes for more details on this and other features, with some examples of writing Javascript in Java.
Please note that this API is very experimental so we’re not totally sure that we should implement it as we have done, or even if it is a good idea at all. I’m interested in your feedback.












“…ensure that no webservers get hurt as a result of the extra load?” I guess that stateful firewalls, load balancers and other innocent network appliances won’t suffer from this new innovation?
Almaer ~
I am facing problem in using the Collection object in DWR. I am using the Sping application context to intiate the service bean of DWR.
Client side scripts throws syntax error, upon returing the collection of custom java object from server sider.
Thanks
prasad
ë³¸ê´‘ê³ ëŠ” ì „ìžìƒê±°ëž˜ë“±ì—ì„œì˜ ì†Œë¹„ìžë³´í˜¸ë²•ì—관한 ë²•ë¥ ì œ13ì¡° ì œ1í•ì˜ ê·œì •ì—ì˜í•œ ê´‘ê³ ìž…ë‹ˆë‹¤â€¦
서울시 중구 ì´ˆë™ 158-6 ì²ìˆ˜B/D4층 (代)02-2263-7528
êµì œì „í™”ê°€ìž¥ì €ë ´í•˜ê²Œ 사용하는ìƒí’ˆ 들입니다.
ì¸í„°ë„·í° 사용ìžëŠ” 무료로 드립니다.(USBí°ë§Œì ìš©)
ì•„ëž˜ì˜ ê·¸ë¦¼ì´ ë³´ì´ì§€ 않ì„ì‹œì— ìžì„¸í•œ ë‚´ìš©ì€ í™ˆíŽ˜ì´ì§€ ë‚´ìš©ì„ ì°¸ì¡°í•˜ì‹ì‹œìš”…
*홈페ì´ì§€: jooanitn.com *한êµìƒë‹´(代)02-2263-7528*중êµìƒë‹´020-3660-3790
í—ˆë½ì—†ì´ ê¸€ì„ ì˜¬ë ¤ 대단히 죄송합니다.게시íŒì„±ê²©ì— ë¶€ì 합하면 ì‚ì œì‹œ 패스워드12345입니다.
등ë¡ì„ 거부하실때ì—는jooan1@korea.com으로 홈피ì˜ì£¼ì†Œë¥¼ 기입하셔서 ê±°ë¶€ì˜ì‚¬ë¥¼ 보내주시면
다ìŒë¶€í„°ëŠ” ì ˆëŒ€ë¡œ 올리지 ì•Šê² ìŠµë‹ˆë‹¤. 번거ë¡ê²Œ í•´ ë“œë ¤ì„œ 대단히 죄송합니다.
http://ajaxian.com/archives/subject-dwr-version-20-milestone-2-write-javascript-using-java
The page page above doesn’t display well on Firefox 2.0.0.3 on Windows XP. It’s shifted 3 inches to the right and there’s text that overlaps other text.
– Doug
http://ajaxian.com/archives/subject-dwr-version-20-milestone-2-write-javascript-using-java
The page page above doesn’t display well on Firefox 2.0.0.3 on Windows XP. It’s shifted 3 inches to the right and there’s text that overlaps other text.
– Doug
I’m dying to use this because i have OCD, and i check the same websites over and over within sometimes even a span of 2 to 3 minutes, this is a life saver. Would be nice if it could support websites without RSS or any news format, so i could automatically check if sites like http://www.thebestpageintheuniverse.net/ update without having an RSS feature.
Gooliver, Editor of the ‘ How To Increase Semen Social Project