|
From: Nicolas De L. <nic...@ca...> - 2006-06-20 07:25:56
|
Hello guys, I've looked at new script support and sounds great for quick design or prototyping "edit source code, hit refresh and get the result", BUT it requires to learn yet another langage. I can agree that "grrovy is great" or "bsh is java like" or any other enthousiastic comment on scripting languages, but my development team has lots of junior java developers and my hierarchy has lot's of old schools men that will make very difficult to accept a "script" language as a valid technology. I'm looking for a way to code scripted spring beans as 100% Java source code, using full IDE support, so that developer doesn't have to know some class is used a scripted bean and some other as compiled code. My first think comes to JSP that are runtime compiled (an re-compiled) by the container. It would be great to have a similar support for java code to be "runtime re-compilable". When the code gets fine, it can be classicaly compiled into a .class and pakaged into the app, by simply changing the spring context. Looking at the way tomcat (jasper) compiles JSP, it seems it uses a custom classloader to load the runtime-compiled .class. My experience with classloaders is limited so I can say if it would be easy, but here is how I'd see this : a FactoryBean creates a proxy for the bean interface and delegates invocation to a "runtime-compiled" class in a child classloader. Hot recompilation requires the bean to be stateless, but this sounds an aceptable constraint if I can code my web controlers or business services by a quick code/test/code. Thanks for any suggestion to make this a reality. Nico. This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. |