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.
Ами честито! За новостите отвътре ще поговорим мако по-нататък.

Thursday 9 July 2009

NB 6.7 - следващата итерация

Ето, че повече от седмица измина откакто излезе новата версия (6.7) на любимото IDE и вече е време за малко впечатления. Не съм се ровил надълбоко, но новости могат да се открият и на повърхността - при изпълнение на тривиални задачи, като създаването на нов проект например.
Ще спомена само какво ми се наби на очи при бърз поглед върху средата.
При създаване на нов проект, първоначално всички категории са дезактивирани. Това означава, че преди не е работено по проект от тази категория и за да се активиря тя, просто се натиска бутона за следващата стъпка. Според мен това е новост свързана с платформата, която има общо с повишена ефективнаост при използване на паметта.
Друга видима разлика е вкарване на поддръжката на maven проектите в ядрото (вместо да се тегли като плъгин) , като заедно с това тук е разширен и списъка с категориите:

Още нещо, което от скоро е хит сред разработчиците в общността - Project KENAI. Това е поддържана от (все още) SUN Microsystems услуга за взаимопомощ между разработчици и подслоняване на проекти (друга аналогична инициатива е Google Code). Интеграцията с NetBeans прави използването на услугата естествена част от процеса на разработка. Може да се намери в собствено подменю в менюто "Team".
Трябва да се отбележи, че версия на средата за новата версия на JavaFX (1.2) ще се появи малко по-късно като добавка, поради закъснение при хората от JavaFX.
За сега толкова. В очакване на седмата версия, скоро може заедно да хвърлим едно око на платформата на IDE-то, като отворим капака и надзърнем в непрекъснато развиващото се API.

Tuesday 21 April 2009

Очи пълни с NetBeans

Всеки ден откривам нови малки нещица, които придават цвят и вкус на работата с любимото IDE. Например до сега не бях обърнал внимание на тази екстра, която дойде по Twitter. Екран на който няма нищо друго освен NetBeans. Може да е задушаващо за някои, но лично за мен е точно обратното. Често когато съм писaл код съм имал чувството, че екрана не ми стига и съм изпитвал неистово желание да увелича прозореца на редактора дори отвъд границите на екрана.
Е сега вече съм още малко по-близо до желаното.

Where do we go from here?

The biggest news of these days is the acquisition of SUN Microsystems by the ORACLE Corporation.
I felt a little chill creeping down my spine. I hope it's just from the colder weather today.
I hope for the best for NetBeans, but it all soon will be revealed.

And now for the homies:

Няма как да не сте чули вече новината - за добро или за зло Оракула вече ще се разпорежда с нашето IDE. Дано всички страхове да са само илюзорни.

Междувременно има и някои добри новини. Особено ако се интересувате от JavaFX. За българските почитатели на новата технология ще обърна внимание на това ново местенце в системата, където ще можете да научавате доста интересни нови трикове. Пожелавам успех на колегата и при възможност ще помагам ;)

Tuesday 7 April 2009

Know your IDE

So, the certification from SUN Microsystems is already here. And after you read the description and requirements it looks pretty clear that the CX-310-045 exam should be quite easy to take. A major point is that you are not required to have any of the other SUN certificates. That sounds convenient - if you are new to certifications it is just another fresh option for a start point. So far there were two entry points in SUN's Java certification program - you may start as Sun Certified Java Associate or Sun Certified Java Programmer. The first one (CX-310-019) isn't that important if you want to become Java developer, because it is more technology centric and not detailed in the language intricacies. The second example is more of a stack of related exams:
  1. CX-310-065 - the most actual exam. It concerns the latest version (6) of the Java language in production. If you want to be an edge-on-java-programmer, take this one.
  2. CX-310-066 - this is an upgrade. If you have already taken the one below, you don't need to struggle through the one above, so in your case, this is the case. Savvy? So this is not actually an intro exam, because you must already have taken an exam for Java Programmer for a previous version of the language.
  3. CX-310-055 - the same as #1, but for the previous (and still most used in production) version of the language (5). If you don't have a really good reason for the opposite, you'd better take the other one.
  4. CX-310-056 - the same as #2 but for Java 5. Here also the CX-310-066 is the preferable choice.
That was in a very tiny nutshell. And the most important - none of these is required for a NetBeans certification, but at least is desirable.

А сега и няколко думи на Български.
Накратко: SUN Microsistems измислиха още един начин да ни сертифицират - като ни тестват доколко познаваме любимата си среда за разработка, определена от тях като "официална" и разпространявана заедно с JDK-то. NetBeans отдавна узря достатъчно за подобна роля. Дотолкова, че от компанията майка решиха, че не е достатъчно да казваш, че разработваш на него ами и трябва да се фукаш пред работодателите, че си сертифициран за него. Защо ли обаче в България фирмите все още предпочитат предимно Eclipse? :)

Малко информация за напълно случайно попадналите тук:
SUN Microsystems (все още) е един от флагманите на разработването на софтуер с отворен код. В момента компанията поддържа един стек от осем такива продукта (няма как да не сте чували за поне един-два от тях) достъпни на сайта им:
  • Java - прочутият програмен език, претендиращ да работи навсякъде.
  • NetBeans - официалната среда за разработка на Java приложения, която далеч не се ограничава с Java.
  • GlassFish - приложният мрежов сървър на SUN, който все още не е достигнал популярността на Apache Tomcat и JBoss.
  • MySQL - най-популярната в света база данни с отворен код.
  • opensolaris - отвореният аналог на една от най-стабилните сървърни операционни системи в света (Solaris), насочена към разработчиците.
  • xVM (SUN VirtualBox) - машина за виртуализации (аналог на VMWare Player). Позволява изпробването на други операционни системи, сървъри за бази данни и т.н. без да се налага инсталирането им на локалната машина или рестартирането и.
  • OpenOffice.org - частична алтернатива на офис пакета на MicroSoft.
  • JavaFx - нова Java технология, аналогична на Adobe Flash и MicroSoft Silverlight. Java приложенията ще стават все по-шарени в своята интерактивност.