Graphicsbuilder does SWF too - No Fluff Just Stuff

Graphicsbuilder does SWF too

Posted by: Andres Almiray on April 3, 2008

It was bound to happen, once I rediscovered the Ming library through vnc2swf while making screencasts I knew I had the tools to output SWF files using GraphicsBuilder.

Ming offers various language bindings, fortunately one of them is Java, problem is that Ming is currently on 0.4beta but the java extension is on 0.3. Another problem that I found (which was quite annoying) is that the java extension declares all its classes in the default package, somehow making Eclipse & Maven complain while importing the classes. Lastly that extension is built using a Makefile, which may be understandable from the point of view that it is really old code and that it has some native code too.

So the first task was putting ming-java up to date, rolling an Ant based build, even enabling native compilation through the cpptasks from ant-contrib; also moved the classes to net.sf.ming package so no more import conflicts. The code seems to be tied to linux but I believe it may be possible to compile the native library for other OSes.

On the Groovy side, there is a new extension called graphicsbuilder-ext-swf which is responsible for converting from Groovy to SWF, the really good news? you can use the same syntax, the same nodes, nothing has changed :-) This extension has put into evidence some pain points in the API that may also help in making groovy2svg (might as well finish the other side too, right?). Right now it supports transforming basic shapes and color fills, more to come later.

Keep on Groovying!
Andres Almiray

About Andres Almiray

Andres is a Java/Groovy developer and a Java Champion with more than 20 years of experience in software design and development. He has been involved in web and desktop application development since the early days of Java. Andres is a true believer in open source and has participated on popular projects like Groovy, Griffon, and DbUnit, as well as starting his own projects (Json-lib, EZMorph, GraphicsBuilder, JideBuilder). Founding member of the Griffon framework and Hackergarten community event. https://ch.linkedin.com/in/aalmiray

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »