Building a modular application

ModulesIt is now a couple of weeks I am working on the new 0.7 core. The plan is to rewrite completely the architecture using the Netbeans Platform Framework. In this article I will introduce a bit what I’m doing and the benefits it brings.

I used to claim the importance of software architecture. I have to admit, as I am rewriting completely a new architecture, I didn’t know a lot about architecture so far. I had to ask myself what was wrong. I found some very classical problems. Typically, the architecture was built for a specific set of features and adding features which was not planned at the beginning were very difficult to add. Nowadays I just think this is inescapable and software architecture has a lifecycle, like anything else.

Since, I’m converted to a (Service oriented) API Design and I try to think every day in this way. I’m helped by this excellent book: Practical API Design: Confessions of a Java Framework Architect.

Modular application

The aim is to clearly divide the application in modules, in order they are extensible and can grow independently from each other. It also helps to avoid the spaghetti problem and therefore it fits for very large applications, like Netbeans IDE.

In addition, a modular application is much more appropriate for an open-source project, with several programmers involved. As a consequence, new programmers from GSoC will only work on the new 0.7 architecture.

Netbeans Platform

The Netbeans Platform Framework is used by Netbeans developers to build their IDE. The framework is available for Swing programmers to build medium and large desktop applications. It encourages sustainable development practices and provide all the “plumbing” that, before, I developed myself.

One of the main benefits is that you don’t need to think how to build an application extensible by plug-ins because everything is plug-in!

Example:
For instance a controller class can obtain all implementations, in any module, of an Algorithm interface. In this way anyone can develop an algorithm class and include it in a plug-in. No additional code will be needed to include the algorithm in Gephi.

I will start a topic about modular design on the forum to start a discussion.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s