Meet a NetBeans Module Writer: Edgar Silva
Edgar's hot links:
Edgar Silva, a very active NetBeans module (plugin) developer in Brazil, will be presenting his research at JavaOne on May 17th at 20.30. NetBeans staff caught up with him and asked him a few questions.
Edgar, where in the world are you and what do you do there?
I am Brazilian, and right now I live in Porto Alegre, in the southern region of Brazil. But I have lived in a lot of other cities in Brazil, such as Belem, Manaus (Amazon Region), Sao Paulo, Belo Horizonte, and Brasilia. I work for Summa Technologies, as a senior consultant, providing consultancy services as a software architect and technical leader in some very interesting Java projects.
Are you active in the Java community in Brazil?
Yes, I am, at least I believe I am: I was BelJUG founder in Belem, the first active and important Java User Group (JUG) in the Brazilian Amazon region. Recently BelJUG was incorporated as a SouJava member, which is very good for people in Belem, because they can share a lot of nice things with the national SouJava, such as assistance in events, sponsorship and so on. In fact, SouJava is one of the reasons that Bel�m is present as a very important city in Brazil when we talk about Java. I am helping in SouJava's management in Brazil; in addition, I give a lot of presentations in a lot of places, and the audience is always a very excited NetBeans community!
My last presentation was last April, the 11th and 12th, at Fortaleza-CE, at Sun Tech Days - S�o Paulo, and I talked about NetBeans in one of my presentations. An interesting thing is that there were a lot of university students, and after I showed NetBeans Matisse, the visual GUI builder, the room got very noisy—many people were upset, because when they studied Java Swing they had used "the dark IDE", so... they wrote a lot of lines of code to build very simple user interfaces...
Can you tell us about NetBeans in Brazil?
Since 2004, NetBeans in Brazil has had a very close relationship with us. Brazil is a very large country, with number of particularities, such as that a large number of Portuguese accents are spoken here. In the last few years, through SouJava assistance, Eduardo Costa has been leading NetBeans translation for Brazilian Portuguese (PT_BR), and I am trying contribute to that. I would like to show NetBeans in PT_BR at JavaOne!
I believe that the number of NetBeans users has improved since 2003 - 2004. At least, nobody looks at me as an E.T anymore for being a NetBeans user! And, as I have the pleasure to work with a lot of companies, they're moving to NetBeans, not only because NetBeans is better, but because of the simple fact that NetBeans is a ready-to-use IDE: simply download it, install it and USE it! I have so many friends teaching at universities here, and they are all using NetBeans. Recently NetBeans promoted the NetBeans Desafio (NetBeans Challenge), for creating plugins, and as a result we have had a lot of fanstastic plugins built in Brazil. We're doing a lot of work here and in the coming years you will see many more Brazilian users in the NetBeans community.
You've been very busy creating modules for NetBeans IDE. Tell us about them!
NetBeans really aims at productivity. In addition to this, it is really easy to create plugins since NetBeans 5.0. Building plugins is an ability that is very important for the community, as well as companies such as the ones I work for, because we can create a "customer personality", create simple "toys" to enable rapid development and, most importantly, simplified development!
I usually say that some of my modules are my "toys", and as I was a JBuilder user in the past, a couple of times this IDE has inspired me to create new toys for NetBeans. There are a lot of these toys to create—sometimes I would like to have more available time to spend only to do that! One of these toys that I want to make is "Convert to JSF Tags", that will let the user create JSF tags simply by selecting a JSP file in some JSF project. I am planning to do that using JavaCC or another similar approach.
The main effort that I've been working on is finish Greenbox for NetBeans, which is a plugin that generates applications based on Spring, Hibernate and JSF, and I've been studying the best way to enable it for the EJB 3.0 standard. In NetBeans, I created a TopComponent, which reads the connections from NetBeans IDE, so that after this I can get its information, such as fields, catalog, schemas and more. Based on the database structure I can generate a lot of files from use cases using Velocity Templates.
The Greenbox framework helped me with my last customer to develop a Java Solution, containing 28 use cases, with four other developers in four months, to a tight deadline. We finished all of them. Another company, called Sea Tecnologia, from Brasilia, also had a successful project using not only Greenbox, but its main idea—work with Metamodel, such as can be seen in MDA and MOF.
Recently, my friend Pablo Madril, also from Summa Technologies, asked me "Hey Edgar, what about if we are at a customer without a database or with a terrible database, will Greenbox work in this situation?" So, in two or three days, I finished a new module, using Java annotations. I had some doubts as to how to get some tricky information from the IDE, but, after a couple of questions on the email@example.com mailling-list, I solved my problem. Basically, with annotated Java, you can select a Java file in the Projects window and call the pop-up menu and select an option "Generate Sources", then Greenbox will generate everything for you. This gave me a lot of motivation to study other internal secrets inside NetBeans. For example, my actual passion is the Metadata Repository (MDR) Module, which is a MOF implementation inside NetBeans.
From where can we get your modules?
I haven't finished my NetBeans update center, but I am using Java.Net (https://greenbox.dev.java.net), and I am evaluating JavaForge (http://greenbox.javaforge.com). As soon as possible, I will create my update center and provide binary distributions to everything I've been doing with NetBeans.
What are some of the problems you have encountered?
Sometimes I have some question, that for me are completely impossible to answer. I am a lucky guy, because I have some friends in the NetBeans team, and they usually give me some assistance, but they are always very busy, so my main point to solve my problems has been the firstname.lastname@example.org mailing list. In the past, the number of users outside of the NetBeans team answering questions was not too big but, currently, the number of people asking interesting questions, and the number of people not signing in with a netbeans.org address, is really interesting. A lot of people are always providing tips and tricks as to how to solve a lot of hard problems. As with any useful mailing list, besides a lot of help showing Javadoc URL links, some users enjoy sharing their code. So the email@example.com mailling list is in fact a good channel to help you solve your problems.
Can you give a specific example of how you solved a problem?
Recently, I had a nice question: How to get a class reference from a Java file selected in the Projects Window. In a couple of hours I got the solution (thanks Sandip Chitale!), so it made me excited to continue creating my modules. At least there are a lot of people trying to help all the time, and this is very important, because I am not only focused on NetBeans module development. In fact, our customers at Summa Technologies often call us to solve some application server performance problem or a deployment problem. Sometimes their persistence fails or they have some other Java technology problem. Therefore, for people like me, NetBeans is two different things at the same time... an IDE and a platform.
What did you enjoy most about creating your NetBeans modules?
I don't have too much time to spend studying a lot of docs before I create an extension, so NetBeans for me is good, because it is really intuitive and you can really have a very quick development cycle.
What are your favorite features of NetBeans?
Usually humans likes things that can be improved, customized, and styled to a certain purpose. Men stereotypically do it with theirs cars; women usually with clothes, maybe. If I could make a comparison, NetBeans is for me a kind of car in which we can invest a couple of hours for tuning, until I really have an awesome Machine. I really enjoy having some buttons and features that cause my friends to ask: "Hey Edgar, I don't have that feature in my IDE... is it new?" After some jokes, I say "No, it is our IDE, especially for us, different from anyone else's".
Another great feature is that NetBeans is a ready-to-use IDE! So, it can avoid a lot of confusion about preferences by one plugin over another. I like a lot NetBeans features, impossible to name only one, but, for example, I like "Create Shortcut" when you select an Ant task and can create a menu item, toolbar button, or keyboard shortcut that invokes it from inside the IDE! Also, Matisse is really awesome, reminds me of my good old Delphi! Really incredible! I wanna see the new features about databinding and data controls in NetBeans 6.0!
If you could change one thing in module development features in NetBeans, what would it be?
Definitely Property Sheets! There are things I would like to do with them that are maybe impossible, or I really just don't know how to use them very well. Please make it easier, and create something like one of the following:
I apologize if something like this is already available and I just don't know how to do it!
So, you're going to be at JavaOne. What are you going to do there?
I have had the following "BOF" session approved:
Session Id: BOF-2340
Session Title: Creating NetBeans Plug-ins for Integration With JavaServer Faces, Hibernate, Spring, and EJB 3.0 Technology
Room: Esplanade 304/306
Start Time: 20:30
In this session, Alexandre Gomes and I will show how we can improve productivity using NetBeans module development using the Greenbox framework, which enables applications to use Hibernate 3.0, the Spring Framework, and JavaServer Faces. In additition to this, we will show a lof of tips and tricks in how to build a very interesting J2EE architecture for several kinds of applications. And, finally, we will show some modules built with EJB 3.0, and what you can expect from Greenbox 3.0 and NetBeans together, such as support from UML Designer reading and generating code, and more sophistacated usage of MDR (JMI/MOF) and other new features that are planned.
I hope to see everybody there—usually at my presentations in Brazil there are a lot of good jokes! I hope to translate them into English properly, allowing the audience to have a very interesting presentation and even to see a few people laughing when possible!
Thanks, Edgar and all the best at JavaOne and with your module development in NetBeans.
For information about creating and developing plug-in modules and rich-client applications, see the following resources: