With the advent of SOA and SOA -related technologies and standards, such as WSDL , BPEL, and, more recently, SCA and SDO, more and more application metadata (and just plain data) is externalized into XML . XML is used for:

  • Flow definitions (BPEL).
  • Interface definitions (WSDL).
  • Component and assembly definitions (SCA).
  • Data (SDO).

Business logic, however, largely remains written in Java. For many people, key strength of Java and Java IDEs has been very strong support for refactoring (other languages support refactoring as well, but in this blog I focus mostly on Java). In fact, in my view, refactoring made agile development possible; it finally combined design and coding activities into one continuous process.

Unfortunately, with more and more information going into XML files, benefits of pure Java refactoring are diminishing.

For example, with SOA technologies, an interface name could be used in several different places:

  • WSDL file (probably in multiple places if we want to use naming conventions, e.g., in “portType“ and “service“ elements).
  • BPEL (multiple places, e.g., in “import“ and “portType“).
  • SCA component definition file.

So what happens if I want to change the name of an interface or rename an operation? Personally I am not aware of XML refactoring support in BPEL products (obviously, I have not tested all of them, so I might be wrong here) and I don‘t expect the situation to improve when SCA /SDO are added to the mix. For example, is SDO property renaming going to be supported? How will it work if I use XPath expressions against XML -backed SDO in BPEL ?

Now, dynamic APIs are nothing new, we‘ve been dealing with XML for quite some time now. However, the approach in Java has always been to map XML to statically defined classes and so the ripple effect from, for instance, renaming was somewhat contained (I know that I‘m simplifying here). With BPEL and SCA , the problem becomes more widespread.

Also, tools for working with these technologies are supposed to rely mostly on visual modeling and so their users are not necessarily J2EE developers. In fact, the idea of BPEL is to be able to change business process-related logic quickly and easily. The idea of SCA (among other things) is to be able to easily wire and assemble components together. I think that without refactoring, the ability to accomplish these goals could be impaired.

I just hope that tool vendors realize this risk; otherwise we‘re in for another round of “XML hell”.

One thought on “BPEL, SCA and Refactoring

Comments are closed.