Tuesday, February 03, 2009

[Misc] It becomes quiet around BPEL?

BPEL stands for Business Process Execution Language and will be used to execute business processes. But there are other standards which can also be used to execute your business process. What about XPDL - XML Process Definition Language? Nevertheless, many BPM vendors adopt their workflow engine to BPEL in order to survive on the BPM market. It's a mistake. Most of the products provide a BPEL engine as an additional modul, because most of the BPM/Workflow Engine products work successfully without using BPEL. At the same time as BPEL was pushed, the BPMN - Business Process Modeling Notation - was hot discussed, a notation to model business processes. When you look on the BPMN homepage you will find a BPMN to BPEL transformer, describing the mapping of BPMN elements to suitable BPEL elements.

I find an article with the topic "BPEL: Who needs it anayway?" written by Keith Swenson, discussing the usage of BPEL in the industry.
"There are a few vendors who promote BPEL as as the one-and-only-true-way to support BPM. In fact, it is good for some things, but fairly bad at a large number of other things. It is my experience that BPEL is promoted primarily by vendors who specialize in products we might rightly call “Enterprise Application Integration” (EAI). These companies have recently taking to calling their products “Business Process Management”. Potential users should be asking the question “Is BPEL appropriate for what I want to do.” In that aim, there should be a large number of articles discussing what BPEL is good for, and what it is not, but there are very few articles of this nature."
He also mentioned that BPEL supporter make the following assumptions:
  • The people making the processes are programmers
  • The activities in a process only need to send, receive or transform XML data
  • Any standard will be better than no standard
What about the human integration in BPEL? The human integration is not supported in the standard, yet. You can use the WS-BPEL Extension for People, where each vendor implement this on his own way.

In the article he illustrates how to execute a BPMN diagramm directly using XPDL. The diagram is interpreted directly without converseion to another model.

To summarize, I see there are a lot of successfull SOA projects which do not use BPEL. It goes also without BPEL. However, there are scenarios where BPEL is very useful and makes sense, but I will mention, that BPEL is not the "All-Solution" standard. I am strained on the future of BPEL.

Friday, January 23, 2009

[Tech] An easy to use XML Serializer

XML processing is an important part in present software systems, especially when communicate with other software components in the IT infrastructure. Pretty often you must provide your object data as XML. The Open Source market provides a wide range of XML tools, above all XML mapping tools, like Castor, JAXB and others. A very intersting and compact tool, existing since 2004 is XStream hosted on Codehaus. XStream is a proved XML serializing library and provides the following key features:
  • Easy to use API (see example)
  • You do not need explicit mapping files, like other serializing tools
  • Good performance
  • Full object graph support
  • You can modify the XML output
Let us consider a simple business object, person, implemented as a POJO (taken from the XStream homepage):

public class Person {
private String firstname;
private String lastname;
private PhoneNumber phone;
private PhoneNumber fax;
// ... constructors and methods
}

public class PhoneNumber {
private int code;
private String number;
// ... constructors and methods
}
In order to get a XML representation of the Person object we simple use the XStream API. We also set alias names which are used in the output XML.
XStream xstream = new XStream();
xstream.alias("person", Person.class);
xstream.alias("phonenumber", PhoneNumber.class);
String resultXml = xstream.toXml(myPerson)
When creating a new instance of the person object an serialize it via xstream (toXml) we get the following XML result. As we can see our alias names are used.

<person>
<firstname>Joe</firstname>
<lastname>Walnes</lastname>
<phone>
<code>123</code>
<number>1234-456</number>
</phone>
<fax>
<code>123</code>
<number>9999-999</number>
</fax>
</person>

The example illustrates that the framework is very compact and easy to use. Look at the 2 Minute tutorial on the XStream homepage to get more examples. You can also implement custom converter and transformation strategies to adapt XStream to your requirements.

Have fun with XStream.

Tuesday, January 20, 2009

[Pub] Data transformation in an SOA

I published a german on article on JAXCenter about data transformation in Service Oriented Architecture. When different applications talk to each other, you must find a suitable data format which all applications can interpret. For the most cases XML is the first choice, because there is a wide range of tool support and additional standards, like Schema Editors, XPath and the like.

In this article I give an overview about the Open Source Framework Smooks, which can be used for data transformation in SOAs. Smooks provide some interesting features:

  • Data Transformation (XML, CSV, EDI, Java, JSON,..) and custom transformers
  • Java Binding from any data source (CSV, EDI, XML,..)
  • Huge message processing by providing concepts like split, transform or route message fragments. You can also route fragments to different destinations, like JMS, File or databases
  • Message Enrichment
Above mentioned attributes/features are also ideal candiates where an Enterprise Service Bus can help. Rather existing Open Source ESBs, like Mule or JBoss ESB can profit from a technology like Smooks. In last part of the article I describe the Smooks extension for Mule which provides:
  • Smooks Transformer for Mule. The transformation logik is done in Smooks
  • Smooks Router for Mule. The routing logik can be configured in Smooks

Sunday, January 04, 2009

[Misc] Clean Code Developer

Some days ago the recommended .NET Expert Ralf Westphal (with Stefan Lieser) has published in his blog (which is always worth reading) about a new Software Engineering Website called Clean Code Developer (written in german).

The websites name is a little related to the book clean code from Robert Martin I recently reviewed here.

To me this website is stunning in many ways. It is the approach to bring professional development into the minds of all developers. And so it lists and explains the most important development principles on this webpage. Furthermore all tools are listed that help to achieve the goal of good development.

But the website doesn't stop here: a related forum for "clean code" discussion has been set up and they have introduced grades for every developer. So the principles have been rated and put into six grades that are associated to colors (from red to white). So every developer can learn and practice these grades and the included clean coding principles.

For those who have fun doing this you can buy a colored bangle starting from red and buying the others later for 5 €. The idea is to remind yourself always writing clean code. Whether you like the last idea is up to you. But this website really bridges an educational gap: at the university you normally learn programming and something like design patterns in an advanced software engineering course (beside of tons of UML). You nearly never learn good coding principles although many of us will code in
their later career.

So as my new years recommendation I would be happy if you can check out the website given above and join the idea of a clean code awareness.

Let this be one of our answers to the financial crisis.

Saturday, December 20, 2008

[Pub] Mule IDE

I published an article about the new Mule IDE in the current issue of the Eclipse Magazin. In the article I give an overview about Mule and how the IDE supports developers to model their Mule applications. The IDE provides the following features:
  • Mule project wizard
  • Mule runtime configuration (you can define different Mule runtimes)
  • Graphical Mule Configuration Editor
  • Start your Mule Server from your IDE
More information about the Mule IDE you can find on the Mule IDE homepage.

Friday, December 19, 2008

[Arch] Application Architecture Guide

The architecture and design of software applications should be technical neutral. The Application Architecture Guide from Microsoft guides developers through the design of applicataions based on the .NET platform. In my opinion, this architecture guide not only focus on the .NET platform and is a really good cookbook for Software Architects. As we present in our Best Practice Project, design patterns, are technical neutral and can be used in any language. The design principles of a Data Access Object or a Proxy are the same in Java as in .NET.

The guide can be used as a reference and provides the following five parts: Fundamentals, Design, Layers, Quality Attributes and Archetypes - Desgin and Patterns.

Fundamentals

The first part focus on fundamental architecture concepts, including application Archetypes, Layers and Tiers and Architectural Styles. On chapter focus on the .NET platform.

Design

The second part is very interesting for software analysts by providing some guidelines to design your application. Here you will find best practice approaches to make decisions about the distribution, select the right application type, choose the right architectural style (component based, message-bus,...). The chapter Architecture and Design is on of the most interesting one, because it provides guidelines to design considerations, architecture frame, persistence, security and some other topics. The last chapter Communication guidelines provides best practice approches to use the right communication between your software components and describes the design impact of choosing a communication technology.

Layers

The layers part focus on the layered architecture and describes each layer in detail, including Presentation, Business, Data Access and Service Layer. The layered architecture is on of the common used architecture styles in software projects.

Quality Attributes
In this part non functional requirements in software projects are described and how these requrements can be achieved by doing the right design. What must be account for to be secure and performant.

Archetypes - Design and Patterns

Don't compare this chapter with Maven Archetypes. The last part of the architecture guide describes different types of applictions, like Mobile Application, RIA or Web Application. This is very interesting because you will find which typical design principles and design patterns are used in such an archetype. For example one of the key patterns in Web Applications are Composite View, Front Controller, the classical MVC, Page Cahge or the page controller.

This architecture acts as Bibel for developers and you fill find less .NET code. In my opinion this guide is realy good and should be checked by every software architect and analyst.

Thursday, December 18, 2008

[Misc] Virtualisation for Software-Engineering

The easy accissible virtualisation tools like Virtual Box enable new applications in software engineering. An obvious usage pattern would be, to provide prepared systems for customers to evaluate that would require rather complex installations and setups.

Not so apparent is the usage in automated testing. Tests of higher granularity like integration tests are sometimes difficult to automate as they often require (again), complex installations of several components (database, middleware, legacy components...), setup of these components plus a consistent state of all these components. Virtualisation can facilitate that process significantly. The developers can create a consistent image of the system where all dependent systems are properly installed, configured and fed with data.

This image is used as reference. In the build and test automation one has to get the clean image, start it, install the more "dynamic" modules, i.e. the system under development and test, and execute the (integration) tests in the virtualisation, then collect the test results and shutdown the virtual system again. That procedure allows deterministic test-scenarios on different machines, also (or particularly) on a continuous integration server.

Sounds good, however in practice I am still missing some tools that support that. Linux in the box is of course a good start as everything is easily scriptable. However, if you want to include the virtualisation into the build-automation (e.g. in Maven) and into the continuous integration server, plugins to Maven/Ant... would be useful that allow to control the virtualisation environment, trigger activities there and retrieve data (e.g. the test-results).

In an initial research I did not find much tools in that area, any ideas?

Tuesday, December 09, 2008

[Misc] Glassfish

I recently informed myself about the (Sun) Glassfish J2EE server. I never took it as a serious competitor in the field, as I had the impression it is just a reference implementation that is from Sun... However, I had to change my opinion. In the recent years it seems, that the Glassfish community worked hard on their baby and currently it seems to be a solid competitor in the field.

The Glassfish univers "not only" contains a J2EE server, but actually a set of Enterprise-tools like as message broker, clustering framework, enterprise service bus (JBI compatible), a library to implement SIP applications and the like. Additionally it is well supported by the Netbeans IDE. The recent (preview) version contains a J2EE runtime that additionally supports scripting languages like Ruby and Groovy and is based on the OSGi framework.

What I do like additionally is the fact, that Glassfish comes with a decent installation tool, provides a solid web-based administration interface and seems to be reasonably well documented. And, of course, the whole stuff is Open Source.

I must say, I am quite impressed so far. Any comments on that one?

Friday, December 05, 2008

[Misc] Mule Developer Blog

There is now a new blog which takes his focus only on Mule, by providing technical tips, comments and breaking news around the Mule product line (ESB, Mule Galaxy,..). Blogger from this blog are only developers from Mule Source and members of the Mule Service Team, which means that you get the information from first hand. There are already posts, e.g. how to write custom transformers in Mule or an introduction to Expression transformers. Another interesting post focus on performance tuning in Mule.

The backround idea behind this blog is to give the Mule community as much information as possible. This is the right way, because there are some issues (e.g. performance issues) where you always end up in the mailing list and search some hours for the right answer. Some posts are emerge from discussion threads in the user mailing list.

Monday, December 01, 2008

[Arch] Archi-Zack!-ture

A few months ago I read a very good article series by Pavlo Baron about Software Architecture in the Java Magazin. Software architecture is an important component in software projects and you will find a lot of resources (books, web sites, blogs) which focus on this topic. He titled the series with Archi-Zack!-ture.

What does a Software Architect do? The role of a software architect in a software product becomes more important the more complex the system is. Software architecture is still a rather young discipline and the value of a software architect in software development is often underrated. As Pavlo describes in the first part, it's hard to seperate the role of a software architect with the role of a software developer. The architect enables developers to develop the software system by providing the necessary environment. The developer on the other side focuses on the fulfillment of the requirements. The motives are the same, but the emphasis differs.

The major part of the series are (Anti-) patterns about the software architecture. I picked up the most important one from my point of view. First I will enumerate the patterns which should be followed:
  • Architect also implements
    Each architect should also implement. This is very important, because as a architect you make decisions about performance, scalability and similar stuff. Without any technical backround these issues are very hard to design/answer.
  • Senior Developer = Software Architect
    It is important the a software architect has experience in software development.
  • Manages makes the final decision
    One man of the management must make the final decision. The software architect prepares the material which are used for the decision
Now some antipatterns
  • Ivory-Twoer Architect:
    The purchase to the reality lost
  • One Man Show:
    The software architect makes everything alone
  • Single point of decision:
    The software architect must decide everything, e.g. implementation details.
  • Design by Committee:
    On the other side, it makes no sense to make all decisions in the team which ends in a never ending discussion. A good mixture is the answer.
  • Architecture by implication:
    Architecture is not documented.
  • Architecture without review:
  • Meta architecture:
    Software architect remains too abstract
  • Customers are idiots:
    The Software architect is not a God!!
  • No Refactoring:
    The management does not give time for refactoring
Some people believe that software architects are the "kings", and without them software projects don't work. The above mentioned anti patterns are found rather often in projects and architects should keep that in mind. It is not important which title is written on your business card, the content, the attitude to the project and how the project team works toghether, are the keys to the success of the project.