Skip to content

Archive

Category: Technology

Abstract

The JavaServer Faces (JSF) 2.0 is the newest Java presentation technology that is covered in JSR-314 and was publicly released on July 01, 2009. It became a part of the JEE6 standard and can be comfortably used in conjunction with other JEE frameworks, with Spring or just on its own. This article reveals the possible scenarios and shows the required configuration for the usage of JSF 2.0 with EJB 3.1 and with Spring 3.0. It also discusses several auxilary technologies which can be used along with JSF 2.0. continue reading…

Abstract

About two years ago, I published an article about Exposing the Functionality implemented in Stateless Session Beans (EJB 2.1) using Web Services. J2EE 1.4 times are over and the new version of the Java Enterprise framework, called Java Enterprise Edition 5 (JavaEE 5, or simply JEE) has emerged. In this article the same business scenario is repeated in the new framework.

Requirements

Before we dive into code examples, some software is required. The good news about the software is, that it also evolved over time. Here is what we use:

  • Sun’s Java 6 SDK
  • JBoss AS 5.1.0 GA for JDK6
  • Eclipse Galileo 3.5.1 for JEE development

continue reading…

Even if some time has passed since the events EWiTa 2009 and Eclipse Summit Europe 2009, I would like to share my impressions, since I took part in both events…

EWiTa 2009

_MG_9975 EWiTa 2009 stands for Elmshorner Wirtschaftsinfromatiktag, that is German for “Elmshorn Business Information Systems Day”. The event has been organized by Frank Zimmermann, of Nordakademie – a private university in Northern Germany. Even if the event is not an official sequel of the MDSD Today, there were many similarities. The event had two tracks: the process modeling track and the MDSD track. After an excellent keynote from Mathias Weske about the importance of collaboration during the process of (business) modeling I stayed in the business track to listen to the Andrea Grass ( oose GmbH) on the combination of UML and BPMN 2.0. To say the truth, I’m not a big fan of this approach, especially, because the conceptual mismatch of modeling of business behavior and technical behavior. After a coffee break I enjoyed an excellent talk of itemis), reporting about the success story of xText in a big project of Deutsche Börse AG (German Stock Exchange).

After a small lunch, I was listening to two Arcando consultants reporting about their eTicketing project. The strange thing about this talk was that they just made some ads on a standard Microsoft product. After this, I enjoyed an interesting talk on business modeling based on CobIT process. Finally, I switched the track again to MDSD and listend to the an interesting usage of MDSD techniques for generation of DynPro and ABAP code. simon.zambrovski - View my 'EWiTa 2009' set on Flickriver

In general I enjoyed the event. I think the MDSD track was a little more technical, but the combination was good.

Eclipse Summit Europe 2009

_MG_0117The Eclipse Summit Europe 2009 (ESE 2009) took place on October 27-29 in Ludwigsburg, Germany, it is the European complement to the EclipseCon in the US. In contrast to the spring event in Santa Clara, CA, the ESE is an autumn event in a beautiful baroque town near Stuttgart. The event lasted three days and is a must for Eclipse-related technology people. As usual, the venue was great, the keynotes excellent and the talks interesting. And of course it was the place to meet the committers, evangelists, see them in action, talk to them and discuss the future directions.

Symposium Day

The first day is an arrival day. People arrive during the day, some of them are already there. I was visiting the Modeling Track the whole day and had much fun with Ed Merks, Eike Stepper and Thomas Schindl in the morning. Later, in the Modeling Symposium, Eike showed the eDine RCP based on CDO, UBS envisioned the modeling tool pipeline and so on, and so on. About 10 people showed different technologies on and about modeling. Intersting, unstructured and relaxed. And of course, the first evening is the opportunity to speak with all the Eclipse VIPs and drink a cold beer.

First Day

The main conference day was Wednesday and it started with a great keynote on functional programming held by Don Syme, the father of F#. Suprisingly, the talk was about F#. For some of us, there was not enough functional beauty exposed in the talk, so I scheduled a private session with Don and he told Markus Voelter, Heiko Behrens and me about some interesting F# features._MG_0090

I took part in the How about I/O session on JPicus. A very interesting tool for tracking I/O problems in Java programs developed by SAP. The Climb The Tower of Babel was about the Eclipse translation project. Intersting is the runtime editor allowing you to translate you runnig application. After a delicios lunch, I enjoyed two modeling talks: Xtext and EMF Query. The itemis team introduced some really new features, which make Xtext in my oppinion to a unique technology. Just to mention few of them: white-space aware parsing, usage of scopes and qualified names, usage of index (construted by a builder) in your own language, separation of markers and annotations in the editor, integration of the generator on-save, declarative quick-fix in your DSL, strings with special meaning, references to java types, and much more… The EMF Query is a project developed by the SAP team, that leverages the index by a query language. The language is a SQL-like DSL for querying the EMF-based models. The infrastructure is very intersting and allows complex scenarios with multiple model providers – very technical, and I believe, very interesting project.

Second Day

_MG_0171
After the keynote on the importance of software ecosystems and a deep economical analysis of Eclipse ecosystem, I switched off the track to be able to prepare my talk. I was reporting about the IDE for TLA+ which I was building the last nine month at Microsoft Research, and which will be available soon. The main emphasis of the talk, was not the demo of the IDE, but the exchange of experiences on building one. Especially, I focused on the possible pitfalls and conceptual mismatches of IDEs depending on the integrated language. The slides will be available soon.

At the end, I enjoyed the event very much. I even liked it more than EclipseCon. Modeling still seems to be the most interesting part of Eclipse ecosystem. Technologies like Xtext and CDO gain maturity, new technolgoes like EMF Query are being developed. It was nice to see the people again… As usual, some pictures:
simon.zambrovski - View my 'Eclipse Summit Europe 2009' set on Flickriver

galileo Finally, another annual release of Eclipse has arrived: version 3.5 aka Galileo.
Galileo is the release of Eclipse IDE synchronized with packets tuned for the Galileo release. Eclipse IDE has moved on from being a sole and mere development environment to being a rich architecture. Often, this is not visible to the novice user.

Galileo, or the JDT (Java Development Tools) to be more precisely, does not surprise with a load of stunning new features, instead, its a solid continuation of improvements. Concerning the JDT part, it has lost its pace of former days. But Eclipse JDT still is the reliable friend at your side, helping you code. This is a good thing, since Eclipse has been the IDE of choice for many, many Java programmers for a lot of years now and has grown to something like a “standard”. Its usability and reliability are well known and especially the first part has been constantly improved.

Galileo now draws its innovative power from the huge amount of different projects which were developed for it. The amount of tools for modeling is impressive. However it is not surprising, since modeling has become a sport in the past month. Consequently, it is bare logic to improve the tooling capabilities and quality. Galileo is following this path, not only because of Eclipse, but with what is available for it.

Code is poetry!

As announced in a previous post the Eclipse Demo Camp Hamburg – Galileo Edition took place in the East Hotel in Hamburg. Organized by Peter and Martin, the event was again an interesting meeting with Eclipse-interested people in a wonderful location. Five presenters introduced Eclipse and OSGi-related topics. Moritz Eysholdt reported about the (Meta)Model Evolutions, he was focusing on during his masters thesis. The interesting part of his solution are two Xtext DSLs for description of the Metamodel changes (EPatch) and model migration algorithms (MetaPatch). Heiko Behrens gave a funny and really good introduction of Xtext and DSLs for not Xtext developers. I really like his examples: these are simple and understanding for everyone. Great job! Marco Mosconi showed some ObjectTeams (black) magic. A very intersting technology using aspect-oriented programming for type-safe framework modifications. Seem to be pretty advanced technology with interesting tooling. Markus Alexander Kuppe had a talk on ECF and RFC 119 and gave some sneak preview of the upcomming features. Finally, I had a short talk on Common Navigator Framework, basically explaining the article posted here and something I documented for Galileo. Here are some visual impressions: my FlickR set and  Peter’s.


Eclipse RCP by default promotes the usage of a single application window with multiple views and editors inside. This default can be changed to multi-windowed application. The platform API offers several methods to operate with multiple application windows:

package org.eclipse.ui;
...
public interface IWorkbench ...
{
/**
* Retrieves the number of opened windows
*/
public int getWorkbenchWindowCount();
/**
* Retrieves the array of opened windows
*/
public IWorkbenchWindow[] getWorkbenchWindows();
/**
* Openes a new window with given perspective
*/
public IWorkbenchWindow openWorkbenchWindow(String perspectiveId,
IAdaptable input) throws WorkbenchException;
/**
* Performs a perspective switch in a given window
*/
public IWorkbenchPage showPerspective(String perspectiveId,
IWorkbenchWindow window, IAdaptable input)
throws WorkbenchException;
...

}

Using this API, opening of new windows seems simple. For example one could define a perspective, that is always opens in a new window.

Closing windows is generally performed by calling close method on the IWorkbenchWindow instance.

package org.eclipse.ui;
...
public interface IWorkbenchWindow ...
{
  /**
   * Closes the window
   */
  public boolean close();
}

Unfortunaly, there is no elegant way to find out which window are you in. A workaround which uses Eclipse internal API works fine for WorkbenchWindow, which is a standard platform implementation of the IWorkbenchWindow interface.

/**
 * Determines if the window is a root window
 * @param window a window to be checked
 * @return true, if the window is considered to be a root window
 */
public static int getWindowId(IWorkbenchWindow window)
{
// HACK: note this could change in future
  if (window != null && window instanceof WorkbenchWindow))
  {
    return ((WorkbenchWindow)window).getNumber();
  }
  return -1;
}

The initial application window gets the id 1. The lookup in the implementation reveals that the internal method finds the smalles unused positive number and assigns it to the newly opened window. If you do not want to rely on this algorithm, just hash the newly created windows by they ids.

On October 15th to 17th the Workshop on MDSD Today 2008 took place in the Nordakademie Elmshorn near Hamburg. This workshop was actually the sequel to two different workshops which were led by Frank Zimmermann (Nordakademie) and Simon Zambrovski (TUHH) the year before. For this years event, Peter Friese (Itemis) from Itemis joined the two for organizing the Workshop.

MDSDToday

The workshop was divided into three parts: Day 1: Management Day, Day 2: Professional Day (Modeling Projects and Tutorials) and Day 3: Professional Day (Generator Tutorials). (See also MDSD08).

Ed MerksAxel UhlRalf Mueller

The first day was dominated by excellent key-note speeches given by the EMF lead Ed Merks Ph.D. and SAPs Dr. Axel Uhl. Ed was talking about misconceptions in understanding and applying model driven techniques. Axel on the other hand talked about the challenges that still lay on our way and need to be overcome. He discussed for example the different benefits and drawbacks of using different sorts of DSL (e.g. non-textual / textual) with respect to storing them in repositories, merging and refactoring (i.e. general tool-support). Birger Garbe and Stefan Reichert (both Lufthansa Systems consultants) talked about their experiences in applying MDSD in the field. Chances and riscs were explained and how they managed to overcome those riscs. Thomas Stahl of b+m Informatik gave a talk about how MDSD, BPM and SOA fit together, unfortunately he couldn’t give is planned speech “Experiences of 10 years of MDSD”. As one of the authors of the model-driven software development book and with the experience background he has, this would be have been clearly very interesting. The speech he gave instead was also interesting but took little different directions.

The second day was filled with two different tracks one could attend. One covered contributions coming from the fields of research and the industry. And in the other one Ed Merks gave an intro to the Eclipse Modeling Framework (EMF). After that, Ralf Möller of the Eclipse Foundation talked about innovation networks. The afternoon was filled with a tutorial on how to generate graphical editors using the GMF. The tutorial was given by Robert Wloch who jumped in for Jan Köhnlein (both itemis) who unfortunately got sick.

The third and last day was filled with a tutorial on xText, which was given by Peter Friese and Sven Efftinge (both itemis). Later Arno Haase (independant consultant) tought the audience how to do model-to-model and model-to-code transformations.

Nordakademie

Summing up this was a very, very interesting event where the cremé dé la cremé of MDSD gathered and where people had the chance to ask, learn and get to know each other. Not only the speeches and tutorials were very interesting, funny but the overall event had socially a nice friendly touch. Some further pictures can be found in the FlickR gallaery.

The Workshop Proceedings can be obtained at amazon:
Proceedings of the Second Workshop on MDSD Today 2008 (engl.)

Ed Merks new book will be published sometime in the beginning of 2009, here is a link to the “old” (but still good) one:

Eclipse Modeling Framework (engl.)

Also I would like to mention the book by Arno Haase, Markus Völter, Thomas Stahl, Sven Efftinge:

Modellgetriebene Softwareentwicklung ( english version)