Easy Web Site Creation in the NetBeans IDE
By dananourie on Feb 19, 2008
Last year I attended a Tech Days event and learned about the ease of use of jMaki widgets for web site building, and then I gave a chat in Second Life on the topic of web programming using the NetBeans IDE, including what I had learned at Tech Days. This article is based on those talks, showing how incredibly easy it is to create a web site in NetBeans through drag-and-drop without writing code, and how you can gradually learn Java programming by adding to your JavaServer Pages (JSP), and creating other features or programs that may be added to your site.
This article is aimed at new developers and programmers, and developers new to the NetBeans IDE. To follow the examples, you must have the following software installed on your computer:
- The Java Standard Edition Platform (Java SE) (Note, you can download the JDK with the NetBeans IDE).
- The NetBeans IDE 6.0 or greater.
One of the wonderful things about the NetBeans IDE is that you don't have to know all the languages or how to combine the technologies. NetBeans handles the languages, and combines technologies seamlessly for you. In addition, the NetBeans IDE has some wonderful drag-and-drop widgets from various built-in palettes. For instance, you can drag and drop HTML components to create a form, Swing components to create great looking buttons or menus, or drop in interactive Ajax components using jMaki widgets.
The web site you see below in Figure 1 is not beautiful, nor is it a design I recommend. However, all of its components were simply dragged onto a page, and are fully functional, requiring no code to be written from scratch. You can do a lot of web site creation in the NetBeans IDE with very little programming.
Notice the clock that keeps time (on the right), a form (on the left) that gathers data from users with the all important CAPTCHA (the image above the submit button) to prevent spam, a tab layout in the center that makes for nice organization, and a fisheye effect on the photos at the top. No programming was needed for any of these. All of these features were added through drag and drop, which is far less time consuming than coding those components yourself.
There are also many services available that you can simply drop onto a page, then add URLs, or whatever you need to include to pull in that service, such as with a mashup. For instance, adding RSS feeds to your page is very easy.
NetBeans also handles writing to and pulling data from a database, as described in the Using Databound Components to Access a Database tutorial.
To create the web site shown above, read the rest of this article