|
From: Mark R. D. <mdi...@la...> - 2002-10-21 16:39:34
|
Nick Collier wrote: >Hi, > >Any thoughts on a better batch description language? We have a sort of >proto-XML format now together with the utterly confusing "}" based one. >I'm thinking XML should do the job, but maybe something closer to a >natural language would be better and then translate that into XML. Any >thoughts? Examples? > > >Nick > > > I've discovered an Apache Jakarta Commons package called Jelly that really has caught my eye. Its similar in nature to Ant, but its built to be a "scripting" environment instead of a "build" environment. It can be embedded into any other java application (Servlet, Ant, "your application here"). It supports JSP style scripting (EL and tag libraries). I really was struggling with Ant in terms of writting tasks and passing around variables (getting the variables to update involved writting practically every task in another ant target), I think Jelly would really solve alot of my issues. Its supported and donated to to apache by a private company that promotes opensource release of its development projects. So I think it'll be around for awhile. http://jakarta.apache.org/commons/sandbox/jelly/ donated by http://www.werken.com/ So now I'm working twards implementing my batch stuff using this environment. The other cool thing about Jelly, is that it can be bound to Java Objects. I can see actually calling the setters for my model parameters from within the Jelly script because I can instantiate the Model Object and manipulate it from within the script. Theoretically, by providing a sufficiently pluggable system of component Java Beans repast models could be "snapped" together using Jelly Script as well as utilizing Jelly's scripting env for batch processing. -Mark p.s. I understand there's been some interest in my batch task in Ant. The Ant developers really "shun" any any development twards using Ant as a scripting environemnt, thus there are no <for-each>, <while> or any other conditional "type" tags in Ant.( This is where Jelly differs). My Batch task is simply an attempt to provide such conditional capabilities. It is in essance a simplified for loop. Mostly what I was interested with Batch processing was to be able to "select" initial conditions from Probability Distributions (ie Beta(alpha,beta) or Normal(mean,std)). So I also wrote Distribution Rand Generator Tasks that can be used in Ant that are based on the Colt library (examples below). Note: this code works with Ant 1.4.1 and isn't tested with Ant 1.5.x -Mark |