Saturday, August 28, 2010

Some More Thoughts on Software Architectures

Some month ago I wrote a blog post about some of my thoughts on software architecture and why I think the metaphor of a cathedral is no longer very useful for todays software development. I don't mean that you don't need an architecture when you do agile software development. A good software architecture is absolutely necessary to survive. It is an essential part of each system.

Nevertheless agile software development is based on the idea of embracing change. "Inspect and Adapt" is the secret of success in agile development. The structure of your software emerges over time when you constantly refactor your code. But is this also true for the architecture of the system? Does this architecture emerge over time as well? Or is it adaptable when life changes?

I discussed this a lot over the past years with various people. We typically found two basic contrasting (for this posting simplified) opinions:
  • Opinion 1: The architecture includes the most important technical decisions. It is hard to change those things later on. Therefore the architecture should be defined at the beginning of a project and should experience only minor changes. Major changes in the architecture are considered a bad thing and should be avoided.
  • Opinion 2: The architecture of a system is an artifact that emerges over time. It reacts to change by embracing it. Changing the architecture of a system is considered a good thing and part may be part of your daily live.
While I was always an opinion-2-guy, I always had to admit that some parts of the architecture of a system are hard to change. So changing a large rich-client app to a web-based app might be expensive. The same might be true for changing the implementation language or refactoring a classical three-tier app into a Quasar-like structure.

Then I recorded SE-Radio podcast episode 166 with John Wiegand and listened to him talking about what he calls "Living Architectures":
During the episode he explains the basic architectural decisions behind the Eclipse platform and the Jazz project at IBM. Both architectures are surprisingly simple. They define the general idea of how parts of the system are built and interact. And both don't contain a single word about those things I mentioned above. Even the language is an implementation detail.

The Jazz system is, for example, built around the idea of the web. RESTful services define the heart of the structure. It doesn't matter how those services are implemented, which frameworks they use or how they are internally structured. The whole system might consists out of various languages, various runtime platforms, various infrastructure settings. Even object-orientation becomes an implementation detail of individual services. All things I often thought of being part of the general architecture. But now I know that I was terribly wrong about this.

Of course there are things that are expensive to change. Reimplementing a huge system with a different language might cost you a lot. But the question is: Why do you need to reimplement everything if you switch to another implementation language? The RESTful style, for example, doesn't require such a tight language binding. Its just an example, but it made me think. And it convinced me that "the definition of architecture as the set of things that are hard or expensive to change" leads into the wrong direction.

Architectures are living things. Don't treat them as dead artifacts. And don't be afraid of change. Its a good thing. It reflects your learning. It helps you build better systems.


Wednesday, July 14, 2010

Slides from Java-Forum-Stuttgart 2010

I gave a talk about some lessons learned when using OSGi in various settings at this years Java-Forum-Stuttgart. It's pretty much the talk I gave together with Chris Anisczcyk, Jeff McAffer and Paul VanderLei at this years EclipseCon. Here are the slides we used:

Sunday, May 16, 2010

Eclipse Demo Camp in Hamburg on July 9th - Don't miss it!!!

The upcoming Eclipse Helios Demp Camp in Hamburg on July 9th will be really amazing. Peter and myself are working on a great program for this event and we already have good ideas and suggestions. Apart from that we have organized a new location. The demo camp will take place in the Magazin-Kino in Hamburg, a cinema just for us for this evening. As you can imagine, popcorn, ice-cream, and soft-drinks will be ready for you as well as some more surprises! So don't miss it!!! Join us on July 9th, register here: Helios Demo Camp Hamburg Wiki Page.

See you at the cinema!!!

P.S.: There is no soccer game (FIFA World Cup) that evening. So there is no reason not to come... :-)

Saturday, May 08, 2010

Slides from JAX-2010

I gave a bunch of talks together with colleagues at the JAX 2010 conference last week in Mainz, Germany. Aside of the fact that I enjoyed the conference a lot this year (again), it was fun presenting there. For those of you interested in the slideware:


Thursday, April 22, 2010

Sessionfire Continues to Innovate

A few days ago the team at Sessionfire published its second beta build. Interestingly this new build does not add these basic features you might expect from a presentation tool like direct graphical editing or so. In contrast to that it innovates. Its adds real new stuff to the world of presentations. Things that helps you to improve your presentations, to visualize things for your audience. The big new feature in this build is "Non-Linear Presentations". You no longer need to put your slides in a linear sequence - they aren't anyway. Many of my talks contain different sections and details, sometimes I decide to skip a section, sometimes I just want to show the topics while speaking. This is now directly supported in Sessionfire, giving you the option to create sections and visualize those sections for your audience. You can go into the details on demand or just jump from section to section at your fingertip. Watch the teaser case at YouTube, it shows non-linear presentations among the other new features in a quick overview:




The current Sessionfire beta builds are free. You can download your copy for Windows XP/Vista/7, Mac OS X or Linux from http://www.sessionfire.com/. Just make sure you have the latest Java6 installed... :-)


Thursday, March 25, 2010

OSGi Best and Worst Practices at EclipseCon 2010

Together with Jeff McAffer, Chris Anisczcyk and Paul VanderLei I gave a talk on OSGi Best and Worst Practices here at Eclipse 2010. Here are the slides:

Friday, March 12, 2010

Slides on OSGi Best and Worst Practices from Java-User-Group-Meeting in Karlsruhe

I gave a talk at the Java User Group Karlsruhe last week on best and worst practices using OSGi for building business applications (thanks to David for inviting me). You can get the slides from the user group or directly here:
Thanks again for joining! The room was full of people and I especially enjoyed all the great questions and discussions during and after the talk. Thanks again, it was a pleasure to be a guest at the event!

Friday, February 12, 2010

Slides on OSGi Lessons Learned from OOP-2010 Conference

A few weeks ago I gave a talk at the OOP-2010 conference in Munich about the lessons I learned from building business apps on top of OSGi during the past five years. Finally I put the slides online:
Sorry for the delay!


Saturday, January 30, 2010

A Big Thank You for the Feedback

Feedback is an essential force and of priceless value for many things you do in your daily life. It is one of the central elements of agile software development and it is absolutely priceless to get honest and constructive feedback for the work you do. Sometimes its hard to get this feedback, sometimes not. Some of you might know that I am part of the podcast team at Software Engineering Radio, a podcast for professional software developers that publishes a new episode every 14 days under a creative commons license. I don't do as much episodes as I wish, but regularly people write emails to the team saying "thank you for the great work" and telling us that they really like what we do. Now its time for me to say a big THANK YOU back to those guys. Especially this blog entry that I read today is really nice (many many thanks) and gives a lot of motivation!

Thank you!!!


Tuesday, January 12, 2010

Sessionfire is available as public beta

Some of you might know, Matthias and myself are working on a new kind of presentation tool, called Sessionfire. After a period of private alpha testing we are pretty happy that it has left this period just a few days ago and started its public beta stage. So everybody is invited to grab a copy of it and give it a try. Its not open source (maybe it will be some day in the future), but its free to download and free to use (as well as the next beta builds).

The current beta version has a quite limited set of features, so you don't get a replacement for your favorite presentation tool right away. We start with something small, far far away from being feature complete, move forward in small steps while always trying to do something useful in a gorgeous way. So you won't be able to create your presentation completely with Sessionfire at the moment, for example. But you can run your show with Sessionfire, using images, animations, timers, three-dimentional optics, reflections, visual fast-forward and -backward, different 3D-layoutings and some more stuff.

Try it! - Enjoy it!

Friday, December 11, 2009

Some Thoughts on Cathedrals and Software Architectures

While preparing a talk on module systems and architectures I remembered some old talks I listened to talking about architectures and arguing why an explicit software architect is necessary within professional projects. Many of them used the analogy of building a dog-house versus building a cathedral. For a small dog house, you don't need an architecture. But for the cathedral you do. Hm, agree, but where is the point?


I think the world has changed. Today for most software systems the analogy of building something like a cathedral is no longer a good choice. And I hope that people no longer have a cathedral in mind when designing software. We have learned that building software is a learning process, that requirements change all the time, that we need a short time-to-market, and most of all that we need feedback all the time - and react to this feedback quickly. Agile methods reflect this and allows us to move forward to modern ways of software development.

But our view on architectures need to reflect this. Modern software architectures need to be build for flexibility, for changing requirements all the time, for changing even fundamental layers of our software in a flexible way without causing tremendous costs. Having a cathedral in mind don't help you here. But if you still like the analogy of building real buildings (even though I think this is not always a good analogy to building software at all), you should take a look at some modern office buildings. Maybe they are not as beautiful as some of the old cathedrals, but they are built for flexibility.


But building flexible architectures is not an easy task. We need to build a flexible architecture and at the same time just what we need without designing all possible stuff upfront. Sounds like contradictory goals, eh? Hm, in some way, they are. I think modularity can help you to solve this conflict. Modularity (and I mean modularity on a higher level than individual classes or packages, but more something like Bundles in OSGi) helps you to think about dependencies, coupling, cohesion, and many of these nice design principles. And I think we all agree on having a good, decoupled design makes life easier when things change - and they will change.


Slides from Meet-The-Experts on Architecture

Last friday I was invited to give a talk at the Meet-the-Experts event in Solingen. I talked about my view on architectures in an agile world and how module systems drive those architectures for a flexible future. Here are the slides:

Thursday, December 10, 2009

2nd Eclipse DemoCamp Hamburg in 2009

I organized a number of demo camps over the past years (always together with my colleague and friend Peter Friese), but the last one was different. I was overwhelmed by the huge number of registered attendees for the 2nd Eclipse Demo Camp in Hamburg this year. We had over 110 people registered on the wiki - around twice as much as for the other camps in the past. And nearly all of them showed up at the event. This was absolutely amazing! Thanks again to all of you making this event such a big success!!!

Peter posted some notes on the program and what happened during the demo camp, so I don't repeat all this and instead direct you to his nice summary of the event. And I have to say many many thanks to all the wonderful speakers who all gave funny and entertaining talks and made the evening not just full-packed with information and details on Eclipse stuff, but also a fun event. I enjoyed it very very much!

Looking forward to organizing the next demo camps and hoping to see you all there!!!


Monday, November 16, 2009

OSGi for Eclipse Developers Webinar

Today I gave an Eclipse webinar on "OSGi for Eclipse Developers" together with Chris Aniszczyk and Bernd Kolb. We talked about various OSGi things that might sound strange and/or unfamiliar to you if you come from the Eclipse way of developing applications. We talked about the relationship of Eclipse and OSGi, dependency management and why you should use Import-Package instead of Require-Bundle, dynamics with OSGi, services vs. extensions, versioning, some compendium services and tooling for OSGi. If you missed the live broadcast, you can watch the entire webinar from here again. Enjoy!


Friday, November 13, 2009

Coming Up: Eclipse Demo Camp in Hamburg at December, 4th

The Eclipse Demo Camp in Hamburg is coming up on 4th of December (its a Friday) from 6:30pm - 10pm at the stylish EAST hotel (like the past demo camps in Hamburg). And I am pretty impressed about the number of participants: We already have more than 70 people registered for the event. Wow... Maybe one of the reasons is the exciting program we put together... :-)
  • Tom Schindl will talk about Eclipse e4
  • Jan Köhnlein talks about building graphical and textual editors for your domain-specific language.
  • Jochen Krause will showcase Eclipse RAP and how you can build your rich AJAX apps using the Eclipse UI metaphors.
  • Nils Hartmann and Gerd Wütherich will share some insights into the various ways of how to realize an automated build process for OSGi and Eclipse applications.
  • And Ekkehard Gentz will show us "redview", a technology to build dynamic views for enterprise applications based on Riena, EMF and CDO.
Thanks to all the speakers who have agreed to join us in Hamburg to give demos on cool technologies - some of them travelling to Hamburg especially for the camp. Thank you all very very very much!!!

If you haven't registered yet, go to the wiki page and put your name on the list (if you have no account for the wiki, just create one or send me an email and I will put you on the list). There is no fee or ticket you need to pay for, itemis and it-agile will sponsor the event. Thank you guys for that!!!

Its a great opportunity to see the technology in action, meet with the guys building that stuff and have a chat. See you at the Demo Camp in Hamburg. Don't miss it!


Slides from WJAX Talk on Building Web-Apps with OSGi

I uploaded the slides of my talk on building web applications on top of OSGi that I gave yesterday at WJAX 2009 together with Gerd Wütherich and Peter Roßbach:
The slides are German only. Sorry about that... Hope you enjoy it anyway... :-)


Wednesday, November 11, 2009

Slides from OSGi Best Practices and OSGi Performance Bloopers talks at WJAX 2009

Here are the slides of my two talks that I gave today at the WJAX conference in Munich:
Enjoy!


Wednesday, October 28, 2009

Slides from Eclipse Summit Europe 2009

Today I gave two talks at the Eclipse Summit Europe 2009 in Ludwigsburg. Here are the slides:


Monday, October 26, 2009

Ready for Eclipse Summit Europe 2009

Tomorrow I will travel to the Eclipse Summit Europe 2009 (Ludwigsburg, Germany) to meet great people, see interesting talks and participate in two session on stage: I am happy to present together with Jeff McAffer from EclipseSource our experiences using OSGi in various settings and the "best practices" that we extracted from that. So if you are interested in avoiding the faults and mistakes I did during the past years, join our talk (OSGi Best Practices) and see me talking about my own failures... :-) Its Wednesday at 1:30pm.

In the second talk I will give a short overview of the Equinox Weaving project (formerly known as Equinox Aspects), what's new and what's coming up in the future (Equinox Weaving: Bytecode Weaving in OSGi). So if you would like to hear more about bytecode weaving classes in an OSGi environment, don't miss these 20 minutes at Wednesday at 3:30pm.

See you all in Ludwigsburg!

Thursday, October 08, 2009

Slides from JAOO: OSGi on the Server

It was my first time being at JAOO in Aarhus, Denmark, and it was absolutely great. Lots of interesting talks and discussions and I enjoyed a lot to talk in this fantastic cinema-like room:



I talked about the different settings how you can use OSGi on the server-side and about the dynamics of OSGi applications:
And you can find most of the slides of the other talks at the schedule pages of the conference. Enjoy!


Saturday, October 03, 2009

JAOO is coming...

I will leave Hamburg this Sunday to travel to Aarhus, Denmark, for this years JAOO conference. It's my first JAOO and I heart so many good things about it. :-) And I have the great opportunity to give a talk on "OSGi on the Server". Eberhard Wolff is organizing the "Java Now" track and invited me to this. Thank you very very much for that, Eberhard!!!

Saturday, September 19, 2009

Eclipse 3.6 M2 is out - and includes Equinox Weaving

The second milestone of Eclipse 3.6 is available for download - and its the first milestone build that includes the Equinox Weaving feature as part of the Equinox 3.6 M2 downloads.

After graduating the Equinox Aspects work we renamed it to Equinox Weaving. The reason for this is: The design separates between the base mechanism of modifying bytecode at class loading time and the actual bytecode modification. The AspectJ-based aspect weaving for bundles is just one of many possible bytecode modifiers you can think of. Another one that we implemented (but is not yet part of the Equinox Weaving project) allows you to use Springs load-time weaving infrastructure on top of a OSGi runtime together with Spring Dynamic Modules. And the nice thing about it is: While you are free to choose whatever weaver you like, the caching mechanism of Equinox Weaving works independent from all those weavers.

We still need to update the Equinox web to reflect the graduation and design changes of Equinox Weaving, but please feel free to take a look at it. We are happy to answer questions on the newsgroup and the mailing list.

Enjoy!

Saturday, September 05, 2009

Eclipse Summit Europe 2009 Program Online

The technical program for Eclipse Summit Europe 2009 is now online and I am pretty happy to be part of it with two sessions:
  • Equinox Aspects - Bytecode Weaving for OSGi: This is some kind of an update talk on the Equinox Aspects (or better: Equinox Weaving) project. Will give some insights what has happened and what is planned for the future.
  • OSGi Best Practices: This is a joint talk with Jeff McAffer, Paul Vanderlei and Simon Archer where we will throw together our experiences from building apps on top of OSGi over the past years.
Don't forget to register for the event. Looking forward to seeing you all there!!!

Thursday, July 02, 2009

Slides from Talk at Java-Forum-Stuttgart 2009

Today I gave a talk on building dynamic applications with OSGi at the Java-Forum-Stuttgart 2009. This was mostly the talk I gave (and prepared) together with Kai Tödter and Gerd Wütherich for previous conferences. Here are the slides:
The talk were in the main hall of the conference center and it was fun standing on that huge stage... :-) And of course I got completely confused during the talk while switching between the demo application and a slide showing a screenshot of that demo app - picking up every possible embarrassment... ;-)

Friday, June 26, 2009

ObjektSpektrum-Article on Agility & Architecture

Together with my colleague Stefan Roock I wrote an article on building architectures in an agile way for the current issue of the German ObjektSpektrum magazine. The article is part of a controversy with Thomas Lieder about how to incrementally build architectures in agile projects.

In the introductory part of the controversy we talk about the basics of agile methods and the goal of keeping a flat cost curve for features over a long period of time. To achieve this goal we need to change and refactor the software all the time. This is an integral part of agile software development. We learned that its not possible to foresee the future and therefore decided to design only the next steps - and refactor, if we learn over time and find better designs if new requirements appear. This is quite clear on the low-level of individual classes and nicely supported by test-driven development and refactoring tools.

If we use the same argumentation for the architecture of a project, the discussions get a lot more controversy. People don't believe that it is easy to change and refactor the architecture of a system incrementally and flexible over time. We found this discussion often times quite unstructured and using the term architecture in various flavors and meanings. To ease the discussion about agile architectures we divide between the basic architectural style and the concrete architecture of a concrete system. Our opinion is that the basic architectural style is hard to change over time (for example changing a system from a standalone-rich-client application into a multi-user app-server-based system could be quite hard). In contrast to this we believe that changing the concrete architecture and structure of a system could be done incrementally and agile over time. This is obviously not true for every application. They need to be build from ground-up for flexibility and change. But how to build a system that is easier to change over time, even on the architectural level?

From our point of view, there are three fundamental characteristics of design you need to remember every day to build flexible architectures: understandable, loosely coupled and free of redundance. There are many well-known design principles that helps you to build such systems. Keep them in mind, build loosely coupled components, think about good APIs between them - and you are on the right track to build flexible applications and flexible architectures.

Incremental Design at SEACON 2009

A few days ago I gave a short talk on Incremental Design at SEACON 2009, a new buzzword-free conference in Hamburg, Germany. Aside of the fact that this was the first conference in my beautiful home town (and only 15min away from home), I enjoyed to meet a lot of people there. I also made up a few slides for my talk, which you can now download as PDF (in German):
And last but not least I used my new presentation tool called Session Five for the first time. Was absolutely great!

Friday, June 12, 2009

"OSGi on the Server"-Talk at JAOO 2009 in Aarhus

I am invited to the JAOO 2009 conference in Aarhus, Denmark, to talk in the “Java-Now” track about “OSGi on the Server”. I am pretty excited to join the folks at JAOO since I heard a lot of good things about this conference and the program already sounds quite interesting. Hope to meet a lot of interesting people there!

Friday, May 29, 2009

Slides from the OSGi Talks at Java User Group Essen

Already two weeks ago I gave two talks together with Gerd Wütherich at the Java User Group Essen meeting at May 14th. We talked about OSGi in general and building web applications on top of OSGi in specific. We had a room full of interested people and I enjoyed a lot talking there. If you are interested in the slides, here they are:
Enjoy!

Thursday, May 07, 2009

OSGi Talks at Java User Group Essen

I will be at the Java User Group Essen meeting next week to talk about OSGi together with my colleague Gerd Wütherich. We will talk about the basic ideas behind OSGi as well as building web applications on top of OSGi. Take a look at the announcement for more details (in German).

Monday, May 04, 2009

Coming up: Eclipse Demo Camp in Hamburg

The tradition of the Eclipse Demo Camps in Hamburg (Germany) will continue with its next edition on Monday, May 25. We will, again, be at the scenic EAST design hotel and have great demos, drinks and, and, and... So don't forget to register yourself by adding your name to the Galileo Demo Camp Hamburg wiki page. This time, we had the idea to continue with a Stammtisch right after the Demo Camp (please don't forget to add your name to that list as well), so even more drinks can follow... ;-)

Sunday, May 03, 2009

Equinox Aspects 1.0 M7a available for download

Because of a stupid bug in the caching area I put a fixed build of the milestone online. So if you tried M7 and observed performance problems with the caching, you should try this fixed milestone build instead from the Equinox Aspects download area.

Friday, May 01, 2009

Equinox Aspects 1.0 M7 available for download

The seventh milestone of Equinox Aspects is available for download from the Equinox Aspects download page. This milestone contains quite a large improvement for controlling the weaving of bundles. More details can be found in this comment on bug 255682. Take also a look at the New & Noteworthy list for 1.0M7 on the web to find out more.

Tuesday, April 28, 2009

Building a Lego Castle Incrementally and Interatively

My colleagues Henning Wolf and Arne Roock had a great idea for our company booth at the last JAX conference: Every attendee got a single LEGO brick in his conference pocket. The goal was to jointly build a LEGO castle at the booth, piece by piece, with a huge crowd of developers. So every attendee got a time slot of 30 seconds (a single iteration) to place one or more bricks and/or to refactor the existing building. And we had (and I think the builders, too) a lot of fun with that! Its always fun to work with these creative guys!

Arne and Marcel recorded a stop-motion-movie from the building process, taking a picture after each 30-seconds iteration. The final movie is published at the companies website:
Have fun watching the movie!

JAX 2009 Revisited

My colleague and friend Matthias Lübken wrote with me a short blog-kind-of-a review, reflecting the JAX conference in Mainz last week. Just some thoughts and impressions on OSGi, Scala, Pecha Kucha (and more...) for the next Eclipse-Magazin. The online version is already available here:
But take care, its German... ;-)

Sunday, April 26, 2009

Load-Time Weaving for Spring-DM

Load-time weaving in an OSGi environment is different than in single-classpath-settings like you often have in Java. There you typically use a JVM agent or a specialized classloader that gets ClassFileTransformer components injected from your application. Those ClassFileTransformer components then to the real job of modifying bytecode at load-time. This is also used in the Spring framework to enable aspect weaving or JPA bytecode enhancements.
This gets different when you are working in an OSGi environment. Within OSGi you no longer have a single classpath application, you cannot (or at least should not) create specialized classloaders for yourself to do the magic, maybe the weaving should happen specifically for each bundle or the woven code gets additional dependencies woven into it. Using Spring in an OSGi environment doesn't make things easier. You can use Spring Dynamic Modules to implement really cool OSGi applications, but your Spring load-time weaving support remains broken to some degree (see all the related questions in the Spring-DM forum).
I often thought about using Equinox Aspects to solve these problems. Since Equinox Aspects is not tightly bound to AspectJ weaving only, you could re-use the base infrastructure to hook any kind of bytecode modifier into the Equinox runtime - and reuse the caching of Equinox Aspects at the same time.

Now I have a first sketch implemented that bridges between Spring-LTW and Equinox Aspects. The EquinoxAspectsLoadTimeWeaver class implements the LoadTimeWeaver interface of Spring and can therefore be used in your spring context as the load-time weaver component:

<context:spring-configured>
<context:annotation-config>
<context:load-time-weaver
class="org.eclipse.equinox.weaving.springweaver.EquinoxAspectsLoadTimeWeaver"/>

If you define this load-time weaver your bundle need to define an Import-Package on "org.eclipse.equinox.weaving.springweaver", of course.

To use this kind of load-time weaver definition to need to add "org.eclipse.equinox.weaving.hook" (from Equinox Aspects) to your target platform as well as "org.eclipse.equinox.weaving.springweaver":

When you launch your OSGi runtime you need to set the system property: (osgi.framework.extensions=org.eclipse.equinox.weaving.hook) and start the springweaver bundle right at startup. You can do this by adding it to the config.ini file (org.eclipse.equinox.weaving.springweaver@4:start). This is basically the same when using Equinox Aspects, except that you no longer start org.eclipse.equinox.weaving.aspectj but instead the springweaver bundle.

There are still some issues that need to be solved (see this comment in the spring forum for details), but I hope to can try it out and tell me what works fine and what needs some more work.

Feedback always welcome! Enjoy!

Friday, April 24, 2009

JAX 2009: Patterns and Best Practices for Dynamic OSGi Applications

Right after the talk on my lessons learned I had the pleasure to talk together with Kai Tödter and Gerd Wütherich about examples, patterns and some best practices to build real dynamic OSGi applications. Here are the slides:
Kai put together a really nice example for using different ways on how to build dynamics into OSGi apps. It demonstrates all the cool ways of dealing with OSGi services in a declarative way, like Declarative Services, iPojo, Spring Dynamic Modules and Guice/Peaberry. The URL to the example project is on slide 7, if you would like to take a closer look at it.

JAX 2009: Lessons Learned from 5 Years of Building Enterprise OSGi Applications

Yesterday I gave a talk at JAX 2009 about my experiences from using OSGi for enterprise application development over the past 5 years. I tried to sum up my experiences and most of all the mistakes I made during the past years using OSGi. If you are interested, take a look at the slides:
Enjoy - and try to not make the same mistakes than I... ;-)

Wednesday, April 22, 2009

JAX 2009: What's Possible for Web-Apps and OSGi

Today I gave a presentation together with Gerd Wütherich and Peter Roßbach about the difficulties and options you have if you want to adopt OSGi for building web applications. The room was pretty crowded (more than 220 people) and I enjoyed the talk a lot. If you would like to take a look at the slides, you can find them here (unfortunately in German):
Enjoy!

Tuesday, April 21, 2009

JAX 2009: What's New in Equinox Aspects

Today I gave an updated version of my EclipseCon short talk on What's New In Equinox Aspects at the Eclipse Forum Europe 2009, here in Mainz. Here are the slides:
Enjoy!

Thursday, April 16, 2009

Next version of Scala IDE for Eclipse uses Equinox Aspects

Today Miles Sabin posted details on the upcoming 2.7.4 release of the Scala IDE for Eclipse. I am pretty excited about the fact that it uses Equinox Aspects to implement deeper integration with JDT. It uses the same aspect bundle as AJDT called JDT weaving. Andrew Eisenberg gave a great talk on JDT weaving at EclipseCon 2009. Take a look at the slides if you would like to read more about JDT weaving using Equinox Aspects.

Wednesday, March 25, 2009

EclipseCon 2009: OSGi for Eclipse Developers

It was fun giving the talk on "OSGi for Eclipse Developers" at EclipseCon 2009 together with Chris Aniszczyk and Bernd Kolb. At the end we had plenty of time for some interesting questions. Luckily we had BJ Hargrave and Peter Kriens sitting in the first row to answer the really hard ones... :-)

Here are the slides of the talk:

Tuesday, March 24, 2009

EclipseCon 2009: What's New in Equinox Aspects

Just a few minutes ago I finished my short talk on "What's New in Equinox Aspects" at EclipseCon 2009. The slides are online:
I am now looking forward to my talk tomorrow on "OSGi for Eclipse Developers" together with Chris and Bernd. Stay tuned!

Tuesday, March 10, 2009

Exciting OSGi-Experts-Day at JAX 2009

Just a few weeks after the upcoming EclipseCon the next conference opens the doors. The JAX conference (which also includes the Eclipse Forum Europe) in Germany takes place in Mainz, Germany, from April 20th to 24th. While the conference is fully packed with a lot of interesting stuff, I had the honor to organize the OSGi Experts Day, a one-day mini conference inside JAX. The goal of this extra day at the end of the JAX week is to have advanved topics only and nothing for OSGi newbies.

Of course I had more ideas how to fill this day that slots available, but I think we will have a quite interesting day. These six talks will be presented:
At the end all speakers will participate in a panel to answer questions from the audience. And I am sure that we will have a lot of interesting discussions during the breaks as well. So join us for this cool day on advanced OSGi topics!

Monday, February 02, 2009

Slides from OOP talk on dynamics with OSGi available

As Kai Tödter already pointed out in his blog entry, our session on dynamics for OSGi applications at the OOP conference last week was a lot of fun. I enjoyed this session with Kai and Gerd a lot. Thanks, guys!

Equinox Aspects 1.0 M5 available for download

The fifth milestone of Equinox Aspects is available for download from the Equinox Aspects download area. There are no new features, just a few bug fixes included in this milestone build.
Aside of that we discussed a few changes to the way Equinox Aspects can be used and are going to include some changes for the next milestone. The feedback from the AJDT team and their users is really useful to further improve the stability of Equinox Aspects and to ease the installation process. Special thanks to Andrew Eisenberg and Andy Clement for the feedback, discussions and contributions!

Wednesday, January 28, 2009

Short Talk on Using Equinox Aspects to Provide Language Developers with Deep Eclipse Integration

As you might now, the new version of AJDT uses Equinox Aspects to allow deeper integration of some AJDT features into the JDT. Andrew Eisenberg (from the AJDT team) will give a short talk about this at this years EclipseCon: "Aspects Everywhere: Using Equinox Aspects to Provide Language Developers with Deep Eclipse Integration". Aside of the fact that I am fascinated to see this usage of Equinox Aspects for AJDT (some kind of "eat your own dogfood"), I am excited about the design of this part of AJDT. It allows other language developers to reuse this part to achieve the same level of integration into JDT. Very cool stuff. I will definitely go to see Andrews talk to hear more about this!

Monday, January 26, 2009

Equinox Aspects and OSGi for Eclipse Developers at EclipseCon 2009

Just a few weeks from now the doors will open to a new EclipseCon in Santa Clara. I am very happy that I got a short and a long talk accepted this year!

The short talk "What's new in Equinox Aspects" will be an update on the Equinox Aspects project. We will briefly talk on the improvements and challenges during the past milestone builds.

The long talk "OSGi for Eclipse Developers" is an overview of those OSGi techniques and facets that are typically not very well known by people coming from the Eclipse world to OSGi. So obviously we will talk about using ImportPackage instead of RequireBundle, the concept of OSGi services and why they are extremely useful, and some more fun stuff.

I am looking forward to seeing you at EclipseCon!!!

Refactoring book review by Ralph Johnson

Wow, what a great feedback! In this blog posting Ralph Johnson reviews two books on emergent design and refactoring. I had to look twice, but the book on large refactorings that he reviewed was the one that my colleague Stefan Roock wrote together with me some time ago. I was so excited about this positive review from the father of so many work on refactoring that I completely forgot to refer to this from my blog... Now, a few weeks later, my brain is back to normal state (or worse, who knows) and I am happy to post this here... :-)

Friday, December 12, 2008

Equinox Aspects 1.0 M4 available for download

The forth milestone build of Equinox Aspects is available for download. This build focuses on improving stability and reliability. Take a look at the 1.0 M4 New & Noteworthy page for more details and a list of fixed bugs.

Wednesday, December 03, 2008

Next version of AJDT uses Equinox Aspects

This morning I read this mailing list posting about using Equinox Aspects on the AJDT and AspectJ lists. Great to see that the AJDT team is going to use Equinox Aspects as supporting technology for the 1.6.2 release coming up at the end of this month. If you are interested you can find more details on this wiki page: JDT weaving features.

Friday, November 21, 2008

Slides and more from Eclipse Summit Europe 2008

I am back from the Eclipse Summit Europe 2008 in Ludwigsburg and found the time to put the slides from the talk on Equinox Aspects online (pdf). The slides are pretty much the same as from the previous talks I gave on aspect weaving for OSGi during the past weeks, so you won't find real new stuff in it. Nevertheless, giving this talk is just plain fun.

The RT symposium (I helped Heiko and Jeff a bit to organize it) on Tuesday morning was more or less an open discussion about topics around the RT project. We asked for answers to some questions upfront to the meeting and discussed those during the first part of the symposium. For sure some nice and interesting discussions came up during this. Nevertheless the second part of the symposium was a lot more lively and interesting from my point of view. We collected some topics, prioritized them and discussed them in the prioritized order (maybe something like "Open-Space Light"). There was a lot more discussion going on, more participation, sometimes even a bit controversal. Great. If I will participate in organizing such a symposium again sometime in the future, I will definitely vote for doing more (if not all) of the symposium that way.
A rough outline of the symposium can be found at the RT-Symposium-at-ESE-2008 wiki page. And I can recommand watching the video podcast that Ian Skerrett recorded together with Jeff about the RT symposium. Its fun watching... :-)

This was not the only video that Ian recorded at the event. He interviewed all the symposium organizers and published these great video podcast episodes (series 1, series 2). Thanks a lot, Ian, for these video podcasts. Absolutely great!!!

Wednesday, November 05, 2008

Slides from WJAX 2008 online

Still being at the WJAX conference in Munich I took the time to put the slides online from all the talks I am involved in: Enjoy!

Sunday, November 02, 2008

Equinox Aspects 1.0 M3 available for download

The third milestone build of Equinox Aspects is available for download. This build focuses on improving stability and reliability and implicates major enhancements to some internal implementation details of Equinox Aspects. Take a look at the 1.0 M3 New & Noteworthy page for more details and a list of fixed bugs.

Saturday, October 25, 2008

Looking forward to WJAX and Eclipse Summit Europe

Saying goodbye to OOPSLA I am already thinking about the next two conferences coming up on my schedule and which are highly promising to be very very interesting. In a bit more than one week there is the WJAX conference in Munich, Germany. The program is fully packed with interesting stuff and I am quite happy to talk about some cool stuff as well.

Starting on Monday I will participate in the Agile Day at WJAX where I will talk together with Norbert Grosz about experiences from introducing agile development to an insurance company.
Next is the OSGi Special Day on Tuesday. Together with my colleaque Matthias Lübken we will talk about moving existing applications towards using OSGi. Later that day I will give my fun talk about classloading and type visibility in OSGi - I still love classloading stuff. :-) Wednesday I have the pleasure to share my experiences from using and adapting "The Eclipse Way" (the famous development process of the Eclipse team) for general in-house projects. And finally on Friday, at the OSGi Experts Day, Heiko Seeberger and I are going to showcase Equinox Aspects to the attendees. This will be a real fun week in Munich!

Not far away from WJAX is the Eclipse Summit Europe, starting at Tuesday, November 18th, in Ludiwgsburg, Germany. Together with Jeff McAffer and Heiko Seeberger I am organizing the Runtime Symposium on Tuesday morning. Take care you don't miss this symposium to meet people who are also interested or involved in the runtime projects at Eclipse. In addition to that I will give (together with Heiko) a short talk on Equinox Aspects on Wednesday.

And last but not least I would be really happy to hear from you what you would like to know from the talk on classloading and type visibility in OSGi. If you have any questions you would like to get answered within that talk, please comment on this blog entry. I will try to incorporate them into the talk.

See you there!

Thursday, October 23, 2008

Slides from OOPSLA 2008

The slides of my OOPSLA demo on Equinox Aspects are now online - together with those of my tutorial about Spring Dynamic Modules:
Enjoy!

Thursday, October 09, 2008

Building Platforms with Jeff McAffer on SE-Radio

Two days ago the episode that I recorded together with Jeff McAffer about building platforms was published at SE-Radio. I enjoyed a lot asking Jeff so many questions about how to build successful platforms, good APIs and those things and got many very valueable insights. Don't miss it!!!

Saturday, October 04, 2008

New version of Spring Extension Factory available

When retrieving an OSGi service its good practice to use a timeout. Otherwise the operation could be blocked forever (in the case the service never appears). In past versions the Spring Extension Factory used a hard-coded timeout of 5 seconds. I chose this value more or less randomly, guessing that no bundle would hopefully need for than 5 seconds to create its application context. But I was proven wrong... :-)

Therefore I made the timeout setting configurable. Now you can define the timeout value (in milliseconds) via a system property called "org.eclipse.springextensionfactory.timeout". To set the timeout to 20sec, for example, start the JVM with this option:

-Dorg.eclipse.springextensionfactory.timeout=20000

I also added some more readable exceptions if no application context can be found or if the name of the bean to be used cannot be determined.

The new version can be downloaded from here:
Thanks for reporting the problem, Matthias!

Thursday, October 02, 2008

Eclipse Demo Camp in Hamburg - November 2008

After the great success of the Eclipse Ganymede Demo Camp 2008 in Hamburg in June this year Peter Friese and I are organizing another Demo Camp in Hamburg at the 10th of November. It will take place at the East Hotel, a very fancy design hotel in Hamburg.

The schedule for the demo camp is not finished yet. What we already know is that Harald Wellmann will talk about "Geodata Processing for Car Navigation Systems" on top of OSGi and Gerd Wütherich will give a quick demo on Spring Dynamic Modules. And there will be some more, I am sure.

Don't miss it! You just need to register at the wiki page, come by at the 10th of November and enjoy the demos, food, drinks and other Eclipse enthusiasts. I am looking forward to seeing you all there!

Tuesday, September 30, 2008

Dynamic OSGi Applications (at WJAX 2008 and OOP 2009)

In the past years I have used OSGi mostly because of the modularity features. I loved to create small bundles with clear dependencies and visibilities between them - and I still do. I missed this kind of modularity in Java for so many years and I think that many teams still disregard this important modularity for their systems.

But I always knew that the module layer (the one I love so much) is only a small part of the OSGi world. The real coolness of OSGi comes with its dynamics. Using OSGi you can install, update and uninstall bundles at runtime without restarting the JVM. Wow! Doesn't this sound cool?

But wait. What the hack does OSGi do in those situations? If I start my applications, maybe thousands or millions of objects are created, relaxing in memory, referring to each other, talking to each other. Now this thing called OSGi updates a bundle at runtime. And my lovely objects? Are they updated magically under the hood and I don't need to take care of anything? Unfortunately (or I would say fortunately) not!!!

Nothing is done to my objects automatically. Instead I need to take care of those situations myself (which is good news in some way). I need to understand what it means having bundles that can come and go while my system is running (maybe under high traffic). And I need to carefully design my bundles to behave nicely within those situations.

Although its mentioned in every presentation on OSGi I assume that many people still don't know what this really means for building typical business applications. So many (and this includes myself) are used to build systems that are more or less a static set of deployed classes - once a release is deployed and used. Developers typically don't think about parts of the system being installed, updated or uninstalled at runtime without shutting down the application itself. And I think the structure of those systems reflects this. Even if the application is built out of a set of small bundles with clearly defined dependencies - in the end the transitive closure of the main application bundle contains everything. And the app assumes that once I have a reference to an object, this object will stay with me (and be fine) forever.

I observed this situation in some projects and it made me think about it from time to time. I talked to colleagues (namely Gerd Wütherich and Kai Tödter) about this and we discussed our experiences. The result is that we currently try to find some common best practices and patterns to write more dynamic systems than we did in the past for an upcoming talk at WJAX 2008 and OOP 2009.

I am pretty excited that there is so much more to learn how to build really dynamic systems with OSGi and I am sure that this will change the way I write and structure OSGi bundles in the future. Yours, too?

Monday, September 22, 2008

"About-us" episode at SE-Radio

In between the general 10-days-schedule the SE-Radio team has published a short episode about SE-Radio itself. So if you want to know more about our download statistics, the team members, sound quality and more go to: SE-Radio Episode 111: About Us 2008 and enjoy!

Saturday, September 06, 2008

OOPSLA 2008 Podcast is Online

The first episodes of this years OOPSLA podcast are now online and it should be fun to hear what is coming up at the conference. The list of interviewees sounds very promising. :-)

It's again produced by DimSumThinking and SE-Radio. I am pretty excited and feel honored to be the one at SE-Radio who coordinates the episodes and records some of them. But again, without the enormous help of Markus (who records the other half of the SE-Radio-produced episodes) this won't be possible at all. So thanks again for all your help with this, Markus!

Wednesday, August 13, 2008

Bugfix for Spring Extension Factory available

I fixed a problem that prevents the Spring Extension Factory (which I originally described in this post) to work for bundles with Eclipse-LazyStart set to true. The new version works for bundles with or without the layz start setting:
Thanks for reporting the problem as well as a solution, Jimmy!

Friday, August 08, 2008

Equinox Aspects 1.0 M1 is out

The first milestone build of Equinox Aspects 1.0 is available for download from the Equinox Aspects download page. Take a look at the M1 New & Noteworthy page for details.

I am especially happy that this milestone brings OSGi dynamics to aspect bundles. This makes AOP a much better citizen of the OSGi world and gives you a feeling of dynamic AOP, which is really cool... :-)

And I need to mention that the performance of the standard caching has improved a lot. We are now very very close to our goal of running a woven system from cache at the same speed as without aspects.

Monday, August 04, 2008

Demo on Equinox Aspects at OOPSLA 2008

I am happy to announce that a demo on Equinox Aspects is accepted for presentation at the upcoming OOPSLA 2008 conference in Nashville, Tennessee (Oct 19th-23rd). So I would be very very happy to see you all there!!!

Monday, July 28, 2008

ObjektForumNord about OSGi with Peter Kriens

I am pretty exited that Peter Kriens will join us for the ObjektForumNord (website in German, sorry), a series of talks in Germany. This time the session is in Hamburg (my hometown) and Peter is going to give a tutorial and a talk about OSGi. During the afternoon of September 9th, he will give an introductory tutorial about OSGi together with my colleague Matthias Lübken. The evening is filled with Peters talk on "Why Modularity is Important". I am really looking forward to it. Don't miss it.

Sunday, July 27, 2008

News from Equinox Aspects

Some people might have noticed already that some changes are going on inside the Equinox Aspects incubator. Heiko posted the details to the mailing list: http://dev.eclipse.org/mhonarc/lists/equinox-dev/msg04653.html.

I am pretty exited that we are moving towards being a better citizen of the Eclipse world. We have re-arranged our development process and aligned it with the process of the other projects at Eclipse. Take a look at our milestone planning and details on what keeps us busy at the Equinox Aspects Plan wiki page.

The first milestone is targeted at the 8th of August, less than two weeks from now. And on the way from milestone to milestone you can watch and test the progress by using the development builds from our download page.

Friday, July 25, 2008

Episode on Plugin Architectures at SE-Radio

Last weekend SE-Radio published an episode about plugin-based architectures. Within this episode I talk with Klaus Marquardt about different kinds of plugins and different kinds of systems build with or out of plugins.

This episode was actually my first episode as host and we recorded it a long long time ago. But listening to it today disappoints me somehow. The episode contains a larger number of repetitions from my side and I didn't achieve to make it a condensed episode. Just to be clear: This was not the fault of Klaus, whom I interviewed in this episode - not at all. Again it reveals that recording podcast episodes is a learning process - just like software engineering is.

"Silver Medal" for Equinox Aspects Talk

The attendees session ranking from Java-Forum-Stuttgart 2008 is now online and I am more than happy to see that my talk about Equinox Aspects (slides, code examples) won the silver medal. How cool is that? And its great to see that more and more people are interested in Equinox Aspects. Wonderful...

Saturday, July 12, 2008

Dependency Injection for Extensions, Third Edition

As you might have read from my previous posting I created an example that demonstrates the usage of Equinox Aspects as the load-time weaving engine for Spring Dynamic Modules. Now its time to describe this in more detail. :-)

My first idea behind this combination was to use the @Configurable annotation to use Spring's dependency injection mechanism for arbitrary objects which you typically don't create via the application context of spring. The default examples for this are plain domain objects, extensions are another example (they are typically created by the extension registry of Eclipse). Spring realizes the dependency injection for those objects by weaving an aspect into their classes. This aspect takes care of injecting the dependencies after each object creation. And this is the point where Equinox Aspects comes into play.

Fortunately Spring ships as a set of OSGi bundles. This is also true for "spring-aspects.jar", the JAR archive that contains the aspect that is responsible for making the @Configurable annotation work. And you can use Equinox Aspects to weave this aspect into your bundles wherever you would like to use the @Configurable extension. Sounds good, eh?

Ok, what do you need to do? Let’s go through the example step by step. First you need a target platform that contains the following:
Now you have a class that would like to use @Configurable. In my example it is a view for an RCP application that looks somewhat like this:

@Configurable
public class View extends ViewPart {

private Service service;

public void setService(Service service) {
this.service = service;
}

public void createPartControl(Composite parent) {
...


Then you define in the spring context of the same bundle the view as a spring bean, including the "service" property (the dependency that should be injected):

<bean class="org.eclipse.example.springdm.rcpview.View" scope="prototype">
<property name="service" ref="myservice"/>
</bean>

<bean id="myservice" class="org.eclipse.example.springdm.rcpview.Service"/>


Take care to define the bean for the view as of scope "prototype". This is necessary to tell spring that this bean definition should be used as prototype for various instances.
Now we need to tell your bundle to be woven with the spring aspect. Therefore you just define the aspect bundle as required bundle:

Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.springframework.bundle.spring.aspects


Now Equinox Aspects (if started correctly) weaves the aspect into your bundle wherever the @Configurable annotation is used. The next step is to tell the spring context that it should use load-time weaving and annotation configuration (plain old spring configuration for load-time weaving, nothing special here):

<context:spring-configured>
<context:annotation-config>
<context:load-time-weaver class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver">


This also requires some more import package statements within your manifest:

Import-Package: org.aspectj.lang,
org.aspectj.runtime.reflect,
org.springframework.instrument.classloading,
org.springframework.beans.factory.annotation


The first two import statements are necessary because they are needed if an aspect gets woven into one of your classes. A more elegant solution for this would be to reexport those packages from the spring-aspects bundle, but they didn’t define the reexport in their manifest. Therefore you need to import them manually.
The last step is to take care of the startup sequence of your bundle. If the extension is created, your bundle should be activated to get the spring context created. This creation of the spring context should happen synchronously to ensure that the context is created when your extension object is created – otherwise the dependency injection would not work. Therefore I declare in the manifest:

Eclipse-LazyStart: true
Spring-Context: *;create-asynchronously:=false


If you would like to take a look at the complete example that I used, you can download it here:



Feedback and questions are always welcome!

Code Examples from "Aspect Weaving for OSGi" Talk

As promised, here are the projects of my live demos from "Aspect Weaving for OSGi" at last weeks Java-Forum-Stuttgart 2008.

Eclipse Monitor Demo

This demo features the relatively old Eclipse Monitor application that Chris Laffra wrote a while ago. It visualizes plugin activities within your Eclipse application and you can analyze what is going on. This monitor uses Equinox Aspects to weave an aspect into all your bundles at load-time to gather the information of what is going on at runtime. It uses AspectJ advises for all methods and object creations. While this is a pretty heavy use of load-time weaving (you will notice a huge performance impact at first startup) it demos nicely the caching feature of Equinox Aspects. The second startup of your monitored app will perform very similar to a startup without any aspect weaving.

To run the example: Within your development environment you should have AJDT installed to work with AspectJ. In your target environment you should have included your favorite IDE (as example RCP app to monitor), the matching AJDT version, and the latest Equinox Aspects development build from here: http://www.eclipse.org/equinox/incubator/aspects/equinox-aspects-downloads.php. Notive: You need to install the latest dev build, not one of the archived builds. Once you have this you should be ready to run the example. Just import the projects in your workspace and use the included launch configuration.

Dependency Injection with Spring Dynamic Modules and Equinox Aspects

Spring provides this nice mechanism to inject dependencies in domain objects via the @Configurable annotation (see more here: http://static.springframework.org/spring/docs/2.5.x/reference/aop.html#aop-atconfigurable).
The main difference to general spring beans is that the creation of those domain objects is not done by the application context of Spring. Therefore Spring uses an aspect to call the application context after object creation to inject all necessary dependencies. In plain old Spring applications this aspect is woven into the system using load-time weaving.
Wouldn't that be a nice mechanism to inject dependencies into Eclipse extensions (like views or editors)? Just annotate your extension with @Configurable and define the dependencies to be injected inside the application context of your bundle (using the Spring Dynamic Modules stuff)?

One way of doing this is to use Equinox Aspects together with Spring Dynamic Modules. Just use the spring-aspects.jar from your spring distro (its already an OSGi bundle) and enable Equinox Aspects weaving - and you are done. It just works! :-)

To run the example: You don't need any special support within your development environment. Instead your target platform should be configured carefully. For the example projects I used Eclipse 3.3.2 as target platform, added AJDT, added the latest dev build of Equinox Aspects, Spring 2.5.4 bundles and Spring Dynamic Modules 1.1.0 bundles. Import the example projects from the zip file into your workspace and use the included launch config to run the demo. The example injects a spring bean into the view extension.

I will give more detailed information on how this Equinox Aspects weaving can be used together with Spring Dynamic Modules in an upcoming post.

If you observe any problems or if I forgot something in this description, please let me know.

Have fun with the examples!

Thursday, July 03, 2008

Slides from "Aspect Weaving for OSGi" Talk

This morning I gave a presentation at the Java-Forum-Stuttgart conference on Aspect Weaving for OSGi. The slides of this talk are now available for download:
The code for all live demos from the presentation will follow shortly.

Tuesday, June 24, 2008

Reminder: Equinox Aspects at Java-Forum-Stuttgart 2008

This is just a friendly reminder that you have the chance to see Equinox Aspects live and in action at the upcoming Java-Forum-Stuttgart 2008 next week at the 3rd of July. I will give a talk at this nice conference in Stuttgart, Germany, about Aspect Weaving for OSGi. And the talk will be fully packed with a number of live demos including:
  • Monitoring Eclipse with aspects
  • Installing, updating and uninstalling aspects at runtime (dynamics for aspects)
  • Using Equinox Aspects together with Spring Dynamic Modules
It will be really really cool, don't miss it! :-)

Sunday, June 22, 2008

Slides and Examples from Spring-Dynamic-Modules-Talk at the OSGi Community Event 2008

Already more than a week ago I gave a talk at the OSGi Community Event 2008 in Berlin about the Spring Dynamic Modules project. Giving the talk was fun, I used a number of live demos to showcase Spring DM in action. The slides are now online:
The code for all the demos can be found at the JAX blog entry of my colleque Gerd Wütherich, who prepared most of this talk. Thanks again for the great work, Gerd!

For those who are new to Spring Dynamic Modules: This project of the Spring portfolio basically allows you to use the Spring framework within an OSGi environment in a very nice and easy way. You can find more information on the Spring Dynamic Modules homepage.

Thursday, June 19, 2008

Report from Eclipse Demo Camp in Hamburg

Last Monday the Ganymede Eclipse Demo Camp took place in Hamburg. More than 40 attendees showed up and enjoyed a number of great presentations. Peter Friese wrote up a nice summary of the demo camp. I enjoyed the event a lot and I am looking forward to organizing the next Eclipse Demo Camp again together with Peter. Was a lot of fun! Thanks Peter!

Also many many thanks to Arne Roock for his great support in organizing the event and finding this cool location! His support is absolutely priceless!!!

Tuesday, June 10, 2008

Eclipse Demo Camp in Hamburg is Approaching Fast

Don't forget to register for the Eclipse Demo Camp in Hamburg - it is approaching fast. Starting next Monday at the EM-2008-friendly time of 6pm we will see some interesting demos, have free drinks and food (thanks to our sponsors: Eclipse Foundation, itemis and it-agile) and a lot of fun, I assume... :-) The demo camp takes place at the former coffee exchange - a really cool location:


So, have fun at the demo camp and many thanks to my colleague Arne Roock for his organizational support. Absolutely priceless.

Sunday, June 08, 2008

Equinox Aspects at Allianz

Some days ago I got a copy of the latest German Eclipse-Magazine (Vol. 15, 3/2008) and I found an experience report article about using Equinox Aspects. Cool! Great to read that people are using Equinox Aspects in large strategic projects. This report is about using Equinox Aspects for advanced performance tracing in a large production system at Allianz, a major insurance company in Germany. So if you are happy reading articles in German, take a look at it!

Thursday, June 05, 2008

SE-Radio Live at the OSGi Community Event 2008

The OSGi Community Event 2008 starts next week in Berlin, Germany. And there will be a special event taking place after the reception on Tuesday evening: We will host a live SE-Radio recording session. Isn't this cool? We are going to have a panel like discussion session with some interesting people and hopefully questions from the audience - all going into the se-radio recording and becoming part of that episode. So if you are going to the OSGi Community Event make sure you don't miss the SE-Radio live session - from 8pm to 9pm in the main room.
And many many thanks to Peter Kriens for making this possible and helping so much in organizing this!!!

Wednesday, June 04, 2008

Open XP-Days Germany 2008

The XP-Days conference series is a nice event series throughout Europe for people interested in agile software development (not reduced to Extreme Programming) and related topics. This years XP-Days Germany will take place in Hamburg from November 27th to 29th.
In opposite to the past XP-Days this years conference has an open review process in parallel to the submission process. This idea has two great advantages: everybody can review and comment on submissions via the submission system and people who submit sessions can benefit from those reviews and feedbacks by improving their submissions before the program committee decide. Sounds good, eh? I am used to this kind of open submissions from the EclipseCon conference and I must say: I like it a lot.
So don't forget to submit a proposal or give feedback on existing proposals - or simply join the conference this November!!!

Wednesday, May 28, 2008

Dependency Injection for Extensions, Second Edition

At this years EclipseCon I implemented an extension factory utility that could be used to delegate the creation of an extension object to a spring context (if you are using Spring Dynamic Modules). The result was that you were able to define your extensions as spring beans including all the nice spring features (dependency injection, aop, dessert topping, whatever...). That first implementation was nice, but had a number of stupid limitations (worked only for active bundles, for example). The good news is: A new version is available that includes some nice improvements... :-)

Firstofall, here is the new version of the Spring-Extension-Factory:

The new features are:
  • Ability to declare the bean-id explicitly within the extension definition

  • Automatic start of non-active bundles (and application context creation via Spring Dynamic Modules) when an extension is being created

How can I use this extension factory? Lets look at some examples. Lets assume you implement an RCP application and you would like to define a view as spring bean to inject some dependencies. First, you declare your spring bean inside the spring context:
<bean id="myview"
class="org.eclipse.example.springdm.rcpview.View"
scope="prototype">
<property name="myService" ref="serviceBean"/>
</bean>


Okay, this defines the spring bean called "myview" and injects a bean with the id "serviceBean" as a dependency into my view. The class of the view is the normal view implementation that you are familiar with. Don't forget to declare the bean as of scope "prototype". Otherwise spring would return always the same object every time an extension should be created (which is not the contract of the extension mechansim).

Now we define the extension in the plugin.xml file:
<extension point="org.eclipse.ui.views">
<view name="Message"
allowmultiple="true"
icon="icons/sample2.gif"
class="org.eclipse.springframework.
util.SpringExtensionFactory:myview
"
id="org.eclipse.example.springdm.rcpview.view">
</view>
</extension>


The class that is now referenced in the extension instead of the view itself is the spring extension factory followed by a colon and the id of our bean from the spring context. The rest of the extension definition looks exactly as before (without the extension factory).

The Spring Extension Factory includes two additional options to refer to the bean id within the extension definition. This is the strategy that I implemented into the extension factory:

  1. If a bean-id is explicitly defined (like in the example above), use this id to lookup the bean.

  2. If not, search for an id attribute within the contribution element of the extension and use it as the bean-id.

  3. If no id attribute is found inside the contribution element, try to use the id of the extension itself as bean-id.


The first option is the most explicit one. The second option works just for those extension definitions where the corresponding extension point schema defines an id attribute as part of the specific extension (this is the case for views, but obviously not for all extension points). The third option can be used for all extension points but is less explicit that the first one. In the end its a matter of taste which option you prefer.

Comments, feedback and improvements, of course, highly welcome.

Have fun with it!!!

Equinox Aspects and Spring-DM at the OSGi-Community-Event 2008

The OSGi-Community-Event 2008 in Berlin is less than two weeks ahead and I am pretty excited to give a talk on Spring Dynamic Modules there as well as some live demos on Equinox Aspects at the evening reception Tuesday night. The talk on Spring-DM will introduce the possibilities of using the Spring framework and Spring-DM within the OSGi world using some examples and live code. For the evening demo of Equinox Aspects I will do my very best to show the current state of Equinox Aspects together with some cool new features things like dynamics (aspects coming and going) with Equinox Aspects and (maybe) even load-time aspect weaving for Spring and Spring-DM within OSGi using Equinox Aspects. So please keep your fingers crossed for my live demos. :-)

Saturday, May 10, 2008

Finally aspects become dynamic

I recently committed some changes to the Equinox Aspects project which allows the Equinox Aspects runtime to handle dynamically uninstalled aspects correctly with regards to the woven bundles in the system. Having this it was only a small step to also deal with dynamic updates to aspect bundles as well as woven bundles at runtime. And now, finally, we are there: real dynamics for aspects. You can install, update and uninstall aspects at runtime as you like and the Equinox Aspects runtime takes care that everything will be woven and re-woven correctly. This is really really cool and a huge step towards real OSGi-enabled AOP, I think.

But what happens if aspect bundles are installed, updated or uninstalled at runtime? All other bundles that need to be woven, that need to be re-woven or that need to be un-woven from the aspect are updated automatically by the aspect runtime using the OSGi mechanisms. This means also that your system should be able to deal with OSGi dynamics and bundles coming and going (which is not a trivial thing to do). So be a good citizen of the OSGi world and your bundles will behave well when aspects are coming and going at runtime... :-)

Thursday, May 01, 2008

Aspect Weaving for OSGi at Java Forum Stuttgart

This years Java-Forum-Stuttgart 2008 is on the 3rd of July and takes place again at the Kultur- & Kongresszentrum Liederhalle (KKL) in Stuttgart, Germany. I attended this nice conference over the past years talking about various topics and listened to interesting talks there. Its well organized and its a pleasure to be there.
This year I will talk about one of my favorite topics: Aspect Weaving in OSGi. I will tell people what they need if they are going to adopt OSGi and AOP for the same system and how it is possible to modularize aspects into OSGi bundles. The talk will contain some live demos showing load-time aspect weaving for OSGi using the Equinox Aspects open-source project. It will be way cool, don't miss it! :-)

Saturday, April 26, 2008

When all is said and done I become a Guru ;-)

While reading the OSGi book from my colleagues I stopped by the dedication section on the first pages and found that Matthias dedicated the book not only to his wife and his daughter but also say thanks to me in this section, calling me his "personal Equinox Guru". Wow, I finally become a Guru... ;-)

Aside from not feeling like a guru at all and aside from the fact that there are hundreds or even thousands of developers on the planet knowing more about Equinox than I do - I feel somewhat proud to be mentioned in this book in such a nice way. :-)

Thank you, Matthias!

German OSGi Book

Colleagues and friends of mine have published a great introductory book on OSGi. Its called "Die OSGi Service Platform -Eine Einführung mit Eclipse Equinox". Its completely written in German (but don't be afraid, they told me an English version is somewhere in the pipe) and the first book on OSGi on the planet. Wow. Make sure you get a copy and learn about OSGi. I can just highly recommend to read this great book!

Friday, April 25, 2008

Slides from JAX 2008 Talks Available

So I am back from the JAX 2008 conference where I met people, gave a number of talks and listened to some other interesting presentations. The PDF versions of my slides are now available from the events section. Enjoy!

Wednesday, March 26, 2008

Update: Getting Hooked on Equinox - Article in German Eclipse-Magazine

I complied with the term of the publishing company not to publish the PDF file of my latest article on the hook mechanisms of the Equinox OSGi runtime for a certain period of time, but the waiting time is now over. I put the PDF of the latest article on "Getting Hooked on Equinox" (in German) for the German Eclipse Magazin online in the publications section. Enjoy!

EclipseCon 2008: Short Talk on Adopting "The Eclipse Way"

I put my slides from my short talk at EclipseCon 2008 about adopting "The Eclipse Way" online in the events section. Enjoy!

Tuesday, March 18, 2008

Dependency Injection for Extensions

While preparing the tutorial on Spring Dynamic Modules for this years EclipseCon I played a bit with using Spring Dynamic Modules to dependency inject beans into views or other stuff I typically define as extensions for my Eclipse Rich Client Platform application. The problem is that the actual objects for those extensions are created by the Extension Registry and do therefore not pass the spring context for dependency injection. I needed to find a way to combine those two technologies somehow.

I came up with a very small and trivial solution for this: I created a class called SpringExtensionFactory that implements IExecutableExtensionFactory from the Extension Registry mechanism. This extension factory takes an ID from the extension definition, finds the spring application context for the bundle that contributes the extension and tries to retrieve the spring bean with the same id from that application context. This bean is then returned as the extension object. This trivial solution does not require any additional programming work to be done, no load-time weaving (for @Configurable, for example), just plain nothing.

Yon can download this SpringExtensionFactory from here, its open-source under EPL 1.0:
The interesting question is which ID this extension factory takes from the extension definition to look up the bean in the application context. The answer is: It is a two-step process. It first tries to find an "id" attribute within the configuration element of the extension definition. This is typically the case for RCP views, for example. They have an "id" attribute to identify the view. If there is no "id" attribute found within the configuration element it steps back to the extension definition itself and takes the "id" attribute from there.

If you have any questions I am happy to help you with this stuff. Just leave a comment (to share your thoughts and questions with the community).

EclipseCon 2008: Tutorial on Spring Dynamic Modules

EclipseCon 2008 has started today in sunny Santa Clara. I ran a two-hour tutorial about Spring Dynamic Modules together with Adrian Colyer from SpringSource and BJ Hargrave from IBM. The tutorial went well and was full-packed with a lot of stuff that we showed and demoed (mostly Adrian). Therefore it was no real surprise that we completely ran out of time and that my final part on Eclipse RCP and Spring Dynamic Modules was mostly skipped. Nevertheless you have the chance to take a look at the slides, they are online at the conference site as well as on my events section.

Thursday, March 13, 2008

Release 1.1.0 of Equinox Aspects available

I am proud to announce that a new release of Equinox Incubator Aspects is available for download. Version 1.1.0 features a standard caching service for woven bundles on non-IBM VMs (contributed by Heiko Seeberger) and contains a number of big fixes and minor improvements.
Especially interesting is that you no longer need to define aspect bundles upfront in the config.ini when you start your runtime. The reworked supplementing mechanism can deal with such situations and handles even dynamically installed aspect bundles correctly (more details to follow in this blog).
This release works with all up-to-date and development versions of AJDT (1.5.1, 1.5.2, 1.6.0) and Eclipse (3.3, 3.4).

Monday, February 25, 2008

Getting Hooked on Equinox: Article in German Eclipse-Magazine

The current issue of the German Eclipse-Magazin publishes an article that I wrote together with Heiko Seeberger vom Metafinanz: Getting Hooked on Equinox. The article describes the adapter hook mechanism that is part of the Equinox OSGi implementation. Using this mechanism you can easily modify the behavior of the Equinox runtime or add additional features to it. This mechanism gives you a lot of power over the Equinox implementation without modifying the original code. And that means you can deploy your additions as separate bundles. Users don't need to manually install a modified osgi implementation!!!
I am using this mechanism for the equinox aspects incubator project to add load-time aspect weaving to the OSGi runtime. The article describes the basics of the mechanisms, who it can be used, and gives some examples where it is already being used.

Sunday, February 24, 2008

GetTogether 2008 Event from Software Engineering Radio

The se-radio team is going to be hosting a small conference called GetTogether 2008 in the fall of 2008. The conference will be in the open-space style, so its focussed on interesting discussions rather than formal paper presentations. Nevertheless in order to participate you need to submit a small position paper describing a topic to discuss at the event. Maybe some interesting keynotes will be at the conference as well. Thanks a lot to Markus Völter for doing a great job in organizing most (if not all) of this stuff.

Monday, February 18, 2008

The New Allianz Business System uses OSGi and Equinox Aspects

I picked up some really cool news: the german newspaper Computerwoche reports about the Allianz (the huge insurance company) is moving their complete IT to a new system called Allianz Business System. The article says that the new highly integrated system is based on Eclipse and OSGi technology. Wow! But its comes even better: They are using Equinox Aspects inside, the tiny little incubator project I am working on to integrate aspect weaving into the Equinox OSGi implementation (as you can read from this talk at the upcoming Eclipse Forum Europe).

Friday, January 25, 2008

Slides from OOP

Yesterday I gave a talk at the OOP conference together with Ivo Eitner, the technical project manager of a project I am involved in as a consultant over the past years. We talked about our experiences adopting "The Eclipse Way" within that project. If you are interested in the slides and are able to read and understand German, here are the slides as PDF.

JAX and Eclipse Forum Europe 2008

Seems like they added some more parts to the program of the JAX 2008 conference together with the Eclipse Forum Europe 2008. And I am happy to see that some of my sessions got accepted. :-)

Saturday, January 19, 2008

Recording of SpringOne Talk on Spring and Eclipse RCP

A complete video recording of the talk about Spring and Eclipse RCP that I gave at last years Spring One conference is now online at Parleys.com. Thank you guys for all the great work of recording all the sessions!!!

Saturday, January 12, 2008

New Release of Equinox Aspects

After a long period of quiet I started to work in Equinox Aspects again and fixed two bugs in the current implementation. The new release is available from the Equinox Incubator Aspects website. In general the project is about an OSGi extension that adds load-time aspect weaving to the Equinox OSGi implementation. By doing that you can modularize aspects in OSGi bundles. The runtime takes care that your aspects are woven into the system at load-time.