Friday, July 06, 2007

[Tech] We Morons!

Yes, I feel like a moron now... Why? Because I use SVN and generally I like SVN! (actually I am happy that I do not use CVS any more, because this would really make me a dork!)

However, Linus has strong opinions and also likes to express them in his "Google Talk" about his sourcecode management system GIT. Actually Linus makes some good points and presents some impressive features of git, and despite of the facts I think that this video is quite amusing and nice to watch.




(But after all I do hardly dare to say, I think I will continue to like using SVN...)

Thursday, July 05, 2007

[Tech] Layout Management desperation

Creating professional Swing applications can often be very tricky. It depends on developers preferences whether he uses an IDE to create a GUI or doing this by hand. I have found a funny video dealing with coding a GridBag layout manager. This video demonstrates how frustrating it can be, if you program your GUI by hand. At this point it is hard to say which approach is best for you. Take an IDE, for instance JFormDesigner, or Matisse, providing an easy to use user interface. Developers create their GUI by drag & drop components from the toolbar to their form. Behind the IDE generates the associated Java source code for all forms. That's fun. Some tools also provide reversal update, meaning when you change your source code, the GUI design will be also updated.

There are nice frameworks out there, e.g. Spring Rich Client, providing powerful utility classes for layout GUI forms. I developed several Swing projects using JGoodies form layout and some other useful technologies, where I intentionally create the GUI by hand. In my opinion creating GUI code by hand also has several advantages:
  • You learn how to deal with layout managers (Flow layout, Grid Bag, and so on)
  • A GUI creator can't handle everything (e.g. event handling)
  • An IDE created code is often hard to read
  • A developer must not learn an IDE (e.g. Netbeans) to develop Swing applications. I point this because I prefer Eclipse, but Netbeans provide better support for GUI development
Finally it depends on the preferences of a developer how to develop GUIs. Check out this cool video, and remember: "Swing also Rocks without GUI IDE".

Monday, July 02, 2007

[Arch] EDA and SOA in a complex world

In the recent iX magazine (German) Josef and I wrote an article about event-driven architectures (EDA) and the connection to service oriented architectures (SOA).

An idea I personally like in the context of EDA is "Seed, Sense, Amplify" that was introduced in the book "It's Alive, The Coming Convergence of Information, Biology and Business" from Christopher Meyer and Stan Davis. In my understanding the core idea there is, that in a complex world, it becomes more and more difficult to plan ahead and to predict what customers want or more generally spoken, which ideas might work out and which will not. So Meyer and Davis describe strategies, where "natural" variation is brought into business concepts, where offers are slightly changed for different customers, where customers become more freedom in doing what they want (seed).

The idea is to be more agile, but not laissez-faire, so beside the "seeding" step also a properly planned "sensing" step is required. In this step the actual behaviour of the customers is analysed. In the last step: "amplify" the desired behaviour is amplified (and the not desired one diminished.

Now to allow such strategies also the underlying IT architecture has to support this degree of flexibility yet allow the implementation of the sense and amplify steps. "Traditional" heavy weight data management and process management solutions often prove to be too inflexible to deal with such agile concepts alone. Help is needed and as state changes in different IT systems are often technically expressed in events/messages that are sent over message buses they can be processed with respective (complex) event processing middleware. And this is where our research and in that case our article comes into play.

Eventually following the idea of EDA means building a system that is not only analysing events, but that is driven by events (as we also try to explain in the article) and can lead to a sense and respond infrastructure (Roland give some ideas about our strategies to that respect in his diploma thesis). I'd like to illustrate the agility EDA might provide in certain situations on an example we also used in the article:

Let's consider a webshop, where the user orders goods using the web-interface (and the application server). In a "conventional" architecture, even a SOA a controler component (probably in the appserver) might "orchestrate" the order process by calling several services like the credit check, the customer check, the stock-keeping application, eventually initiating the shipping and following up the payment procedure. When implemented in a SOA way the components are de-coupled at least to a certain degree. Still, the whole system is kept together by the controler compoent. Now, how could we model this "EDA-like":
  • First we should use a message oriented middleware (MOM), that supports the publish/subscribe paradigm (e.g., ActiveMQ, Tibco and the like)
  • The next important concept is to omit the controler component by inverting responsibilities, meaning: not the controler decides what service should be invoked, but the components themselves decide what they are interested in (which requires a clear strategy of defining message types)
  • If the customer orders goods, the web-application server sends a "order" message to the MOM. It does not "address" specific other components, just announces that a new order has arrived
  • Now arbitrary components can register for new incoming orders as they need that data to do their job like the credit check component and the stock-keeping component. Both might do their checks and then send new messages into the system like "credit checked" or "stock checked" including a reference to the order message like the order-id
  • Eventually the order processing component might wait for all messages that are required for the next step like order, credit-check and stock-check, then initiate the shipping and send the next message that shipping has been done and so on.
I don't want to elaborate that in detail, but it can be easily seen, that the responsibility has been inverted, which leads to a more decoupled architecture as every component can be easily exchanged or "multiplied" in case of performance problems as no sender actually sends to a specific receiver.

Additionally this style of architecture allows a significant level of agility (to come back to the inital scope of the posting) as new components can be easily introduced into the system (e.g., reporting, statistical analysis, components to connect to contractors to initiate reorders and the like) without the need to continuously rewrite the controler component that then gets more and more complex and intransparent.

O.k. enough for now, furter interesting sources might be the mentioned book, Brenda Michelsons blog and Jack von Hoofs blog. Our article can be found in the recent iX magazine July 2007.

Tuesday, June 19, 2007

[Tech] Setting up Maven Repository

At present Maven is a popular building tool used in many software projects (especially in open source projects). The provided dependency management of maven is one of the main advantages of this technology. Our Best Practices examples are also based on Maven. At TheServerSide I found an article which demonstrates how to set up a maven repository. This article provides a running example by showing how to set up a maven repository.

Monday, June 11, 2007

[Pub] Simulating Business Process Scenarios for Event-Based Systems

Last week, the 15th European Conference on Information Systems (ECIS'07) took place in St. Gallen (CH) where I had the chance to present our work on a simulation-based approach to evaluate, test and benchmark event-based systems.

It seems that companies finally start adopting SOA and EDA concepts to an increasing degree although a few presented case studies suggested, that many are not yet using them to their full potential. However, these systems, which do not use a synchronous communication style in favor of loosely structured interactions, are inherently more difficult to design and even more to test.

Therefore, in our paper we propose a simulation model to simulate the dynamic behaviour of the underlying business processes which allows us to produce familiar, complete and consistent data. By seperating various concerns we are able to partly automate the creation of data as well as the creation of logical sequences of the simulated items (e.g. by deriving them automatically from formal process definitions).

We have already received positive feedback which confirmed us that this is a topic worth looking into. What is your opinion?

[Tech] Cocoon 2.2 Version ahead

In the current Infoweek.ch magazine I published an article about Apache Cocoon. Cocoon is a fascinating XML Framework. However it is a little bit difficult to explain the capacity of Cocoon as it is conceptional quite different from other "Web-Frameworks" like Struts, myFaces, Wicket, Tapestry and whatnot.

Hello World...

The core concept of Cocoon are XML-processing pipelines: in short, a Pipeline is responsible for handling one request to the Cocoon server (which is actually a Servlet running in a servlet container like Tomcat or Jetty). Within a pipeline a set of different sitemap components can be used to produce a response. Typically a pipeline starts with a generator, that creates an XML stream, then one or more transformers can manipulate the stream (e.g. XSLT transformers) and finally a serializer component serialises the XML stream to the desired output format (e.g. XML, HTML, SVG, PDF, JPEG, ...).

Which pipeline feels responsible for which request is managed by pipeline matchers. To give a "hello world" example:



In this case this matcher might react at requests like "http://myserver.org/docs/article123.html". In that case the generator would load the document "article-123.xml" and apply the XSLT transformation with the XSLT script "article.xsl" on the document. This transformation supposedly will generate XHTML and the HTML serializer will serialise this to HTML. A lot of different sitemap components are available "out of the box" that can also be combined, and own components can be written when needed, but this is only one side of the story:

...and beyond

The previous example gives a very brief idea about the core concept of Cocoon, the sitemap. But Cocoon is a full-blown web-framework. It can be used for cross-publishing issues but just relying on the sitemap idea and a lot of components that help in that context (to process SVG, PDF, HTML...), but can also be used for developing Web-applications. It has components to access relational databases, supports complex caching strategies and offers a solid form framework, Cocoon Forms: Cocoon Forms abstracts from concrete form implementations like HTML forms by defining Widgets and supports strong typing, validation and events (e.g. handled by Javascript in the browser).

Additionally Cocoon Flow allows to model the "flow" of webpages, e.g., a "wizard" like series of forms, where the path through the forms is depending on data entered in previous forms can be described very elegantly with server-side Javascript or Java code using continuations.

And Version 2.2?

Version 2.2. will be released soon and is long anticipated. Previous Cocoon versions had some issues particularly when it came to modularisation. Cocoon 2.2. has (beside several other enhancements) the advantage to use Apache Maven 2 for build management, and perfectly integrates with the Springframework. Hence it is very easy now to use arbitrary Spring beans within a Cocon application. Also the integration into Eclipse as IDE got a lot simpler. Modularisation did not stop before the Cocoon pipeline that was in previous version a little bit of a hodgepodge of various configurations and pretty hard to understand for non-experts. The same was true for the decisions which Cocoon modules to use in the own applications. Cocoon blocks does a good job in version 2.2 to make these nasty configuration issues much easier to handle and understand.

The usage of Maven also makes "startup" easier, as the Cocoon team provides Maven archetypes that generate a "hello world" Cocoon application from which starting own development becomes much more straightforward compared to earlier 2.1 releases.

Conclusion

Cocoon is a powerful cross-publishing XML and web-application framework . It is easy to integrate several systems using Cocoon sitemap components. In the new version the modularisation including Spring and usage of Maven as build-environment and configuration management tool are a large step forward. Several other tools build upon Cocoon like Apache Forrest or the Daisy content management system.

However, Cocoon is not a simple framework (which web-framework is?) and it needs some time to get familiar with the concepts.

Thursday, May 31, 2007

[Pub] Concepts and Models for Typing Events for Event-Based Systems

We are happy to inform you about our new paper Concepts and Models for Typing Events for Event-Based Systems that will be presented at the DEBS’07.

Event models have a major impact on the flexibility and usability. Therefore, we introduced concepts and approaches for representing, structuring and typing event data and introduced event models of existing event-based solutions in our paper. The paper discusses concepts of organizing event models, introduces basic typing concepts for structuring event data and also introduces more advanced typing concepts such as inheritance, exheritance and dynamic type inferencing. The typing concepts are illustrated with the event-based system SARI and compared with existing event stream processing systems.

The paper can be downloaded at:
http://www.senactive.com/cis/digitalAssets/5502_DEBS_Paper_EventModel_Camera_Ready.pdf

[Pub] Event-Driven Rules for Sensing and Responding to Business Situations

There has been a passionate discussion in the CEP community around the relationship and relevancy between rule and ESP/CEP engines. Please find below a paper that we wrote on this topic. The paper shows an approach for graphically modeling business rules. The approach illustrates how to separate correlation concerns from rule concerns.

Ref:
http://www.senactive.com/cis/digitalAssets/5504_DEBS_SAR_Rules_CameraReady.pdf

The paper will be presented on the DEBS 2007.
Looking forward to you response.

[Tech] Maven and "public" Repositories

I have written already about build-automation in this BLOG, and I think I made my point clear, that I love the concept of Maven (2) and really think it is a great tool and a significant step forward in build automation.

Right, after this introduction a "but" has to follow; at least a "however": However, Maven is building upon public repositories like ibiblio and the central Maven repository from Apache, at least as long as open-source projects are involved. Now, despite of the fact that some of the repository servers apparently had some problems once in a while, there are a lot of open source projects on those servers where the pom files are questionable at best. The last example I personally figured was JMock, where the described pom settings do not work and some months ago a Springframework version with iBatis where specific iBatis versions were demanded that could not be found on public servers (whereas to the best of my knowledge also the ones available on the servers would have done).

Now usually one would say, this is the problem of the very project, and just hits the reputation of this project if the documentation or build configuration is made sloppy. Unfortunately this is not the case when Maven 2 is concerned. The reason simply is, that other projects that do depend on such a project with sloppy POMs is now running into problems, and the whole Maven build idea suffers.

I personally really would ask all developers using Maven, who provide projects with POMs "in the wild" to be careful with the POM settings, that are uploaded for public usage. I am not a hardcore Maven expert, really , but I think some guidelines/best-practices to check the validity of a Maven POM should be suggested, I would start with some initial thoughts here:
  • Check XML for well-formedness and POM File syntax
  • Check if really all dependencies declared are really needed (not just drop anything in that might be needed, and remove "historic legacy")
  • Test your pom on a clean local repository!
Any other thoughts?

Additionally I want to suggest a tool that checks public repositories for invalid POMs, if e.g. a student would like to program that as a student-project, please contact me!

Wednesday, May 23, 2007

[Arch] "Evil" XML in Dependency Injection

We had a discussion recently in this Blog about dependency injection frameworks. Benedikt introduced the new kid on the block: Guice.

Was XML the solution for virtually everything some years ago, so it is apparently the fashion of the day to criticise XML applications in various domains, also in the usage as beans-configuration in Spring. I personally cannot really follow that discussion, for me personally particularly the usage of XML in the configuration of Spring was a very powerful advantage. It is a very declarative approach, meaning, one can easily provide a set of different configurations, simple properties (like jdbc urls and the like) can be easily externalised into properties files. Hence a clean multi stage configuration is feasible.

Additionally the config file can be easily edited with a variety of XML editors and given a simple XSLT script a HTML visualisation of the connections within the Spring definition is possible.

Right, so far my plea for XML-based dependency injection configuration.

However, there are folks who prefer other types like annotation based DI, and meanwhile also Spring supports XML-less DI declaration, partly also based on auto-configuration (which I on the other hand do not like at all; it easily confused configuration imho).

Several articles and Blog entries explain how to use Spring without "evil" XML, no need to repeat it here, check out for example:
Comments anyone?