Showing posts with label DWR. Show all posts
Showing posts with label DWR. Show all posts

2007-06-22

Velocity Engine

I've been working with Velocity in Portlets and DWR (version 2) and found that I had to write my own Velocity utils to allow the DWR and generic Portlets to share context. I know there are velocity portlet classes our there but they are usually for a specific system of portals. Personally, I'm trying to write velocity portlets that can load on Liferay, JBoss, or any other Portal system.

As I was searching around at the start of the project I found that there were no portlet classes for velocity based portlets that were written generically to plug into any portal system. I ended up writing a short Velocity utility class to glue the two contexts together.

2006-11-15

Direct Web Remoting

DWR (Direct Web Remoting) is yet another Ajax framework. This one is, however, a Java framework that makes a heck of a lot of sense for java developers. Take a POJO. Register it in the dwr.xml file under WEB-INF in your war... and now you have an object you can call from your webpages.

Yeah. I didn't believe it either. But the 2.0 beta of DWR that I have been working with is really just about that easy. DWR generates the javascript which you just include in a page, then it generates the servlet that the javascript calls. DWR turns a POJO into an Ajax servlet.

See how easy it is to get started with DWR and if I get enough feed back I'll post some code samples of how to do a portlet that has can process actions using that POJO you registered with DWR. Now with some very simple (but smart) scripting you get Ajax features that automatically degrade to universally supported portlet actions.

And that is why DWR is head and shoulders over some very wrong-headed attempts to turn Ajax web development into Swing or pseudo-swing development. The web is the web. Features should degrade gracefully and page designers and artists should be able to work with programmers to create web applications that work well, look nice, and degrade gracefully.

see also: my DWR tag roll on del.icio.us