Why Smooks was Created

From Smooks

Jump to: navigation, search

Smooks started life as a transformation solution. The main goal was a solution in which one could perform "fragment based transforms" on a message. Supporting fragment based transforms opened up the posibility of mixing and matching different technologies within the context of a single transformation. This meant that one could use different technologies for transforming different fragments of a message, depending on the type of transformation required by the fragment in question.

In the process of building this fragment based transformation solution, we realized that we were actually building a much more general fragment based processing solution. We were building a solution that supported targetting of custom Visitor logic, of any kind, at fragments of a message. We realized that this Visitor logic did not need to be restricted to the realm of message transformation. We could implement Visitor logic to perform all sorts of operations on message fragments (and therefore a message as a whole). Up to the point of writing, Smooks has support for the following forms of fragment based message processing:

  • Templating: Fragment Transforms using XSLT or FreeMarker, with the ability to be extended to use other technologies.
  • Java Binding: Bind message fragment data into a Java Object model.
  • Splitting: Perform complex splitting of messages fragments, routing the split message fragments over a range of different transports/destinations e.g. File, JMS, Database, ESB.
  • Enrichment: Enrich message fragments with data from a Database.
  • Persistence: Persist message fragment data to a Database using raw SQL, or by reusing your existing JPA, Hibernate or iBATIS resources.
  • Validation: Perform basic or complex validation on message fragment data. This is more than simple type/value-range validation. Complex rules based validation is also possible.

Smooks now also supports a wide range of message source formats - XML, EDI, JSON, CSV, Java (Java to Java!). Smooks has a pluggable Reader interface which allows you to plug in a Reader implemntation for any data format.