My First Java EE Application - Interview With Sampada Khare
While she is a .NET expert, Sampada Khare was always curious about the Java programming
language. As part of her studies, she designed and developed a sophisticated Yellow Pages application
in Java. She felt that actually writing a Java application would be the best way to learn the language.
“Actually writing a Java application is the best way to learn the language.”
And, since her company has projects in both .NET and Java, it would give her the experience so that
she could contribute to her company's Java projects as well as .NET projects.
Sampada Khare, who has just earned her master's degree in software engineering from San Jose State
University, is a talented software engineer eager to expand her knowledge and technical abilities.
After getting her BS degree in India, she came to the United States and has been working full time for the
past seven years on Microsoft technologies. During the past two years she studied for her master's
degree part time.
Sampada used NetBeans IDE 5.5.1 to develop her Yellow Pages application. We recently talked to Sampada
about her application and her thoughts on NetBeans.
What influenced you to come up with a Yellow Pages application?
What were you trying to accomplish?
I had to do a project for my master's program and I thought that an enhanced Yellow Pages
application would have the right business perspective for my studies. I wanted to create a
Yellow Pages application that would have direct interaction among users and contacts.
I've noticed that other similar Yellow Pages-type applications force interaction to be offline.
So my version emphasizes social networking aspects of a software application.
These screen shots give you an idea of the application. The first one shows the page that
displays results of a search operation, and uses the table and MapViewer components.
This next image shows the page that displays all details about a user. The page uses the MapViewer
and Calendar components. A different page opens in a new window and displays the Rating component.
The last image displays both paid and unpaid bills, plus it lets users create new bills and assign
bills to others. This page uses the visual web components tabset, tabs, and table, along with the
Why did you choose to write the application in Java?
I decided to write this application in Java because I wanted to learn the language. I know .NET
quite well, but there's a whole world out there using Java and I want to broaden my skills.
I think that writing an application in a language is the best way to learn that language.
Why did you use NetBeans as your development IDE?
“In a just a day or two I was quite comfortable with the IDE and started to pick up the NetBeans shortcuts.”
Choosing the NetBeans IDE was easy. My husband uses it and he really encouraged me to try it out.
I had used Eclipse a long time ago for a small project, and, since I really didn't remember it
that well, I thought I'd give NetBeans a shot. I also knew I could get some help from my husband,
so I thought ‘Why not try it’.
After installing NetBeans, I played with it a bit and liked its
general look and feel. It just felt familiar to me.
What was your initial impression of NetBeans?
At work I do my .NET development using Visual Studio. Since I've been doing this for quite some
time, I've learned many of the Visual Studio shortcuts. When I started using NetBeans, I didn't
know the NetBeans shortcuts, which of course are different from Visual Studio.
At first I had to
use the NetBeans menu screens to figure out how to do the things I wanted to do. But I found the
menus and tools intuitive and very easy to figure out. In a just a day or two I was quite
comfortable with the IDE and started to pick up the NetBeans shortcuts.
Can you describe how you went about developing your Yellow Pages application?
“I could easily import the HTML and then I used the visual web
features to complete the page design.”
I started with the database design. I use Microsoft's SQLServer, but any database can be used with
this application. Using the NetBeans tools, I first added a data source and JDBC connection. Then,
I was able to view the database tables in NetBeans, which made things easier since I could do all
my work through one tool without having to switch to the SQLServer tools to view the data.
Once I had the database in place, I used the visual web page design tools to put together the
user interface. I began by writing a HTML prototype for the application. Once I had the HTML
prototype working, I copied it into NetBeans and then started using the visual web pack for my
user interface. With NetBeans, I could easily import the HTML and then I used the visual web
features to complete the page design. The visual web drag-and-drop feature was really great,
and I was able to quickly add various web components to the pages. Since dropping components
on a page also meant that much of the Java code was generated for me, I found it easy to develop
the user interface.
I also added three of the BluePrints Ajax components to my web pages—the MapViewer, Auto Complete,
and Rater components. With not much effort I was able to add a whole level of functionality to my
“I didn't really know the EJB technologies. Going through the dialogs greatly helped me.”
After I completed the interface, I started on the Java EE and Enterprise Java Beans portion of the
application. I was afraid that this part would be more difficult, since I didn't really know
the EJB technologies. Once again, the NetBeans IDE made it easy for me. Going through the dialogs
greatly helped me and again, the IDE generated much of the Java code.
Later, when I put all the pieces together—that is, added the business logic that ties the web
pages to the enterprise beans, I again was able to rely on the NetBeans dialogs to get instances
of specific beans, and to generate the code for the application. The bottom line was that NetBeans
simplified the bean access so that I only had to be concerned about calling the different entity
You mentioned that you used the BluePrints Ajax components.
Did you find these components
easy to use?
For the most part they were easy to use. I especially found the MapViewer and Auto Complete
components easy to use. The Rater component was a bit harder. What helped me with these components
was looking at the samples for the BluePrints components. These samples gave me the general idea
about how to use the components and that was enough to get me going.
What other aspects of NetBeans did you use when developing your application?
“I was impressed with the diagrams that the UML tool generates.”
I also used the UML tools to generate some diagrams that I needed to document my application.
In particular, I wanted the class diagram. But I was also impressed with the other diagrams
that the UML tool generates.
And of course I used the debugger. At first I thought the debugger was a bit slower than other
debuggers I've used. I think this was because I didn't have an optimal setup since I was
repeatedly starting and stopping the application server. Then, when I realized that I should
just start the application server in debug mode, it really speeded up the process.
You said you didn't know Java before you started this project.
Did you find that
NetBeans helped you learn Java?
NetBeans definitely helped me learn and get up to speed with Java. The IDE provided everything
I needed to write this web application and to do the EJB component development. The IDE is
easy to use and its interface is pretty intuitive. The dialogs are a great help, as is the
code generation. It's really an impressive IDE and I definitely recommend it to others.