Wednesday, September 26, 2007

One week of beta1 - Party time with Web Services.

So yesterday I blogged about installing NB 6.0 beta1. I just installed the dev build of the 25th, but I used beta1 for about a week on our mobile multi-player game. I was developing the backend last week on Glassfish v2b58g.

As with the installation everything runs quite smoothly, although you shouldn't be looking in the messages.log, since it is not stacktrace free. So far I haven't been able to relate these stacktraces to problems in NB. Well maybe, sometimes NB freezes, it just isn't doing anything, not even consuming CPU, not even writing log entries, but when I switch between applications on my XP box, NB doesn't even come up. I do see some stacktraces in messages.log, but since it doesn't have timestamps, I'm not sure where to put them in the time-space-continuum. Killing java.exe works and I can start NB without problems. I don't even get a message stating that NB is still running.

Sofar I've been using NB to develop my JavaEE backend for the game, which is a EJB 3 solution using TopLink and JavaDB for storage, and WS for interfacing with the client app. I'm using the SWING client that NB can pretty much generate for you to test the WS.

That is actually a cool feature, you just import the WSDL files of the WS you want to connect to and than drag-n-drop the operations in the WSDL into your sources and NB will generate all the code. This is pretty magical stuff, and I use the word 'magical' deliberately, since the documentation on this feature is not very clear. Now I must admit that I didn't read the documentation extensively. The thing that is not clear to me is how I can switch from the generated Java classes that make up the arguments and results of the operations I call to the classes that are actually used by the WS. That is how I will use the code in the mobile client, I have a JAR file that contains the classes for interfacing with the backend by the frontend and those classes I want to use in my tests as well, for obvious reasons. The documentation at first and second glance isn't really clear on how to change this behavior.
There's another gripe I have with this feature of NB to generate the code based on the WSDL: When you change the WSDL or rather the interface of the WS and therefore the WSDL, NB doesn't pick this up automatically, instead you have to refresh the WSDL yourself. There is a checkbox unchecked when you refresh the client that allows you to overwrite the local WSDL with the original WSDL, but there's nowhere to be found what this means. What it means to leave it unchecked or to check it. I have no idea what the impact is to leave it unchecked, as you guess, I check it all the time. Guess I'll file an issue on this right after posting this blog.

One other issue I have with the SWING client and its WS support, is with ANT. All ANT code used is generated by NB, yet I see the following warning: Consider using / so that wsimport won't do unnecessary compilation and have no idea as how to respond to this... well I do, I ignore it. I have no clue as to how to change my ANT file in order to prevent wsimport to do unnecessary compilation. So far it hasn't hurt me too much that stuff is being compiled over and over again. It only takes seconds on my box, so why worry.

For some reason the mobile library I created (it's a JAR file) and am depending on in my JavaEE project is not being compiled when it changed. Well NB isn't building that project when it builds my main project, although there is a clear dependency. But I noticed that with a JavaEE project I created in beta1 that depends on this library is building this dependency, so I guess it's an artifact of an older NB version. I have to look into this.

Well sofar for my experiences in the WS area with NB 6 beta1. All in all I am very happy, NB is rather stable, although I need to kill java.exe every now and then.


Tuesday, September 25, 2007

One week of beta1 - Installation time

So it has been one week of beta1 usage for me now. I'm participating in the NetCAT 60 program, yup I'm one of the chosen ones so I have to use beta1. And being the person I am, I am using it on a production project... although it is intended to be a project that is going to be highly successful... a mobile game that has a JavaEE backend.

But on to beta1. Having played with the dev builds recently as M10 was really not very useful and it prevented me from going back to M9 because of some installer issue I never tried to fix. The dev builds got fairly stable, but there were some annoying full-stops every now and then, and some of the builds had more error messages popping up than code completion dialogs.
The first thing that struck me after installing beta1 and using it, was how fast it started. That was a lot better than M10 and even better than the last dev build I had installed.
One of the things I change immediately after installing a NB version are the startup params, more precise the memory settings. All settings are tripled compared to the default settings. Starting of with a huge amount of memory allocated to the JVM seems to speed things up. Maybe its just psychological, but hey, if it looks faster it is faster.

Then on to the next steps, installing the plugins you can't do without. First of all I need to say that I downloaded and installed the full version. Everything is installed, although I don't plan to use the C/C++ support, the Ruby support and the profiler. Well maybe the profiler.
I still can't believe collaboration is not part of the standard installation. It is probably the plugin I use most apart from the obvious plugins that are part of the standard install. Collaboration is really important as I develop the game together with a friend of mine. He lives about 100 km away from me, so we meet in NB, discuss our progress in NB etc.

After having that done, well this time, I refrained from installing every other module I could find. I did install the PluginPortal plugin, but that's gone now, because it is not really usable because too often I selected a module that wasn't supporting NB 6, that is something that needs a fix. Only show plugins that are supporting the NB version I use.
I tried the SQE update center, but that is not supporting NB versions after M10, which is too bad, since these are really, and I mean really useful plugins.

Next is copying the Templates directory from my NB 5.5.1 installation. I don't believe in importing settings from a previous version, as I had some really bad experiences with older versions (upgrading from NB4 to 5 for example). I choose to redo the work I'd done in the previous version, and copy happily whatever needs copying.
I still need to find a way to smartly get my library definitions across from one version of NB to another. Fortunately I only have like 3 libraries defined, so that's easy to do by hand. But still...

And that's about it. Well almost. After opening the projects that make up our game, I define a project group as well. That's a feature I learned about just recently, where I had my own game projects (about 7 projects) and I was working with a customer (I did the UML design for them in NB) which had about 27 projects. Using groups made it really easy to switch over from my own work to the customer's projects.

So that was pretty much my installation of NB 6 beta1, quite uneventful, quite boring. Don't you just hate it when everything goes right, and you intended to blog about it. One feature request to the NB team: Don't make it so smoothly with beta2, so there's something to complain about when blogging about the installation.