1---2title: 'grails + groovy + jfreechart'3date: '2007-12-21'4published_at: '2007-12-21T15:00:00.000+11:00'5tags: []6author: 'Gavin Jackson'7excerpt: 'I''ve recently been hunting around for a good web-based database-driven graphing solution - one possible combo I am currently evaluating is grails - using the jfreechart graphing library and the mysql...'8updated_at: '2007-12-21T15:26:24.353+11:00'9legacy_url: 'http://www.gavinj.net/2007/12/grails-groovy-jfreechart.html'10---1112I've recently been hunting around for a good web-based database-driven graphing solution - one possible combo I am currently evaluating is grails - using the jfreechart graphing library and the mysql jdbc driver to talk to mysql.1314I spent about 18 months as a J2EE developer a few years back, and I remember being frustrated with how slow and cumbersome it was to develop and deploy J2EE web applications.1516Since I left that world a number of open source technologies have evolved to solve these problems, including: ant/mavis - for building projects and managing dependencies spring - for building web "flows" - I think this was the successor to struts hibernate - for object-relational database mapping More recently, two new players have entered the arena: groovy ([http://groovy.codehaus.org/](http://groovy.codehaus.org/)) - an interpreted language that sits on top of Java - it provides all the flexibility and simple syntax of interpreted languages such as python and ruby, but allows access to the rich Java libraries (which in my opinion define Java as still being a very powerful and flexible language for both client and server side applications development). grails ([http://grails.codehaus.org/](http://grails.codehaus.org/)) - provides a light-weight development environment for building Java web applications.1718It is consists of a number of core technologies - including groovy, spring, hibernate, log4j. I was up and running very quickly - it provides a set of sensible scripts for starting a new project, adding new components to a project, running a test web server and building a deployable "war" file.1920Since I have only just started using it, I really can't say much more about it - but I find it impressive at first glance.2122For a test prototype, I built a grails project and constructed a controllerto query a database using jdbc and produce a simple jfreechart graph that gets sent back to the web client. In less than a day I had this prototype up and running.2324I decided to bite the bullet and spend $60 purchasing the developer guide and sample documentation for the jfreechart java library (which produces some of the nicest looking graphs I have seen), comes highly recommended.252627