Chapter 14. Scripting with Mule

 

In this chapter

  • Using Groovy and Rhino with Mule
  • Implementing component and transformer logic with scripts
  • Leveraging Spring’s scripting functionality with Mule

The undeniable success of the popular web development framework Ruby on Rails epitomizes the benefits of working with scripting languages. The conciseness of Ruby coupled with the lack of a compilation phase makes working on this platform quick and productive. Changes to Ruby on Rails applications can be made on the fly while the application is running. This instant feedback is invaluable for debugging, testing, and prototyping. Contrast this with the compile, deploy, and debug cycle that’s present in a compiled language such as Java or C. A typical web application in Java, for instance, needs to be compiled, packaged, and deployed to an application server. To apply modifications to the web application, the cycle must be repeated. Up until now, this has also been the case for your Mule projects. Any changes you’ve made to a component or transformer, for instance, would require you to restart Mule to take effect. This usually isn’t too big of a deal, but wouldn’t it be nice if you could test the component or transformer while Mule was running?

14.1. Using Rhino

14.2. Using Groovy

14.3. Using Spring

14.4. Summary