Over a million developers have joined DZone.

Interview: NetBeans Platform at Next Google Summer of Code?

DZone 's Guide to

Interview: NetBeans Platform at Next Google Summer of Code?

· Java Zone ·
Free Resource
Mathieu Bastian is a highly motivated software engineer, interested in data visualization, and leader of the Gephi project. He currently lives in Paris, but also stays in Prague from time to time. He has several years of experience with Java programming and likes to develop applications that are easy to install and easy to use. He likes challenges, and visualizing massive graph structures in real-time "is a nice one".

Gephi is an open-source graph visualization software, recognized for its performance and usability. For the second year, the project has been selected by Google for the Google Summer of Code program. Mathieu will be mentoring two or three students during the summer and continue the work on core development and documentation.

On Twitter you recently wrote that the NetBeans Platform would be good to have at GSoC. Why do you believe that to be the case?

Gephi is a mentoring organization at the Google Summer of Code. Last year we got 4 students, this year we hope to get 5 or 6.

The Google Summer of Code program is short, students have three months to learn how the application code works but above all to “Get Things Done”. Our aim is to reduce the learning curve of the environment and help students produce clear and reusable code. The NetBeans Platform helps a lot in various ways:

  • Thanks to a modular design, we can propose subjects that will extend or interact with one or two APIs only, trying to keep the low-level complexity hidden.

  • With the NetBeans Platform, students don’t lose time understanding build procedures or where to start in the code. They create a new module in a NetBeans Platform application, add API dependencies, and can then start coding right away. When drafting specifications, mentors make sure the job can be translated in a set of NetBeans modules, with a particular role for each. Students may learn new things trying to answer questions like “Can your module be detached from the UI?” or “How to let plug-in developers add new features to your module?”. That is positive because that is something you don’t learn at university. The NetBeans Platform development quickly demonstrates the important tradeoffs of large applications.

  • The NetBeans Platform also facilitates collaborative development, as modules can evolve independently in different code branches with versioning support and be packaged easily.

What are the main gains your application acquired from the NetBeans Platform?

The software architecture is much clearer and more reliable than before. It has been divided into a set of modules, each communicating through a dozen APIs.

Porting the application to the NetBeans Platform was the perfect occasion to rewrite core modules in a modular paradigm. That eventually brought clarity and opened the way for new developers to join the project. With well-written and documented APIs, newcomers can quickly extend the application and get things done.

Our reliance on standard technologies: Java, Swing and now NetBeans Platform, is an essential element of trust. It is important for Gephi to be seen as a reliable and long-term project to seek for new contributors.

Here is a screenshot:

How is the NetBeans Platform particularly well suited in the area covered by your application?

First, Gephi uses JOGL (Java OpenGL library), which is Swing and fully supported in NetBeans. Thanks to NetBeans OpenGL Pack, it is quite easy to create a 3D application on top of the NetBeans Platform.

But the most important benefit is modularity. The ability to let developers create plug-ins easily is essential. Gephi’s project core is visualization, but it is extensible in many directions. One could code a module to visualize enterprise data or develop a proof-of-concept transportation network algorithm within Gephi. One could also visualize links between pieces of software with the help of a Gephi plug-in. Networks are at the heart of many different problems and thus require flexibility in tools. The modularity offered by the NetBeans Platfrom covers this flexibility need in most cases. You can always replace a module by your own implementation if you're not satisfied with what's available. Because covering all use cases at once is not possible in our domain, modularity is the only choice.

What are your favorite NetBeans APIs?

  • Lookup is the backbone of a NetBeans Platform application and must be cited first. We repeatedly use the service provider scenario to propose extensible features like algorithms, filters, or new file format support. I really like that a single annotation is enough to add a feature and directly see it integrated in the user interface.

  • I also really appreciate the Explorer & Property Sheet API for its richness and simplicity. It saved me a lot of development time not doing JTree, JList or JTable hacking.

  • And the AutoUpdate API, now we have our update server where Gephi automatically connects to get its latest modules version. Users can report an issue on our bugtracker in the morning and get Gephi updated in the afternoon without downloading a new version!

Any tips for getting started with the NetBeans Platform?

For software designers looking at using NetBeans Platform for their project, I would recommend to read Jaroslav Tulach's book: Practical API Design: Confessions of a Java Framework Architect. It gives really good insights about sustainable software design.

Tips for more advanced NetBeans Platform users?

Exploring NetBeans IDE source code is not as difficult as it may seem. Read the FAQ! The source code is split into modules and thus makes the first exposure easier. I learnt a lot digging into it:

  • how to split features in modules

  • how to write good API documentation

I also reused quite a lot of UI code that I found in NetBeans code, looking for hidden treasures.

Finish this sentence: "If I had known..."

If I had known the NetBeans Platform before, I wouldn’t have developed my own (unfinished) Java desktop application framework...

Anything else you'd like to share at the end of this interview?

The applications are on for the Google Summer of Code! Students can look at Gephi’s list of ideas and apply now. Get paid during the summer for working on cool projects and your favorite technologies.




Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}