Tuesday, September 22, 2009

Review of "LWUIT 1.1 for Java ME Developers" by Packt Publishing [part 03 - first uses]

i,

So the last few days I have been struggling, not with LWUIT but with my health. But I made some progress.

As I stated last time, I think the book "LWUIT 1.1 for Java ME Developers" is more of a reference than a tutorial and while working on the screens for our game, I found that this is true. I still need to download all source-code from the Packt Publishing site, but I think it is safe to say that I won't learn programming using LWUIT with this book.

The route I took is that I have the design of the screens I want to redo in LWUIT available as SVG screens (see for yourself at the left). Like I said before, the support for these SVG forms on my N95 and my N85 is disappointing to say the least, so we chose to use LWUIT instead.




I recreated the form in LWUIT as well as the code behind it, so the components on the form are bound to some attributes in the form. That all worked very nicely. (see at the right)
The book was very helpful in this perspective. It showed me very clearly how to create a form, use different layouts and how to add components to the form. The book doesn't degrade itself to a printout of the JavaDoc, it actually provides a very good mix of API and context.

But you should be aware that unless you know what you want and how it should look like, there's not really a point in opening the book.

As you can tell from the screenshots in this post, the screens have the same fields, but the design is completely different. Fortunately the book has quite a bit on the topic of themes and resources. That's my next mission; Figure out how I can make them look a like, meaning the LWUIT screen to look like the SVG screen. Expect to read about this in the next post.

Iwan

Monday, September 14, 2009

Review of "LWUIT 1.1 for Java ME Developers" by Packt Publishing [part 02 - initial feelings]

Hi,


Last week I posted about the context of my review, I want to use the book "LWUIT 1.1 for Java ME Developers" on a real project in which I start of using LWUIT without know it at all, and see if the book helps me in achieving my goal(s). While doing so I'll be posting my findings as a series of posts resulting in the complete review.

Well my first impression of the book once I opened the box it came in was: "Hmmm, one of those computer books". Which it is of course, so no judging there. Although I find the yellow flower on the cover thought provoking. Why did they choose a yellow flower? If you know the answer, let me know. I haven't gone into the book to find out why.

First of all, the book is on LWUIT 1.1, I'll be using LWUIT 1.2. I want to post about the differences sometime soon, but this is relevant information for you as a reader. Where I think the book is outdated, I'll let you know.

The Table of Contents is straight to the point, it is complete and there is only one. I don't like books where they have a TOC that only covers the high-level chapters and then one that covers all chapters, sections, paragraphs and what not. Waste of paper and my time. Here they've used fonts and styles to make clear what the main sections are and what the subsections are. After reading through the TOC I got the feeling that I'm dealing with a Reference Guide instead of a book to learn LWUIT.

The Preface is doing what it is supposed to do, provide you with all kinds of information not related to the topic of the book, but still you need it while 'using' the book. And here it becomes apparent that I'm dealing with a reference guide. Not a book for the real fresh fish in the LWUIT pond. No problem, I've got Google in my toolbox.
It is also stated that I need the Sprint Wireless Toolkit, which is derived from I believe the Sun WTK, and customized and all by Sprint. Since I'm using the JavaME SDK 3.0 for my LWUIT development or NetBeans 68 (dev builds currently) I might run into somethings here. But maybe not. Since Sprint is an US based mobile provider, I assume that those who're looking to deploy in the US are familiar with the SDK, the rest of the world is probably more WTK (or JavaME SDK) oriented or looking into SDK's by the phone manufacturers/

I've decided not to install the Sprint Wireless Toolkit and will let you know what you can expect when you also follow that route.

So here's how I proceed: I'll find a decent tutorial to get the hang of LWUIT and get it to run in NB and the JavaME SDK by Sun. Then I'll design my screens and will then get back to the book to implement them. Meanwhile I will be reading the book and adjust my plan if I think that makes more sense.

Iwan

Friday, September 11, 2009

Review of "LWUIT 1.1 for Java ME Developers" by Packt Publishing [part 01 - context]

Hi,



Yesterday I got my review copy of Packt Publishing's book on "LWUIT 1.1 for Java ME Developers" and as promised before I'll post a review as I am reading and more accurately experiencing the book.

I'm currently working together with friends of mine on a free multi-player online realtime strategy game for mobiles. It's called IFF: Identification Friend or Foe and we're in a private beta stage. The reason why we're in private beta is that our sign-up screens in the client aren't working... on all phones. Our major concern while working on the game was related to screen resolution, since all manufacturers of phones have their own specific set of supported resolutions scaling is an important aspect of our GUI. Obviously the choice fell on SVG (Scalable Vector Graphics).
NetBeans has excellent support for SVG and really helps in designing SVG based UI's including forms. So we went working on it and within a few hours we had our prototype of the registration form, to be used in for signing up. All worked fine until we deployed the client to our Nokia phones. The SVG forms don't do well on an N95 or an N85. The actual game UI does excellent on these models but no chance for the forms. So I went installing various Nokia emulators on my Vista box and started debugging. As it turned out, the SVG support on Nokia devices is not to be used for forms, period.

Here comes LWUIT to the rescue... and together with it JavaME SDK 3.0. Marcel and I thought for a moment to do the UI ourselves, but after about 20 seconds we were convinced that it would turn out to be a LWUIT-like framework, so LWUIT it would be.
Around the same time I was approached by Packt Publishing asking if I was interested to review their book on LWUIT 1.1. So we waited to work on the forms in LWUIT until the book arrived and yesterday it did.

What you'll read in these series are my impressions on the book, the quality of the information in it, the usefulness of the book for somebody who knows Swing but not LWUIT and how the book relates to LWUIT 1.2, since that is what I will be using.

Iwan

Monday, August 31, 2009

Review of "LWUIT 1.1 for Java ME Developers" by Packt Publishing [part 0]

Hi,


Last week I received and answered an email from Packt Publishing. They wanted to know if I was interested to review their book on LWUIT called "LWUIT 1.1 for Java ME Developers". And I said yes, so the book is on its way to me.

Now the interesting part is that we, Marcel and myself, just recently decided to do all the dialogs in our game IFF using LWUIT instead of SVG. Most important reason is that we just can't get dialogs (forms) to work correctly on our N-Series phones. The cursor in edit fields doesn't move correctly, editing only works by switching to the ugly normal text-area input of MIDP.
Although the actual game graphics will remain in SVG, the dialogs (forms) will all be in LWUIT.

Marcel already followed the tutorial on the LWUIT site and is the expert between the two of us, I'm the novice. So I'll be looking at the book from that point of view. Without having written a single character of code that is supposed to use LWUIT I will start on the book and see if it helps me accomplish the tasks at hand... which will result in a series of blog posts.
Hopefully in the end you'll have
  1. A comprehensive book review on LWUIT
  2. A more complete version of IFF, which is now in beta if you're interested.
Iwan

A little annoyance that's groing bigger by the day

Hi,

Promise: Right after publishing this post, I'll file an issue!

So I have setup NB such that the import section and all JavaDoc is collapsed by default when opening a file. Why? Because it clutters my screen and I don't find it helpful to see all that code and documentation.
Since the IDE is doing such a great job in managing my imports and the code-completion shows all JavaDoc when I need it, I don't find it beneficiary to have it in plain sight when I don't need it.

But here's the catch. NB doesn't update the 'focus' of a file when I open it. What I mean is that when I CTRL-Click something in an editor and the source file is not yet opened, NB will open the file, jump to the correct location, make sure that the location is in the visible area on screen and then collapse all editor folds... moving the location of screen. And I need to scroll window to show what I want to see.

This is on NB 6.7.x on Vista at least. Latest updates of the JDK installed of course.

Update: It is filed as issue 171149.

Iwan

Wednesday, August 19, 2009

Why Netbeans rules Glassfish... racing got me to this conclusion (part 2)

Well, last time I used this title I got some useful comments. Meanwhile I fixed my problems and in fact it was a race condition that I couldn't fix by using locks.

The problem I was facing had to do with the fact that I have a graph of objects that I maintain in a database. Adding a new object to the graph, means that certain objects would point to it as being a new neighbor. Which objects in the graph would get a new neighbor is determined by an algorithm that ensures that this process is 'fair' to the other objects in the graph.
When two or more objects are added more or less simultaneously to the graph, my algorithm would do the same thing and select the same objects that would receive a neighbor. One might argue that the system on this topic is truly stateless.
Anyway, I tried to fix my algorithm to not always pick the same neighbors, that didn't work. I tried to change my datamodel such that the system would be a little more lightweight, that obviously didn't work either. I tried to work with locks which ensured consistency in my model, but still no scalability on this end. I did some tweaking with transaction-scope and that fixed some issues. But finally I realized that I needed the EJB 3.1 Singleton which is not available in 3.0 so I mimicked part of its functionality by introducing a synchronized block on the smallest piece of code that suffered from the concurrency. This together with a smaller transaction scope fixed the problem.

But since that doesn't give me that warm and fuzzy feeling. Especially not since I know there's a solution in EJB 3.1, I'm now considering moving to GF 3 and use EJB 3.1 features. Of course all thru NetBeans' support for GF3 and EJB 3.1.

I'll keep you posted.

Iwan

Wednesday, August 05, 2009

NetBeans 6.8 M1... first issue right after starting up

Hi,

Thrilled after installing M1 of NB68 I fired it up and the first dialog was a disappointment. It didn't see that I have a NB67 installation, instead it asked if it was okay to import the settings of my NB65 installation. Bummer.

I reverted back to NB671 and will give NB68M1 a second try later today. Recreating all settings myself and will file a bug on it.

Iwan

Monday, July 27, 2009

Why Netbeans rules Glassfish... racing got me to this conclusion

Hi,

Last weekend I ran into this race-condition on the server side of our game IFF (plug: http://www.sticktailgames.com:8080/IFFMobile/). I was stress testing the server and what do you know, all crumbled into a pile of rubbish as soon as, dare I say, more than one person at a time registered for the game. Now I do have made some short-cuts in the server code to circumvent some code because I want to test a lot, and don't want to have to wait if I don't have to. So entering an activation code on your mobile was taken out of the equation. Anyway, the problem is there and since I do expect some time in the future that two or more people register at the same time, I wanted this to be solved.
As it turned out, there was a race-condition; two processes were fighting for the same record in the database and that turned into an inconsistent state of the data. And since inconsistency in the database is worse than a crashing system that at least is consistent so I can start it up again... It turned out that this little piece of concurrency could be turned into a little piece of sequency and all would work out really nice. So how do you control this? I thought about using a queue to list the requests for a unique record in the database. Since the requests would be handled sequentially I would be out of the woods. A message queue is easily created and NB created all code, including the creation of the server resources for my MDB, queue etc.

Proper code generation is sooooo convenient.

But I needed to revert a lot of code this weekend to a state prior to the weekend, and that included my messaging stuff. Turns out, the resources NB generated in Glassfish v2.1 didn't want to move. Every attempt to delete them turned into an error message, stating that the resource could not be deleted as it was used in server server.

From the GF output in NB: Validation error: [ADMVAL1052: Element connector resource 'jms/iffBaseGenerationTopicFactory' can not be deleted because it is referenced from server 'server']

Not from NB nor from Glassfish' own admin console I couldn't delete the created ConnectionFactory. I had to open domains/domain1/config/domain.xml and delete the lines referring to my ConnectionFactory.

Once I found out how to remove the JMS resources I could get back on track. Now I'm back at solving my race-condition. Still thinkering on how to handle this. Probably I need to ensure that there'll be only one connection possible to the queue. So only one MDB can access the queue and handle the message. Any other approaches are appreciated in the comments of this post.

Iwan

Tuesday, July 21, 2009

JavaME in NB 6.7

NetBeans 6.7 has been out in the wild for a while now and... well and then there's the JavaME stuff, which is kinda important to me since we're developing mobile games (we = Sticktail Games). JavaME SDK 3.0 is finally out the door and pre-packaged with NB 6.7, but still no support on other platforms than Windows. Which until last Christmas wasn't a big deal, but I got a MacBook 13" from misses Santa and would've liked native support for all my tooling... bummer. I'll have to invest in some VirtualBox stuff to get the ME parts running. Any tutorial to get this going is appreciated, but please JavaME SDK 3.0 Team: Get the other platforms done as well. PLEASE.

There's another gripe with the new tooling: I can't open my NB mobility projects in the SDK tooling, since the NB libraries for SVG and others aren't included in it. And there's no easy way to get those libraries in. Major bummer in my opinion, especially since the SDK 3.0 tooling supports for example the WURFL database. Which is nowhere to be found in NB 6.7 although the SDK 3.0 is included and supported as the default emulator, replacing the WTK.

While using the SDK I ran a couple of times in the issue that there wasn't enough memory for my MIDlet suite to be installed, although it installed nicely in the WTK 2.5.2 emulator. And there's no option to increase the size of the emulators heap.

But all in all, the new tooling is superb. Debugging is going a lot smoother now and especially the hot-deploy support is excellent. A real time saver. But ultimately nothing beats testing on an actual device, and the promise of better on-device-debugging support is great. Now we just need to get it working. In a usable fashion. So:

Nokia, Sony-Ericsson, Samsung, LG, HTC and all of you other vendors, please work on this. As long as you're putting in those nasty bugs in your JavaME implementation, we need to test on your devices. I'm okay in getting some different phones to test on, but help me out here as well.

Iwan

It's been a while, we're now at 6.7

Hi,

It's been a while since I've been posting about NetBeans, all kinds of reasons, but mainly because I just couldn't give blogging enough priority. But today I've got some spare minutes.

NetBeans has been growing tremendously since the last time I blogged about it, we're now at 6.7.

I think last time I was blogging about NetBeans I was working on a game, for mobiles. I should check my posts... anyway, what I can tell you is that other than previous experiences with new versions of NB, I've been able to open the project in new versions, even daily builds without experiencing major incompatibilities. Once or twice I wasn't able to also open the project in the old version again. This is of course a major achievement but more over, it makes testing NetBeans a better experience.

So what else are some highlights:
- When uninstalling, there now is an option to also uninstall the userdir. Excellent.
- UML support is about to be dropped, at least it's no longer maintained according the WIKI. Boooh
-The GF2.1 installation from previous versions of NB is no longer recognized and you'll be asked to install a new version. When not selecting to do so, NB does see your old installation and it all works. Confusing
- Woodstock is dropped (JSF components that at least look decent) and is (going to be) replaced by IceFaces. Mildly boooh.

Iwan

Wednesday, December 05, 2007

My NetBeans, has changed its appearance...

... and it has the same bright look and feel as the new NetBeans website. Which is fresh, but to be honest, I liked the other more darker look and feel with all its transitions better.
The home page title is set to HP, why? Probably it's short for 'Home Page'?

It all works better now and I was able to add a picture to my profile, which wasn't possible in the previous version, at least I got an error all the time I tried it.
There are some minor issues that need ironing out and some bigger issues that need to be fixed, but all in all it is a great website.
Still, seeing that my NetBeans Collaboration buddies are online (in NetBeans Collaboration) might be a great addition. Have them added as friends automatically would be fun. Something like Xbox Live.

I noticed that you can't remove friends anymore, or at least it is not very obvious how to do so. I have Lukas added twice as a friend, and I think once is sufficient. Free up some screen real-estate for other friends.

I guess I start filing some issues on the site and see it improve quickly to a really nice community website. Social NetBeaning.

Iwan

Tuesday, December 04, 2007

NB 6 was released, I almost went back to RC2... really.

Hi,

As you know, NetBeans 6 has been officially released yesterday, and as a true NetCAT member I was feeling rather proud because I was an active member of the team that used NB6 in it's final stages before going gold.
So I downloaded it and installed the real deal, and fired it up and rediscovered my JavaME emulators and opened my projects. And than it struck me, it was really the same thing. Not noticeably faster than RC2, not slower. Same colors everywhere. Just the same.
So I started up my project, deployment to Glassfish, the same instance I had used throughout the NetCAT period and guess what. Nothing happened but a big fat stacktrace in my OUTPUT window, in NetBeans. Referring me to the server logs, which didn't say anything more than that the app server was running fine. Yipes! That's not good.
Quickly firing up RC2 and trying the same thing, and it all ran fine. Double Yipes! That's really not good at all.

So I was thinking: Do I go back to Rc2 and work with that version, waiting for the first service pack, or uninstall everything, including Glassfish and Tomcat and reinstall NB6 and try it all again. I opted for the latter and fortunately, all is working fine now.

And guess what; it is really as good if not better than Rc2.

Iwan

Friday, November 30, 2007

My NetBeans, or your NetBeans?

Hi,

Dit you already register on My.NetBeans.org? A new social networking site specifically for the NetBeans community (disclaimer: this is my own definition of the site, not reflecting anything officially stated). Anyway, I did register as soon as I got onto the site. It, by the way, looks really good. I like the fading effects.

The only thing I don't like at the moment is the fact that it doesn't log me in automatically. I keep on clicking links having to login first before it does something. But hey, it's only a beta.

I am missing the contact option to add my share.java.net collaboration account next to my Skype and MSN to be contacted. And than have it integrated with NB Collaboration to see who is developing in NetBeans while I am surfing. Something like Xbox Live integrated with MSN and Windows Media Center. But hey, it's only the first incarnation.

Anyway, it's a great addition to the NB universe and definitely worth my while... eventually I think.

Iwan

Monday, November 26, 2007

NB 6.0 RC2, Getting there... but still WS code generation issues.

Hi,

Recently I blogged about the RC1 of NetBeans I installed and the good and bad of the first release candidate. of NetBeans 6.0. One of the major upgrades of NetBeans since about ever.

I installed RC2 last week right after it came out and started testing the major bug I was experiencing, WS client generation for mobile applications. And the bug I'd found was solved, and I was very happy about that. Although it got a bit of a disappointment not long after this 'Yippie' feeling. Issue 122702 is the new code generation problem around the block when it comes to generating code for mobiles to connect to a WS. The problem is that when a class of my own is the type of a field of another class of my own and that second class is produced or consumed by a WS operation, the code for that class is not generated by NB, at least not by either RC1 or RC2. The class that should be generated is fairly simple to create myself, but that is mainly because it is a simple class, well at least the one I created for this issue. Mobility and WS support are definitely an area not yet much treaded.
There's another issue I have with the whole WS connectivity code generation issue, which is that NB generates code that already exists. So it doesn't have to generate the code at all. From a compatibility concern between WS server and WS client, I use exactly the same code on both ends. Therefore I have a mobile-library project setup that is used by my JavaME project as well as my JavaEE project. In this library all classes are defined that are used in the WS communication layer, thus ensuring that the phone sends across data that can be handled by the server and vice versa. This is probably not necessary, but has saved me loads of headaches, since I am now confident that I only send data across that can be handled by both ends. No classes that are too advanced for JavaME so to speak. All classes are there, but NB refuses to use them and generates classes of its own and uses them.

The interesting part here is that when generating a mobile client to web application, the package hierarchy as well as the classnames generated are the same as those found in my web application, i.e. the shared library mentioned above, so I can just delete these generated versions of my classes and use the right classes instead.
When generating a mobile WS client, the package hierarchy and the class names differ. Which makes it harder to replace the generated classes with my own created classes. Really mind boggling is the fact that the standard naming convention 'MyClass' is donned for 'myClass', which looks exactly like the field naming convention utilized by most developers I know.

But mind, I didn't get any exception pop-ups at all since installing RC2, the IDE is rather responsive, more than RC1 I think. And overall it is becoming a solid product, at least from my point of view. Me being a developer working on a mobile massive multi-user online realtime strategy game (MMMORSG).

Iwan

Tuesday, November 20, 2007

NB 6.0 RC1, more thoughts... some bad ones

... well, for starters I want to just say that the latest bug I found in the code generation of WS support in JavaME projects was fixed, almost immediately after filing it. Let me put it this way, if NB would be in constant beta, in constant NetCAT, I would download the latest dev build every day, use it, report the bugs and continue working with fixes the next day... but that would prevent the team from adding big new awesome features. So I am glad the NetCAT is only at the end of each release cycle and it is to improve the final version's quality.

So what have I been doing lately, to be honest not much. Why? Because the latest dev build of NB screwed up my build files, the build-impl.xml files to be accurate. After installing the build fixing my WS issues, I got build issues in the 'jax-ws.xml' file and the build-impl.xml file.
I think I will file a P1 bug on this, since I don't like tools to just go and 'fix' my files and render them useless without a backup anywhere. In fact the much lauded 'local history' feature is not helping here either, since probably it will only keep track of local history of those files I am editing myself.

Going back to RC1 didn't fix the problem... not immediately. I had to throw away my build-impl.xml and my jax-ws.xml files and have NB regenerate them, after that it all worked again.
B.t.w., I tested the fix by running my JavaEE project in RC1 and generate the WS code in the fixed build referring to the WSDL in the application started in the RC1 started instance of Glassfish.

I found another bug there though, some of the code that was to be generated, didn't generate at all. Weird considering the code, but still not good. So I need to check whether it is my code and otherwise report a bug, once again. With full faith in the NB development team. Sofar, they haven't let me down one bit.

Iwan

Iwan

Friday, November 16, 2007

NB 6.0 RC1, my thoughts sofar

Hi,

It has been a while since I last blogged about NB 6. And for good reason since I used it instead of blogging about it. Which to my defense, means that it was a joy to use NB and our game has progressed considerably.

I had a few problems with the code generation for WS support in mobiles, but these were all fixed within a day. Although today I found another code generation problem in NB 6, but that will probably be fixed soon as well.

A few days ago they released the real RC1 and I installed it as soon as I got my hands on it. Luckily for me, one of the dev builds I was relying on, was already dubbed RC1 and thus I had all the customary folders setup already (/.netbeans/RC1) which was a timesaver, although moving the relevant files and folders from one version to another is a breeze nowadays. The RC1 is really stable and apart from a firewall problem I didn't encounter any serious issues, and to be honest, the firewall problem wasn't a NetBeans issue rather a Java issue. I had to remove all Java.EXE lines in the firewall rules of Symantec and have new rules applied and than open everything up for Java.EXE in Symantec in order to get the Update Centers back to work and more importantly the Collaboration stuff (Why isn't Collaboration not a part of the standard distro?) Because we develop the game while sitting at different locations, Collaboration is a major means of discussing our progress.
The SQE plugins (Findbugs and friends) are back in my installation as well, as they are so cool and great to use.

But back to NB 6 RC1. The major gripe I and others have are erroneous error-badges. I can't care that much about it, but a friend of mine considers this a really bad thing. Might be that he's got less confidence in his coding skills and thinks that when NB thinks something's wrong, it must be although he thinks all is fine :)
The rest is going really smoothly, loading is really fast, unless you have a lot of projects that need to be opened, than it can take for ages. Maybe NB could track the projects I really work on and open them eagerly and the others lazy? The same might apply for plugins. Those I use regularly should be opened right away, those I don't should be loaded lazily. If possible. Still RC1 loads faster than previous builds I feel.

All in all, it's getting there and the level of quality is great, especially since it feels like about all addon packs are updated and better integrated as well. Still some open issues that I would like to see fixed. Maybe those that are more irritating to newbies should be fixed asap in the first few weeks after the release of NB6.

Iwan

Wednesday, October 17, 2007

Three weeks of NetCAT 60 - Back in the saddle

Yes, it has been a while and I am actually longer than just 3 weeks member of NetCAT 60. But last week I was on vacation in Oman, scuba diving all week long. Believe it or not, I haven't thought about NetBeans during that week for a single time.

Now that I am back I've installed the dev build of last Monday. In my mailbox I found some notifications from Issuezilla that some UML bugs where fixed and I was kindly asked to retest. Which I am planning to do asap.
In the meantime, there are some WS-Client bugs that I encountered and am hoping that they were fixed as well. So that is something for me to find out as well. And if not fixed I need to bug a few people, because I need that WS-Client support stuff in NB. That is in fact one of the biggest problems I have with NetBeans; I have no clue as to what I am doing anymore, since NetBeans does it all for me. Creation of a WSDL? No idea as to how to do this. What makes a class a webservice? No idea, because NetBeans just does this for me. And more of the same in all areas. Wouldn't it be nice if there was somekind of 'stupid-mode' in NetBeans, that when you turn it on, NetBeans wouldn't help you at all but for syntax highlighting and compilation and stuff, but none of the code would be generated anymore. Than once you got the stuff done yourself, it would switch to smart-mode again, and you would never have to worry about that generic boiler plating anymore.

Anyway, I installed the dev build of last Monday, and my project didn't build anymore. Something to do with 'build.classes.dir.real' not being defined. This might be due to something I did myself, since I had been experimenting with some stuff related to WS-Client. So I won't report it. A revert to something in SVN fixed the problem, so I am back on track.

Iwan

Tuesday, October 02, 2007

Two weeks of beta1 - Let's get started with the dev builds

So I've now been working with the NB 6 releases beta1 and after, after here being the dev build of last week Monday. My strategy here is to install on Monday the latest dev build I can download and use it for a week, not installing any newer builds unless there's a bug that is holding me up. Sofar, I have one bug that is keeping me from progressing on developing my game and sofar it hasn't been resolved. Unfortunately.

Yesterday I installed the latest dev build, so now it is time to start raving and ranting on last week's Monday dev build. And let me put it this way, NB is really good and shaping up.

So just to re-iterate, what is that bug that is preventing me from developing the greatest mobile game ever produced? WS Client support on J2ME. And with the build of last week, that wasn't resolved. Since I filed a bug, I am waiting for that 'RESOLVED' message out of Issuezilla, which I didn't get yet. But in the meantime I started on developing the second incarnation of our Pong based game, called Mong, from scratch and I noticed some back-end functionality missing in our multi-player strategy game that I need to put in.

So what else is going on? SQE is back in the picture, as the SQE AUC was updated. And gosh, do I have a lot of bugs to be found in my code. Thanks to the modules in the SQE they're all visible now. Hmmm, I guess I should be happy about this. The good thing about something like SQE is that you get good quality plugins with one go, and you don't have to worry, in theory, that you are compromising your IDE.
Something that I really don't like, is the fact that when you have some (possibly crippled) JavaDoc on for example a method, than you need to fix it one step at a time. There's no such thing as 'fix JavaDoc' for crippled or incomplete JavaDoc. Guess the NB developers develop their code by starting of with the JavaDoc and then implement what was documented. Probably the way it should be done... Something I just came across is the lack of something called 'Get JavaDoc from overridden method', which would copy the JavaDoc from the method that I am overriding. In fact, the overriding method should always comply with the documentation of the overridden method, since it is just an alternative implementation of the same functionality. Purity over all.

In last week's status update from Jiri, he mentioned that there was suspiciously little email traffic on the J2ME stuff in NB 6... well Jiri, you have to blame the Mobility guys, since they're doing a great job. Really! I still have to use the databinding they came up with and the game-editor features. Time is here the bottleneck, anybody found a way to cram more than 24 hours in a day?

The coming week is going to be slow, I have to finish some stuff at a customer of mine, I need to do my Q3 taxes, but most important of all. I need to prepare for my trip to Oman. A week of scuba diving it is. I just hope that it doesn't mean that I will be kicked of the NetCAT team because of this.

Iwan

PS: Last week I got some really excellent feedback on my blogs. For one, I was told how to get the libraries from one project to another, and secondly the SQE AUC is fixed and now I got those excellent tools back in NB. Thanks to you all.

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.

Iwan

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.

Iwan