Wednesday, February 28, 2007

[Pub] Our new Baby is online :-) (actually in beta)

After some work and some delays, we are proud to finally present a "brother/sister" project to this Blog, the "Best-Practice-Software-Engineering" Samples and Documentation project: please check out this link:


This project will support our teaching in various courses, but should also be a foundation for other "educational" efforts. We present on that page a set of "best-practices" examples plus documentation. At the moment we have two stable examples: one is a "basic" example using a Java Swing Frontend and a Database backend plus logging, Springframework, Unit Testing, Maven builds ... The second example uses the same model and business logic, but provides a JSF frontend and Hibernate for O/R mapping. The third example (still at work) shows a distributed solution including webservices.

Besides these examples we provide information to used software patterns inlcluding interface, delegation, data access object, dependency injection and so on, plus an introduction and motivation for the used technologies.

This whole project is published under Apache license, hence can be used and extended by everyone. Currently we are running the beta-phase also with our SE course in the summer semester, and we hope for feedback and suggestions to enhace the samples and/or the documentation. It will also be updated rather frequently, so please stay tuned!

Sunday, February 25, 2007

[Pub] AOSSS Conference

Two weeks ago I had two talks at the 8th Asian Open Source Software Symposium. It was quite interesting for me to watch this conference, as it showed a significant trend for Asian countries (not only Indonesia) to try to follow a strong Open Source policy. Interesting was the statement of a representative of a big American GIS company with strong Microsoft background: they ran into significant prob lems in Japan ("they are not talking much about open source, they are doing it"): e.g., it appears to be government policy in Japan, that Windows servers are not allowed behind firewalls. Hence they had big problems in installing their GIS backend-server, as this one was only running on Windows, and they discussed a lot of complicated workarounds. Meanwhile, they have an open source system that also runs on platforms like Linux.

However, this was just one impression, but a symptomatic one. I personally spoke about the ECDL/ICDL as an option to bring basic IT education (also in the OS environment) to a country like Indonesia and in my second talk about the connectio of the OS development process and modern economic strategies. This leads from the assumption, that Software becomes more and more a commodity towards new software production and "consumption" patterns with a new role that users play in the game.

Maybe check out my presentation and give some feedback...

Monday, February 05, 2007

[Pub] Webservices with Axis and xFire

In the current print-issue of Infoweek.ch Markus Demolsky and I wrote an article about Apache Axis 2 and Codehaus xFire. This article is also online available (in German).

Both frameworks can be used to build modern Web-Service driven architecture, however choosing the right one for the projet is not always an easy decision:

Apache Axis


Apache Axis has a long history. The first Webservice project in the Apache pool was Apache SOAP donated from Lotus. This was more a proof of concept than a framework for operational use (as I realised myself by suffering incredible pains during a project). However the next step on the road was Apache Axis 1. Both projects are still available on the Apache websites. However, SOAP should definitly not be used for projects, and also Apache Axis 1 is actually deprecated.

The current installment is Apache Axis 2. It is again a redesign of Apache 1 and is up-to-date with modern standards like:
  • SOAP 1.1 and 1.2
  • REST style services
  • WS-reliable messaging
  • WS-Coordination and WS-AtomicTransaction
  • WS-Security
  • WS-Addressing
  • basic message exchange patterns in WSDL 2.0
and better performance.Under the hood the new object model Axiom (based on a pull parser) promises less memory consumption and better performance. Additionally improved handling of message-style interactions (Axis 1 SOAP RPC) MEPs that include synchronous, asynchronous messaging are added.

A difficult issues is data-binding in document-style webservices. Generally spoken, the problem is to map object hierarchies (from Java, .net, ...) to xml data-structures. As there are specialised frameworks for data-binding (due to the complexity of the problem) Axis 2 supports pluggable data-binding. There is the option to use ADB, the Axis data-binding, but also XmlBeans, JiBX, JAXME and JAXBRI.

An interesting additional option of Axis 2 is the REST support! Services can be provided in "SOAP Webservice" style as well as in REST.

Codehaus xFire

The "Next Generation SOAP framework" is currently available in version 1.2.4 and provides an easy to use SOAP framework. It is a servlet based application and uses the new StAX parser to ensure high performance. As Axis xFire supports a lot of current Web Service standards.

In order to expose components as web service, developers can choose between the xFire API, XML configuration or the new Web Service Annotations. A unique feature of xFire is the support of Web Service annotations. Developers can annotate their service components with predefined web service annotations which are then processed by xFire to create the WSDL.

As Axis, xFire provides a pluggable data binding architecture. There is the option to use Aegis, the xFire data binding, but also XMLBeans, Castor, JiBX, JAXB. Transaction management, Security, logging and loose coupling are important tasks when developing enterprise applications. Therefore current software systems are built on top of containers, like Spring or Plexus. The team of xFire had detected the importance of containers in software systems and therefore provide a wide range of container integrations (Spring, Plexus, Loom, Pico or Yan).

Fazit

Even with modern Web-Services frameworks writing reliable and portable (non-trivial) webservices is not necessarily an easy task. Even if IDEs suggest that writing a webservice is "just a click" in the wizard, this is actually not the case. A lot of configuration options are available, data-binding is a complex issue and so is interface specification with WSDL 2.

Documentation of both frameworks is ok, but not good. At least not sufficient to learn webservices. To be able to develop robust webservices it is highly recommended to get a good knowledge about the according standards like SOAP, WSDL (the needed WS-* standards) and the concept of data-binding and servlets and probably also of Java annotations. If this knowledge is available, the documentation of the projects should be sufficient.

Read more...

... in our Infoweek article.

Alexander Schatten, Markus Demolsky

Thursday, February 01, 2007

[Tech] Software Reusability

A Myth or Reality?

Several days ago a topic with the title "Software Reusability: Myth Or Reality?" was posted on Artima. Following the comments on this post since the first publishing I think you should take a look there too. Developing SW for 6 Years now (by far not that long as the poster) I have to agree with him. The problem with reusability is that there are several issues that must be fulfilled that libraries objects .... can be reused.

1) Clean self speaking code

This is one of the biggest challenges in SW projects. You need seasoned developers with a passion for SW development and time to write code in that way. Today commercial projects first off all don't have time to do this. Time is a big factor in this game. On the other hand teams in companies have developers with different levels of expert knowledge and it's very difficult to teach "junior" developers until normal working time.

2) Documentation

From my point of view, documentation is important but not as important as the first point I mentioned. We have to differ between 3 kinds of documentation:

a) Tests: they are the best documentation of a program because their actual status (which is documentation) can be verified easily by executing them.

b) Code Documentation: all the xDoc stuff developers write over methods classes and even in code to explain the behavior of the code they have written. The problem with it is that they are getting useless as far as they are not updated with code changes (which is often the case). In difference to Tests they can be just verified if someone reads them and expects something that is not fulfilled.

c) Diagrams: all the UML Stuff which in my opinion is even more difficult to hold up to date.

Answers?

I would answer the question raised in the article as follows:

1) Is reusability something that can be trained for?

I don't think that schools/universities can train developers to program with reusability in mind. Only persons that had to use libraries or old implementation in a project now how it feels not being able to use 1000LOC that where written for a similar domain and can't be reused for the new project. This feeling makes most of them think about possibilities to write code in a other way.

2) Should reusability be a requirement?

It depends on the project. There are projects where it definitely should be a requirement. The interesting question here is how we will measure it? I would say there is no metric that can describe how reusable code is - except for the first two points tests and code documentation I mentioned above. In my opinion it is not enough to say we have 89,9% test coverage and 70% in code documentation. These two values just say nothing about code reusability.