Friday 21 November 2008

The New One - 6.5

The latest version is out already. 6.5 
What impressed me the most? The Early Access of the Python editor of course - I expected it for some time. The best part is that the underlying Jython runtime isn't obligatory for you. Just choose from the menu Tools > Python Platforms and you may define whatever platform you use on your own. It doesn't matter if it's the official CPython distribution installed localy or the Portable version from your USB drive, or else.
Still hadn't enogh time to dig in the IDE, but the first impression while creating new project and coding some lines is that it really feels better and lighter than the 6.1 version. 
And what's more, it behaves quite nice on a USB drive - adjusted properly NetBeans can be a beautiful portable application (despite that it is expectedly much slower compared to a desktop install).
Now I can't wait to try develop a Django web application with MySQL or PostgreSQL back end managed by the IDE. I know NetBeans is already mature enogh for that development task.

Sunday 13 April 2008

Portable NetBeans - part II

Of course just placing NetBeans on USB drive and running it from there doesn't make it really portable. Why?
As most of the serious contemporary applications the IDE uses some deal of system awareness. That means it not only scans the host system (during installation) for where your Java is but it also takes account on the user's home directory, where the service information have to be stored.
So when the installer is started, if you monitor the contents of your user's directory in Windows, you'll see a new one created - '.nbi'. It stores the logs and configurations that let the installer, when started again, know what exactly have been installed on the previous occasions(s). That's not bad at all. On one hand you have a host environment that may serve you as a dock for your portable IDE. But on the other, it restricts the portability. This folder may be moved on the USB drive, but NetBeans installer will still search for it in the current user's home directory. That's not a catastrophe so far - you successfully installed the IDE already and most probably it won't happen again up till the next version.
Anyway, another and more important directory is created into the user's home the first time NetBeans is started - '.netbeans'. This is the actual configuration center for the IDE - updates are downloaded here, the current state of the application is preserved here, etc. In time this folder may become quite big in size. What's worse - this directory could leave a trace of your presence on the host system! Oops! That would be so unportable.
I feared so, that's why I made a test. I ran the IDE on a fellow's laptop. Before that I had been moved the '.netbeans' folder in a place such as 'X:\tools\netbeans\conf' on my USB memory. When started the update center I expected the '.netbeans' folder to be regenerated into the user's home. Nothing like this. I installed a module and the trace for this was written exactly where it had to be - in '
X:\tools\netbeans\conf\.netbeans\6.1\update-tracking' and the module was downloaded into 'X:\tools\netbeans\conf\.netbeans\6.1\modules'. It is still a mystery to me how this happened, because it is dumb to believe that things happen this way. On a second try it didn't work. Of course.
So, what is the right way? Well, I just opened the right file: 'X:\PortableApps\NetBeans 6.1\etc\netbeans.conf' and provided the correct value to the
netbeans_default_userdir variable on the second line:
netbeans_default_userdir="X:/tools/netbeans/conf/.netbeans/6.1"

Now with everything in place NetBeans starts and updates very portably.
Yet another 'prankster' always appears during the NetBeans startup - the '.netbeans-registration' directory. It regenerates anytime, anywhere. And always leaves a trace. It isn't much - just a small XML status file, but this is a trace after all. I don't mind to register my IDE, but no more than once is appropriate, I think.

Well, all these 'hacks' are just on the go. We can hardly ever expect an official version of Portable NetBeans from the community or SUN. If you're smart enough (and I bet you are) and you chase the Portable conditions then the sky is the limit, like they say. Not only the IDE but the Java itself can alway be made thinner and slimmer and encapsulated. It is only a matter of little effort and plenty of free time. And of course limitless imagination.

Thursday 10 April 2008

NetBeans 6.1 & MySQL

As we all know few months ago SUN Microsystems acquired MySQL AB - the vendor of (still) the most popular open source database server. Did this make an impact on the SUN's preferred JAVA IDE? Well the answer is easily noticeable when comparing the 6.0 and the 6.1 (still Beta and still evaluating) versions. In the 'Services' tab of the IDE there's always been a 'Databases' node introducing set of supported JDBC drivers and predefined connections. Since JAVA 6 (and consequently NetBeans 6.0) the JavaDB (also known as Apache-Derby) was presented and strongly supported with its Embedded and Network drivers. Defining connections through drivers for MySQL and PostgreSQL database servers was also supported.
Now in the 6.1 version we see much stronger support for JavaDB and MySQL. They're separated in their own database nodes, which has enhanced controls over the server management and properties.


The extended administration support lets you redefine the default start and stop commands for the server with custom arguments. Once defined the right way those commands are available in the MySQL node's context menu.
It also makes possible in the 'Admin Properties' to choose any MySQL aware application as additional administration tool - not only the vendor's applications from the GUI tools package, but really any Windows application.


Once connected to a Schema on the MySQL server, you may expand the connection icon and three folders are available, for the three major database objects supported by MySQL - Tables, Views and Procedures.
NetBeans is a powerful database editor, supporting creation and management of databases and their objects by comfortable specialized dialogs or just by executing SQL scripts in the code editor.
Quick table creation is available through this dialog:


It looks easy and really is. If this is not sophisticated enough for you, just choose 'Execute command ...' option from the context menu. A text editing window opens, where you can describe in SQL any table structure you like.
Maybe the most advanced feature is the 'Design Query ...' window (available in the context menu of the table's columns. Its visual approach makes creating complex queries more intuitive and fast.


In the end it might be stated that creating Java database-driven applications with MySQL back-end have always been non-trivial task, involving different tools. Applications for database administration and query design; for schema design and entity relationship management. Let's not forget the IDE for code creation. Now with the 6.1 version of NetBeans the control shifts toward one single tool - the IDE itself. This could help the developer be more focused and shorten the completion time for their project, no matter if it is in Java, Ruby or C++.
I think this is a good start and in the future versions the MySQL support and database support as a whole will be enhanced further. With such excellent UML designer one might expect that ERD for databases will also be supported.
So whatever course might be taken from now on in the MySQL-NetBeans community, the results will be expected with great impatience from me. Good Luck!

Saturday 22 March 2008

Portable NetBeans

The hype of portability is still fresh and as the pile of available applications grows bigger and bigger providing you with a digital personality on an USB disk just in your pocket, a question arises:
"If I can carry anywhere my own browser, my office suite and my data, is it possible to make my flash drive a development environment?"
Of course you can. It is extremely easy. There are some limitations, mostly concerning performance (the transfer speed of a flash memory sometimes is an issue) or system privileges on public computers, but such obstacles are negligible.


In case your favorite development tool is NetBeans and you still haven't figured out how to put it on your portable disk, read on. For the environment will be needed at least 1 GB big drive for a standard installation. Two downloads are required - the latest JDK and the latest NetBeans IDE.

1. Prepare the environment
There are two ways to make the standard Java Development Kit from SUN Microsystems (the latest version as of the time of writing is JDK 1.6.0 Update 3) available from the portable device - to copy it from installation directory or to make a fresh install. Both cases are equally easy:
  • Copying the JDK folder (usually stored on C:\Program Files\Java\ in Windows) somewhere on the USB file system takes only minute or two. Of course, if there are defined some system variables (such as JAVA_HOME, JRE_HOME, etc.) they won't be useful anymore (on other PC).
  • Installing the development kit from scratch is a good decision. Just point the installer a path on your USB ('X:\tools\' for example).
All additional packages you might use (JavaDB, SwingX, etc.) can be installed the same way.

2. The IDE
The latest stable version of NetBeans is 6.0.1 and there is a Beta 1 version available for testing of the newest release 6.1. We'll point out some of the cool new features of the IDE a bit later. As for the installation - there is no difference which version you choose. From version 6 NetBeans has very nice and comfortable new installer. Customizing what to have in the IDE is a matter of personal choice and needs. If you bought a fast drive with good access speed, then you might try to install even the application server (Glassfish) an run it from the USB (with the quite bearable maximum of 480 Mbit/s for the hi-speed mode of the 2.0 standard). That would be quite an adventure on a bit older architecture - the 1.1 USB standard provides up to 12 Mbit/s speeds.
Anyway, running portable NetBeans on top of portable Java (even the fast 1.6 version) will generally appear slower than the natively installed ones on the host system. But actually that's the worst news about this (may I call it) portable platform. Portability itself is an enormous advantage.
So let's go through the installer of the latest beta version - I'll use the variant with all packs.
The first page of the wizard gives you the opportunity to customize your IDE. Let's see what's in there:
  • Base IDE (requires 58.3 MB) - only this choice isn't really optional. This is the absolute minimum installation and actually it is the platform.
  • Java SE (takes up to 112.6 MB) - this is the essence of the standard Java IDE.
  • Web and Java EE (takes up to 214.5 MB - it requires not only the Base IDE but also the Java SE module) - this module completes NetBeans as an Enterprise Java development tool.
  • Mobility (takes up to 209.5 MB - it also requires the Java SE module) - this module contains the Wireless tollkits of the mobile edition of Java.
  • UML (takes up to 147.6 MB - it also requires the Java SE module) - this module makes NetBeans very powerful application for UML modeling and reverse engineering of source code.
  • SOA (it requires the large amount of 339.7 MB because it depends not only on the Web & Java EE package but also on the both GlassFish end OpenESB runtimes) - the addition for Service Oriented Architecture is an extension of the Web & Enterprise edition of Java.
  • Ruby (occupies 90.2 MB) - a module that gives the Ruby developers a powerful tool for their needs.
  • C/C++ (fills 69.9 MB on the drive) - this module makes the IDE suitable for programming in the powerful languages from the C family. But it does not include the compilers, linkers, etc. - you still have to install your preferred ones on your own as is explained here.
There are three additional runtimes that are a must for some of the development purposes. They might be installed on their own and don't need the Base IDE package:
  • GalssFish V2 UR1 (requires 83.5 MB) - the Open Source variant of the SUN Microsystem's application server (the former SUN Application Server).
  • Apache Tomcat 6.0.16 (a thin application server that takes only 10.4 MB on the drive) - a lightweight web application server from the Apache Software Foundation.
  • Open ESB V2 Preview 4 (takes up to 101.9 MB) - only this runtime cannot be installed on its own because it runs in the context of the GlassFish application server. This is an implementation of an architecture for easier web services integration.
As you may noticed there can be installed several different development environments for various needs. There are Java and Java Web/Enterprise IDE, IDE for mobile Java development, application for UML modelling, Ruby IDE and C/C++ IDE.
A full installation requires about 530 MB and that's without the JDK.
If you choose to install everything after you accept the terms of the License Agreement three screens follow that let you:
  • Provide folder where the application will be installed (that should be on your portable drive) and the folder where the Java Runtime is (where we put it on the previous step).
  • Provide the information for the installation of the GlassFish application server - folder, administrative account, etc.
  • Provide folder where the Apache Tomcat server you want to be installed.
A confirmation page with choices made and Install button follows. Just press it and few minutes later you'll be able to import your projects and libraries and start code on whatever Windows system chance takes you.

Tuesday 19 February 2008

At last iReport for/in NetBeans!

Two of my favorite Open Source projects finally met.
Few years ago JasperReports became de facto number one open source reports engine according to its popularity. Of course JarperReports wouldn't get such wide-spread acceptance without the
graphical designer iReport (an independent project at first; later they became one joined by JasperSoft). Although a powerful tool for quickly setting professionally looking reports, iReport lacked some robustness in the user interface. Sometimes using it for few hours, building heavy reports with lots of fields, text boxes, etc. made it slow and even unresponsive. As we can see now a decision for that issue had been sought. And what is better than a proven IDE platform?
The guys from JasperForge have been playing around with the most popular IDE platforms (at least for two I know - eclipse and NetBeans) and made a choice. Now there are plug-ins for the both of the platforms (the one for eclipse was the first one and instructions for installing it in the eclipse IDE are packed within the installation bundle). Nevertheless the final decision
was in favor of NetBeans. Not only there is a plug-in (an NBM file) for the platform, and not only there is a preview version of iReport built upon the platform, but there is the road-map.
It says that the project is moving completely. Two or three weeks ago JasperSoft were the presented featured partner on the NetBeans site.

The wait still continues. The new project is in a little more than a preview state. It is stable enough and reports can be made easily (the NetBeans style - something a bit odd for people who are used to iReport's way of doing things) but still there are some important functionalities that are missing (the chart tool for example). The current version is 0.9 and they promise that in the summer there gonna be a rejoin between the version numbers (now the old-fashioned iReport's version replies to the JasperReport's one).

So, big thumbs up for that pleasant and powerful union and hope the result will deserve the applause.

Thursday 24 January 2008

NetBeans - the best IDE around!

My favourite IDE (Integrated Development Environment) ever is NetBeans.
This blog will give many answers to the question "Why?".

Soon the fun will begin ;)