Smooks Features

The basic features of Smooks can be summarized as follows:

  • Fragment based XML/non-XML Processing. Target data Analysis or Transformation resources down to the fragment level of a message/document. This gives more fine-grained control. For example, you no longer need to define a message transformation as a single monolithic operation. Instead, you can define multiple smaller (more reusable) transformations and target them at message fragments on a message profile basis (see below).
  • Profile based XML/non-XML Processing. In situations where there are many different messages to be Analysed and/or Transformed, it is often the case that a lot of logic and configuration becomes duplicated where the same or similar operations need to be performed on more than one message. Smooks supports the notion of a Profile, which allows you to dice and slice your message set in different ways. This, combined with its Fragment based Processing model, allows targeting of resources in a more controlled way. Multiple messages can share the same profile and therefore have resources targeted at them (at their fragments) through this shared profile Vs duplicating the same operation for each message.
  • Mix and Match different tools and languages in the process of transforming a single message/document e.g. it may be easier to transform one part of the document using pure Java or Groovy and another part using a templating solution suchas XSLT or StringTemplate.
  • Simplify your XSLT and StringTemplate Templates by combining the power of XSLT/StringTemplate with that of Java in a clean way using the Smooks Javabean and Templating Cartiridges. This allows you to get that tricky/ugly string data manipulation code out of your templates and into Java (Javabeans), where it can be manipulated more easily. The populated Javabeans are automatically made available to your XSLT or StringTemplate templates through OGNL (see Tutorials).
  • Analyse/Read/Bind your XML and non-XML data into named Javabeans using the Smooks Javabean Cartiridge. The data doesn't need to follow any prescribed format or schema e.g. populate the same "Order" Javabean with data from 2 different "Order" messages that comply with 2 different schemas.
  • Inline Message Transformations. Significant processing overhead can be incurred using XSLT for message transformation. This is because compliant XSLT Processors must create a complete clone of the message, even if the required transformation only requires modification of a single message fragment. Smooks takes a different approach by processing the "original" message. Inline processing, combined with its Fragment based Processing model, eliminates this type of overhead, making message transformation cheaper and more performant.
  • Non-XML Message Processing. Smooks supports processing of non-XML character based data by allowing you "target" SAX Parsers on a message-by-message basis (or using a profile). For example, the CSV Cartiridge provides support for processing of Comma Separated Value (CSV) data streams and the EDI Cartiridge provides support for processing of EDI message streams. See the Tutorials for an example of using Smooks to process an EDI message.
  • A Message-Set Oriented Solution. Smooks is particularly suited to situations where a Transformation/Analysis solution is required across a message-set. If you have a once off requirement to transform a single message, then Smooks is probably overkill. However, if you need a Transformation/Analysis solution to cater for an environment in which there are "many" messages being exchanged between multiple parties, Smooks could be that solution. This is exactly the type of usecase in which Smooks is being used within JBoss ESB.

Labels

 
(None)