blob: f9fc2d51c88786768d97ff710e35d54986be8caf [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- -*- xhtml -*- -->
<title>Meet a NetBeans Module Writer: Sandip Chitale</title>
<link rel="stylesheet" type="text/css" href="https://netbeans.org/netbeans.css">
<meta name="AUDIENCE" content="NBUSER">
<meta name="TYPE" content="ARTICLE">
<meta name="EXPIRES" content="N">
<meta name="AUTHOR" content="Geertjan Wielenga">
<meta name="developer" content="gwielenga@netbeans.org">
<meta name="indexed" content="y">
<meta name="description"
content="A week or two ago, James Gosling attended a demonstration that blew him away. The smoothness of module development in NetBeans IDE 5.0 really surprised him. Meet the man behind that demonstration -- Sandip Chitale, Senior Staff Engineer for Sun Java Studio Creator. Interviewed, he shares his opinions openly and discusses some of the modules he's been working on. Plus, you get to download them and try them out yourself!">
<!-- Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. -->
<!-- Use is subject to license terms.-->
</head>
<body>
<h1>Meet a NetBeans Module Writer: Sandip Chitale</h1>
<p><small><a href="mailto:nbdocs_feedback@usersguide.netbeans.org?subject=Feedback:%20Meet%20A%20NetBeans%20Module%20Writer:%20Sandip">Feedback</a></small></p>
<table width="190" border="1" cellspacing="0" cellpadding="5" align="right" class="ltblue">
<tbody>
<tr>
<td align="center"><img align="center" src="nbm_interviews/pic_sandip.png" alt="Sandip's picture">
<br><b>Sandip Chitale</b></td>
</tr>
<tr>
<td>Download Sandip's modules!
<p>Binary NBM Files:
<ul><li>Get the NBM files from his <a href="http://blogs.sun.com/roller/resources/scblog/update-center.xml">update center</a>.
<li>Get the sources and latest developments from his <a href="http://blogs.sun.com/scblog">blog</a>.</ul>
<p>Related docs:
<ul><li><a href="nbm_interviews/Readme">README</a>
<li><a href="nbm_interviews/nb5.0beta2moduleinfo.html">Module Info Task Sample Output File</a></ul></td>
</tr>
</tbody>
</table>
<p>NetBeans recently met with Sandip Chitale, who is a Senior Staff Engineer for Sun Java Studio Creator.
He has over 17 years of experience in software development and has been working with Java since 1996.
He's also someone who has written&#8212;and continues to write&#8212;NetBeans modules.
<p><h3>Sandip, how did you come to be involved in NetBeans module development?</h3>
<p>I am interested in Graphical User Interfaces and Software Development Tools i.e.,
Integrated Development Environments (IDEs). I have worked on several IDEs. My current interests&#8212;refactoring
and language modeling in IDEs. I am currently working in Sun Java Studio Creator (an IDE for developing
JSF based applications) development group. I am working on support for refactoring and two way editing
of JSF artifacts (JSP, Java and faces configuration files). Sun Java Studio Creator is based on the
NetBeans Platform. That is how I got into NetBeans IDE. In the past I have worked with Eclipse IDE and
Eclipse RCP. I developed several Eclipse modules and a prototype Eclipse RCP application. NetBeans IDE is one of
the first IDEs with a completely modular architecture. In NetBeans IDE everything is a module. That is very cool!
<p><h3>What are some of the most recent NetBeans modules that you've been working on?</h3>
<p>The Java File Structure module shows the structure of Java files. The Java Type Hierarchy module shows the hierarchy of Java Types.
<p><h3>What do they do?</h3>
<p>The Java Type Hierarchy module adds a menu item to the View menu as well as a toolbar button and
keyboard shortcuts.
When you choose the menu item or press the shortcut, the hierarchy of the Java type
under the cursor is displayed, as shown in this illustration (click to enlarge):
<p><a href="https://platform.netbeans.org/articles/nbm_interviews/JavaSuperTypeHierarchy.png" target="_blank">
<img src="nbm_interviews/JavaSuperTypeHierarchy_thumb.png" alt="Java File Type Hierarchy"></a>
<p>On the other hand, the Java File Structure module pops up to show a tree structure of a selected Java file. For
example, all its classes, interfaces, methods, and fields are shown (click to enlarge):
<p><a href="https://platform.netbeans.org/articles/nbm_interviews/JavaFileStructurePopup.png" target="_blank">
<img src="nbm_interviews/JavaFileStructurePopup_thumb.png" alt="Java File Structure"></a>
<p><h3>So how are these modules different from the Navigator in NetBeans IDE?</h3>
<p>I was asked the same question when I demoed these in our Sun Java Studio Creator group meeting. So I am prepared to answer this!
The biggest
difference is that both the modules can show the <i>structure or hierarchy</i> of the type under the cursor,
aside from the currently open file. Both the modules show JavaDoc when available. The JavaDoc is
shown in a <tt>JEditorPane</tt>, which allows scrolling. Both the modules have an ability to load
arbitrary classes using the Java Type Name text field at the bottom. To some people the popup behaviour
is more appealing. The Java File Structure filter works by narrowing the tree to match the methods
and fields, thus focusing on the thing of interest. The Java Type Hiererachy module can not only
show super classes but also <i>sub</i> classes. This is very important. Having said that, these modules
can also be thought of as being complementary to the NetBeans IDE's Navigator.
<p><h3>You've also made the Module Info Task module. What's that about?</h3>
<p>The Module Info Task module generates an HTML file which shows the details of all the modules
installed in NetBeans IDE. This information is very useful while developing modules, which is
why I developed it. The module info file can be generated by invoking the "Tools &gt; Generate Module
Info" menu item or a tool bar button. The same functionality can be invoked using an Ant task. The Ant
task must be invoked from within the NetBeans IDE. Here is a <a href="nbm_interviews/nb5.0beta2moduleinfo.html">a sample output file</a>
which shows info about the relationship between all the modules in NetBeans IDE 5.0 Beta2.
<div style="float: right;"><img src="nbm_interviews/sandip_quote.png" alt="Sandip quote"></div>
<p><h3>The modules can be downloaded from this page. Can you tell us what state they're in? </h3>
<p>They are in fairly good shape. However, they are not part of the NetBeans IDE and thus
have not gone through rigorous testing. I have tested them only on my Windows XP laptop.
<p><h3>What did you find the most interesting thing while developing the modules?</h3>
<p>Firstly, the notion of public packages which export only certain packages of a module to other modules.
This takes getting use to, as it is different from the standard notion of Java classpath. On the other hand it
forces you to think about what are the public interfaces that are exported from your module and what are
the private implementations.
<p>Secondly, the notion of layer files to declaratively configure services of a module is very interesting.
The layer file describes a hierarchical, virtual file system which configures the functionality of NetBeans modules and
applications based on the NetBeans Platform.
<p>Thirdly, the new support for module development in NetBeans IDE 5.0 makes it very easy to get started with
module development. The <a href="https://platform.netbeans.org/tutorials/index.html">new tutorials</a>
also provide great help to the developers starting on NetBeans
module development. The new <a href="https://platform.netbeans.org">NetBeans module development support</a>
is another great resource for module developers.
<p>Finally, there is very powerful support for Java Language Modeling hidden inside NetBeans IDE.
It not only models Java Class files but also the Java Source code in real time. I discovered this
while working on the Sun Java Studio Creator project. That provided me inspiration to develop the Java
File Structure and Java Type Hierarchy modules.
<div style="float: left;"><img src="nbm_interviews/sandip_quote2.png" alt="Sandip quote"></div>
<p><h3>What was hardest, Sandip?</h3>
<p>I started developing modules using NetBeans Platform 4.1. In those days it was hard to
find the documentation of module development. That was then. That is all changing in
NetBeans IDE 5.0&#8212;which has excellent support for module development.
<p>The Module APIs documentation is slightly hard to navigate.
<p>The documentation of what goes in the layer files is spread across documentation of
various modules. The view in the module project&#8212;under Important files:XML Layer
helps in visualizing how your modules layer file participates in the target platform.
<p><h3>How did you overcome obstacles?</h3>
<p>It was hard to find how modules related to each other and what was exported by which module.
Also it was hard to correlate the NetBeans API documentation to the actual usage of the API. When
I wrote the Module Info Task module, it helped me to correlate the NetBeans API documentation to
the actual usage of the modules. The filter functionality in the Add Library dialog also helps somewhat.
<p>It was hard to learn about the Java Language Modeling support. I had to refer to the source
code of several modules and look at how the APIs were used in the NetBeans IDE itself
to understand how to use the Java Language Modeling support APIs.
<p><h3>What are your key learnings?</h3>
<p>The modular architecture is a boon to developers who want to contribute additional cool
functionality to an already powerful, open source NetBeans Platform. The new module development
support makes it very easy to get started.
<p>Based on my experience with developing modules for Eclipse IDE I can safely say that module
development is as easy (if not more so) using the NetBeans Platform.
<p><h3>Recently you introduced James Gosling to NetBeans module development.
That must have been an interesting experience. Can you tell us something about it?</h3>
<p>Yes, I recently demoed the Java File Structure and Java Type Hiererachy modules at a Sun Tools All Hands meeting.
<div style="float: right;"><img src="nbm_interviews/gosling_quote.png" alt="Sandip quote"></div>
<p>I demonstrated how easy it is to build NetBeans modules using the support for building modules in
NetBeans IDE 5.0. James Gosling was in the audience. Here is what he had to say after the demo:
<p><i>"After your talk I went back to my office and tried building a module: Worked totally smoothly...
Took less than a minute to get 'hello world' to work. Great job folks! What makes it especially cool to me
is that I tried this exercise a couple of years ago and banged my head against NB3.6 for quite a
while before giving up. It was a really obscure process, especially since I wanted to do it without asking for
help (asking The Gods for help seemed like cheating) What a difference!"</i>
<p><h3>If you could improve one thing about module development in NetBeans IDE, what would it be?</h3>
<p>The module support documentation could be improved. Better documentation of layer files is definitely
required. Alternatively the user should never be required to edit these files. That would be fantastic!
However, what that means is that all the Module Development support wizards will have to be re-entrant.
<p><h3>Tell us about a few things you're thinking of doing with NetBeans module development in the future?</h3>
<p>Currently I am working on a module to better integrate NetBeans IDE with the rest of the desktop. It should be possible
to open file or folder nodes (using D&D or context menu item) in various NetBeans IDE explorers using other
applications. For example, by clicking on an XML file I should be able to open it in the XML editor registered with the OS.
<p>I am also thinking of developing some additional Java refactorings.
<p>
<!-- ======================================================================================== -->
<h2><a name="nextsteps"></a>Further reading</h2>
<p>For information about creating and developing modules, see the following resources:
<ul>
<p><li><a
href="https://platform.netbeans.org/tutorials/quickstart-nbm.html">Introduction to NetBeans Module Development</a></li>
<p><li><a href="https://platform.netbeans.org/tutorials/index.html">NetBeans Modules and Rich-Client Applications Learning Trail</a></li>
<p><li><a href="https://netbeans.org/download/dev/javadoc/">NetBeans API Javadoc (Current Development Version)</a></li></ul>
</p>
<hr>
</body>
</html>