But how times have changed. I'm using Java on the client side for services; Java powers the HTTP server (Tomcat), the database (Derby), and the IDE (NetBeans). The client is the remote descendant of NN4, Firefox 2.0. And if I want to test between other browsers, I have Internet Explorer 7 and Opera 9, and they all pretty much behave the same. Nine years does make a difference.
I'd already installed NetBeans 5.5 along with the Enterprise Pack and the Profiler. Along the way I'd also installed the Derby database via NetBeans' Update Center. When the question was asked about web tools I took that as a excuse to install Visual Web Pack and give it a go.
NOTE: The Visual Web Pack is a Technology Preview. It is not meant for production applications. Any comments and criticisms I may make are made with that in mind.
The Visual Web Pack seems to add all the bits necessary to create complete web applications using a visual design philosophy similar to Matisse; that is, you drag and drop web page controls to a blank page, which can then be moved around and manipulated before being displayed. Before you can begin the process of page construction you have to create a Visual Web project. You do this in the standard way (for me anyway), by right clicking on the project view to create a new project. When the New Project dialog appears, you then select the Web category and the Visual Web Application project, as shown below:
By this time it should be obvious to the regular NetBeans user how to fill out subsequent dialogs. If you're unsure of yourself, you can check out the Visual Web Pack section of the NetBeans website. There, you'll find documentation, tutorials, and blogs covering all the key features of Visual Web.
The next few views show my results in following the tutorial, "Using Databound Components to Access Databases." I won't go into the details of creating it, but I will list some of the gotchas I discovered while working with the Visual Web Pack.
As you can see above, it's easy to lay controls on the page. I find it interesting that they use a very good grid layout to position the controls. This after the commentary about how Matisse was created and why grid layouts were a bad thing. Oh well. The drop down list at the very top and the table in the middle are bound to data tables in the Travel database hosted by Derby. It was trivial to drag and drop a database table onto a control, with one notable exception. It appears that dropping a database table on the drop down control is a bit touchy with this release. I had troubles binding a table to the control when I dropped the table in the center of the control. After a few false starts I found that I had to pay attention to the visual cues when dragging over the drop down control; I had to make sure that the outline was highlighted before releasing, otherwise the binding failed and I could not select specific columns for the drop down as was illustrated in the tutorial.
Once all the controls were in place, I then attempted to launch and test my pages. That's when I ran into my second problem. The embedded Tomcat HTTP server failed to find the JDBC driver. I'd seen this problem with my earlier experiences using Tomcat. I went looking for where Tomcat was located within NetBeans, and sure enough, I had to find and copy the file 'derbyclient.jar' into location netbeans-5.5/enterprise3/apache-tomcat-5.5.17/common/lib. I restarted Tomcat and when I tested again, Tomcat could create the necessary database connections and my page displayed the data.
You may notice what appears to be a small Google map on the display. That's because I imported some AJAX controls, one of which was a map. I just dropped a map control on the page and fired it up to test it out. That created several interesting problems of its own:
- My first attempts to use the control resulted in a dialog popping up informing me that I had to acquire a new Google key to use the control on my web page. I found directions for fixing the problem on the Sun site after googling for the problem (look at the bottom of the page in the section titled "Troubleshooting"). You can get your Google map key here. I didn't hack the raw web.xml file so much as use the much easier editor to enter the parameter and name value. Once I did that the map started to work.
- Which led to the second problem. The default location is 0 latitude, 0 longitude, which puts the map displayed dead center on the Google location. I wanted something closer to home, in this instance the University of Central Florida. First I found it's location by using regular Google Maps. Then I clicked on the page link to create a coded URL that contained the latitude and longitude for UCF. I then copied that into the mapviewer's properties. I took a little poking around on the IDE to find it; it certainly wasn't intuitive. The top image of the IDE shows the mapView1_center highlighted on the left, with the properties on the right. I hope they clean up and combine all the various related properties before the final release.
Overall, I found a lot to like in the preview. The emphasis of easy page creation using drag-and-drop AJAX controls and databinding is quite powerful. There's a lot to investigate, and I've just barely begun to scratch the surface. The glitches can get be annoying, but it is just a preview after all. I'm going to be very interested in following how the Visual Web Pack evolves until its release. I'm interested to see how standard web page creation can be merged with the powerful control features that are currently available. Will it be a one-stop development tool, or will I need a second editor for web page content development while using this tool to add the necessary AJAX controls? Only time will tell.