Over a million developers have joined DZone.

Interview: Mule ESB Designer on the NetBeans Platform

DZone's Guide to

Interview: Mule ESB Designer on the NetBeans Platform

· Java Zone ·
Free Resource

Download Microservices for Java Developers: A hands-on introduction to frameworks and containers. Brought to you in partnership with Red Hat.

FreeGate is a free and open source Enterprise Service Bus application based on the Mule ESB. It is developed by a Luxemburg-based research institute aiming to simplify and extend Mule, especially with healthcare related functionalities, such as support for HL7, a graphical Message Mapper, a designer for message structures, and similar useful GUI features.

The project is based on the world's only Swing application framework, the NetBeans Platform, with several customizations, and will be published under an open source licence soon.

Below an interview with Daniel Kroeger, a key developer behind FreeGate, in quite some detail about the features of the application, as well as on its basis, the NetBeans Platform.

Hi Daniel, could you start by saying a few things about yourself?

I studied Computer Sciences at the University of Applied Sciences in Trier, Germany, graduating with a diploma thesis for the FreeGate project at the Centre Recherche Public Henri Tudor (CRP), which is a research institute located in Luxemburg. Our department, SANTEC, is focused primarily on the healthcare sector.

Since finishing my studies, I've worked as an engineer for research and development at the CRP. I've continued my work for the FreeGate project while focusing on general Java and EAI / SOA – especially the Mule ESB.

Currently, I'm working in the family music store. Besides programming and network administration, I help in sales, office and building and repairing music instruments. In my free time, I play French Horn in a band and I like doing sports.

What, in a nutshell, is FreeGate?

FreeGate enhances, simplifies, and extends Mule. There is, on the one hand, a graphical user interface that focuses on high usability and extends Mule by providing additional functionality, such as a Message Mapper. On the other hand, FreeGate supports protocols used especially in the health-care sector such as HL7.

Now in some more detail, how does FreeGate help development with Mule?

Essential to working with Mule is an XML file that configures the particular components, endpoints, routers, and so on. The FreeGate Workflow Designer simplifies the generation of such a configuration file by a clearly structured workflow. The user simply drags the components from the palette and drops them into the workflow:

The particular attributes of the currently selected element are shown in the Properties window. The user can also validate the configuration for required or recommended property fields.

After creating the configuration, the user can run a test by starting Mule from FreeGate and using the monitoring plugin and the output to identify bottlenecks or configuration errors. The Monitoring plugin is AJAX based and can be run in a web browser. It lets you log messages at particular components of the workflow, see statistics and the status of the transactions and the current machine, and stop, pause, or start particular components.

If the user so desires, custom message structures can be created via the Template Designer module and the  Message Transformers. The Template Designer lets you create message structures:

Even complex, multi-level message structures such as HL7 can be created or edited. FreeGate already comes along with prepared HL7 message structure templates!

The Template Designer supports the levels delimited, fixed-field-length, xml, mixed and even the creation of Excel message templates. The user is always guided through the message structure by symbols and icons to indicate the type, the occurrence, and the required attributes.

For each message field, a type can be defined. Currently supported types are String, Integer, Decimal, Datetime, Binary, and Boolean. Depending on the type, several restrictions can be specified, e.g., the upper and the lower limit for Integer and, additionally, the fraction digits for the Decimal type, among a lot of others. When Mule is running, the messages are then validated against their structure and the message fields for their values.

The generated message structure templates can also be used to simplify the generation of business logic by using the Message Mapper module. The user simply  needs to define the incoming and the outgoing message structures by choosing the appropriate template:

FreeGate then generates the Java class that later on is used by Mule in the business logic component. The Message Mapper supports a fully integrated NetBeans Java editor, but if the user prefers, the mappings can be created by simply dragging the message fields or structures from the source message tree and dropping them on their target structure or field in the destination message tree. The code is generated automatically. The user is always free to edit the code. Afterwards the class can be compiled and - if successfully compiled - is automatically deployed in the appropriate directory of Mule.

FreeGate always focuses on high usability! Therefore, the intention is to always provide information to the user in a human-readable way, such as when required fields in the Template Designer are not set yet or if the set values are not valid. Additionally, FreeGate has a Message Tester and a Rapid Templating module to validate and simplify the creation of a message structure template.

With the Message Tester, the user can drop, open or edit an example message file, and parse it into the current message template:

If the message can be parsed successfully, the user can see values on the particular message fields in a tree. If the example message could not be parsed for any reason, the user gets a human-readable error message to be able to find the error quickly in the message structure.

The Rapid Templating module goes the other way round. By using an example message and specifying the delimiters a message structure prototype can be generated automatically by FreeGate:

That simplifies the creation of a message structure enormously, especially if it is huge and complex.

And why is the NetBeans Platform used as the framework here?

We decided to use the NetBeans Platform because at the time we started development NetBeans IDE provided the most mature GUI support. Matisse is a very useful and sophisticated tool and there is no need to think about docking or resizing and replacing of windows thanks to the NetBeans window system.

Additionally, a lot of features provided by the NetBeans Platform, such as the Java Editor, the Palette, and the Properties window are used by FreeGate. Therefore, the NetBeans Platform simplifies and accelerates the development of the application enourmously.

What's the current status of this application?

The application is still under development. Currently, it is in a beta and testing phase. It is not published yet, but it will be published under an open source licence in the near future. As our department is focused on healthcare technologies, the application is intended to be used mainly in hospitals. But it can also be used for all other scenarios where the Mule ESB can be used.

Download Building Reactive Microservices in Java: Asynchronous and Event-Based Application Design. Brought to you in partnership with Red Hat


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}