Monday, July 25, 2005

XDoclets, AJAX, JavaScript, Struts and MyEclipse

I have noticed very quickly that writing AJAX applications is getting messy fast. A lot of the code to write is very standard, and it is very easy to make mistakes. I do remember the same kind of problems with EJB's, and how XDoclets solves most of those problem. I have been looking quite intensively on the web to find if somebody has used XDoclets for AJAX, but could not find any solution.

So I am thinking of cooking my own XDoclet solution. I want to be able to put XDoclet tags in a Struts Form which
  1. Generate a JavaScript file.
  2. Add a function that sends a AJAX request from the webpage
  3. Add a function that handles the response
  4. Add a function that adds the form HTML to the document
  5. Injects an onLoad function inside the body function of a specified HTML 0r JSP file
  6. Injects the JavaScript file descriptor in the header of the same file
I have had a lot of problems getting some good information on the web, but this OnJava article gives some good clues. I have been experimenting with the MyEclipse IDE and I am going to test if I can get this to work. I'll be reporting back

No comments: