Wednesday 23 December 2009

One more cheatsheet

I just said few words about Dzone's cheat sheets regarding NetBeans in my last post and they came with a new one. This time the refcard numbered 80 tells in short about the NetBeans Platform. It briefs about the massive structure upon the IDE is built up and is suitable for constructing full-blown and feature rich desktop and client applications.

This matter is the foundation for building the IDE's plugins and modules. If you wonder what's the difference, the simplest explanation is that:
  • a plugin is the piece of software unit that can be uniformly added to the IDE in order to perform some specialized task. Depending on the task, the plugin might range in simplicity and size.
  • a module is an independent package of software that ties to the platform in such uniform way that makes it a separate software product. Modules might be targeted at enhancing the IDE's functionality or they just might run free ;)

This area sure is targeted at the hardcore developers and professionals, but some of the novices might also be interested what actually lies under the hood. Well done DZone!

Tuesday 15 December 2009

The cheat sheet

Do you know DZone? Of course you do! This gathering place for developers from all over that hosts the well-known RefCardz. And the newest one is a very relevant and on-time update of an older one. Generally a version is skipped and we have refcardz for NetBeans 6.1 and 6.8. This is not such a big deal since the most present is also the most relevant. And the most present is already here. Enjoy!

Monday 14 December 2009

NetBeans' native portability


I bring up the theme of portability once again, because of the last comment from this my post. Thanks on this Valery! I really missed this one before.
Let us start with the obvious - Java is by default a portable language. So any software written in it, if not making any assumptions for the host operating system or utilizing platform specific features, should without changes run anywhere. Although the NetBeans IDE is developed with several OSes in mind, it also has such platform-independent version:

As can be seen, the most complete bundle for the current version (6.8) lacks the JavaFX IDE and the application servers, but has everything else.

Download, unzip to the USB drive (lets say we have K:\netbeans folder as a result) and this is where the fun begins.
In the K:\netbeans\bin folder there are two files - a Windows executable, and a shell script for the UNIX family OSes. All is the way it should be.
Running the netbeans.exe on different PCs shows that the IDE feels pretty comfortable anywhere. It even isn't as slow as I expected! The only "drawback" is that it makes itself at home everywhere. This means that it scans the local $HOME directory and arranges its properties there. It even suggests you to import the setting of a previous version if such has existed on the machine. I'm still not sure how this gets along with installing your preferred plugins on the PC and then using them on another PC. But I wouldn't rely on such IDE scattered across several computers. I just would take the steps necessary to make it more portable. The step is generally one and it is toward editing the K:\netbeans\etc\netbeans.conf file. This configuration file is pretty self explanatory but lets take a look just in case.
The first property is netbeans_default_userdir. Its default value is "${HOME}/.netbeans/6.8". At first I replaced it with:
"${HOME}/.netbeans/6.8" -> "../.netbeans/6.8"
and ... nothing actually happened. In such cases running the executable makes things a bit more clear and ... it did:

It appears that the NetBeans IDE doesn't let you place its configuration and properties directory into its installation directory. That makes sense if think about it. So pick some place on your USB drive dedicated to configuration stuff and point to it in the netbeans.conf file. In the end I have my specific properties in K:\data\.netbeans\6.8 and it works fine with the property value set to:
netbeans_default_userdir="../../data/.netbeans/6.8"
The second property is netbeans_default_options. Its default value tunes up the JVM that runs the IDE with several parameters. They are not directly relevant to the portability. They are more of a performance tweaks.

All the other properties are commented, hence not taken into account by the IDE. Here's what they mean:
  • netbeans_jdkhome - this one is important and it should be uncommented in all cases where on the host OS there is no any Java installed. It also must be uncommented for the sake of portability. In my case I have this path K:\jdk\jdk1.6.0_16. I could put it in the K:\netbeans folder but I also use portable eclipse in some cases, so the JDK is kind of shared between the two IDEs (and any Java dependent software I decide to use on my USB drive in future). The value for the property becomes "../../jdk/jdk1.6.0_16" (that makes two folder up in the tree).
  • netbeans_extraclusters - this is related to modules that come separated from the official bundles. For example you've made your own C# editor on top of the NetBeans platform and you want to use it in your portable IDE. This is where you set the relationship between both.
Well, if I have some conclusion to make, it would be that if the intricacies of the host operating system are not concerned, the portability is only a matter of correctly setting the paths, whatever your portable media is.

So far we've exhausted the current portability issue, wright? Wrong! What about UNIX/Linux? And what about WINE? Soon.

Thursday 10 December 2009

Пак сме обновени

Преди около час NetBeans обявиха в Twitter (10.12.2009), че официалното издание на версия 6.8 вече е налично за сваляне.
Чудя се има ли връзка, между забавянето на 7-та версия с постоянно бавещата се също 7-ма версия на Java.
На официалния сайт са се постарали да представят новостите в средата чрез комплект от тематични видео-та, което би било интересно не само за начинаещите.
Това, което ми направи впечатление относно наличността на средата е, че вече не може да се поръча безплатното ДВД. Може да се свали ISO файла му, но той е все още за версия 6.7.1 - е явно не може всичко да се свърши наведнъж. Друг вариант е закупуването на въпросното през онлайн магазина на SUN срещу само $8.50.
Ами честито! За новостите отвътре ще поговорим мако по-нататък.