My name is Zoran Sevarac and I am a teacher at the University of Belgrade in Serbia. I've been teaching introductory programming courses in Java for 7 years and also some advanced courses about software engineering tools and methods.
While I'm teaching, I enjoy writing code together with students and showing them how to write their own code, of course. That's why we started the open-source software development course where we contribute to open source projects together and learn along the way.
In this article I’ll share my experiences about why I find NetBeans IDE to be great for teaching Java.
Out of the Box Experience
After a simple installation procedure, which consists of a few “Next” and “Finish” steps, students get everything they need for both Java desktop and Java Web development.
For Java desktop development, NetBeans IDE has an integrated visual Swing GUI builder that is very easy to use.
One of the important features of the GUI builder is that it renders GUIs at design time, even if there are syntax errors in the code. This is very important for beginners and is a common cause of confusion when working with other IDEs. The student creates UI components, starts writing code for a button event handler, and suddenly starts wondering where all the GUI components have gone. In the beginning, they are usually not aware that this is caused by syntax errors in their code and that it can be fixed by resolving that error. None of these problems occur in NetBeans IDE.
Another nice feature for desktop GUIs is the easy to use component layout, which frees students from messing with standard Swing Layout managers, which is also a bit confusing for beginners.
For Web development, the NetBeans IDE Java EE download comes with application servers and web servers, in particular, Tomcat and Glassfish:
It also comes with a small Java database server, in the form of Apache Derby:
There's also integrated Maven tools and versioning support (Git, Subversion, and Mercurial out of the box) and support for commonly used Java Web open source frameworks, such as Spring MVC, Struts, JSF, and Hibernate.In other words, everything you need to start Java Web development is there, and ready to run. No need to download and install application servers, plugins, configure the IDE, etc. Running a few simple wizards outputs a basic Web application skeleton in just a few minutes. See the video tutorial about JavaEE7 with PrimeFaces development to quickly get started.
From a pedagogical point of view, it is very important that students who are taking their first steps in the Java world focus on concepts and that they don’t waste time trying to fix low level technical details related to the tools they use. While greater flexibility may be important for advanced users, the out of the box experience is more desirable for beginners. Also note that NetBeans IDE does not lack flexibility, it simply provides a set of well thought out preconfigured initial settings.
Intuitive and Friendly Wizards and Templates
A simple wizard system gives users a way to easily create projects, packages, and classes with a minimal number of steps and intuitive dialogs with a minimum of required input. While other IDEs provide more options in a typical new project/file dialogs, which can shorten some operations, these often leave beginners asking themselves “and what are those for?” Compare this to the simplicity of the NetBeans wizards, such as the New Java Class wizard:
The logical wizard workflow, and the minimal overhead of dialog information required from users, are strong points in favor of NetBeans IDE, in my opinion.Also note that NetBeans IDE provides a powerful wizard system, which can output a working CRUD application, for example, which requires minimal additional tweaking:
See Generating a JavaServer Faces 2.x CRUD Application from a Database for an example. This provides students a quick and easy way to get the general picture about how something works, together with being able to focus on specific details. A very useful teaching practice is to ask students to change the existing functionality from the application generated by wizard.
In general, I would say that the NetBeans IDE feature set supports what I consider to be good teaching practice, which is in particular true when teaching beginners, whether in general Java desktop or Java Web programming.