Adam Bien's Weblog

Wednesday Jan 27, 2010

JDeveloper vs. NetBeans - The Poll Results

The results are amazing: 434 (NetBeans) vs. 18 (JDeveloper). JDeveloper comes with some interesting stuff - it would be a nice extension of NetBeans. The integration wouldn't be that hard - both IDEs are Swing based...


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Sunday Jan 10, 2010

NetBeans Is Very Poplular In Germany - Only 4 % Behind Eclipse

JavaMagazin's (one of the largest / the largest German Java magazine) quickvote is closed. The results are interesting:

  1. Eclipse - 44%
  2. NetBeans - 40%
  3. IntelliJ IDEA - 14%
  4. others - 2 %

Total votes: 2108
JavaMagazin covers a lot of Eclipse stuff. They also publish a dedicated Eclipse Magazin - so the result is really interesting. Btw. the "others" are: JDeveloper, WAS, Notepad, Emacs etc :-).


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Saturday Jan 09, 2010

A Good 12 Minutes, NetBeans 6.8 Editor Screencast

This screencast presents some NetBeans 6.8 editor features. Especially the beginning is interesting and comes with some non-obvious stuff. The mouse, however, was used too much. Sometimes even the keyboard :-). Some remarks:

  1. You can use ctrl+space for the variable name suggestion. It is derived from the type. In case of a BufferedReader NetBeans would suggest br, bufferedReader and reader.
  2. Alt+Enter can be used to auto-correct stuff (quick hint / ctrl+1 in eclipse). You don't have to click on the light bulb.
  3. You can move and copy code blocks around without using the mouse with: shift+cmd+ (arrow up || arrow down) for copying, and shift+ctrl+(arrow up || arrow down) on Mac OS X - similar key binding exist on other platforms as well
  4. You will find most important shortcuts in a PDF Menu -> Help -> Keyboard Shortcuts Card

It would be great to have a "show editing" screencast, in which an engineer shows whats possible in NetBeans. "No Mouse Speed Editing" :-)


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Wednesday Dec 23, 2009

Five Features That Make NetBeans 6.8 My IDE of Choice

  1. Out-of-the-box experience: with a single download, you get not only the IDE with all useful plugins, but also an application server (Glassfish v3) and an integrated database (Derby DB). The whole procedure takes few minutes and is dead simple. The only thing what can go wrong is installing the application server (Glassfish) to a directory, which contains spaces in its name on Windows. The Java package (is actually Java EE) is 146 MB for Mac OSX, but the feature list is impressive: profiler, debugger, SQL / DB explorer, JSF 2.0 editor with (CDI / EJB 3 databinding) auto-completion, sub second incremental deployment (=deploy on save), maven, ANT, Hudson, JIRA, SVN, mercurial support, HTML editor, nice Swing WYSIWYG editor, JSR-311 (REST), JSR-181 (SOAP) support. I used the "Java" package also in many workshops - the attendees were able to install the whole infrastructure in few minutes. If it took significantly longer - it was always the fault of the virus scanner.
  2. Responsiveness / Performance: NetBeans 6.8 performance gets better and better with every release. NetBeans even monitors itself in the pre-releases and encourages you to report any "slowness". I'm actually using two bundles/installations for my daily work: Java FX and Java (EE). I tried the Java SE bundle with the size of 45 MB once, but didn't encounter any performance difference to the Java EE bundle. The only reason for having this two installations is the independent lifecycle. I'm often working with daily builds. Why? Because they are stable and the installation is very simple... You can just redeploy e.g. a Session Bean in few milliseconds, just by saving it. I'm also using Eclipse, where my clients are forcing me to do so. The max number of different Eclipse installations was 35. The irony here: Eclipse wasn't able to handle the different plugins (e.g. try to install myeclipse, then something else) in different versions at the same time. But exactly this should be solved by OSGi :-). 
  3. It Is Primarily An IDE: although NetBeans is built on top of a RCP platform - it is primarily an IDE. The plugins are seamlessly integrated and work fine together. The reason: the plugins are developed by one benevolent dictator. The modularization is not the goal,  the real goal is the developer experience. The IDE feels and looks simple. The menu structure, inline - wizards work well together. The best of all: you can get entirely rid off wizards and achieve everything in the editor. It is enough to know the following shortcuts to develop a simple Java EE 6 application: ctrl+space, ctrl+i (alt+insert on windows), and alt+enter. The documentation is also superb. You will not only find several tutorials for a given topic, but even some screencasts
  4. Cutting edge / innovation: Java EE 6, Wicket, Maven, Java 5, various application servers were supported from the beginning. E.g. NetBeans 6.8 supported JSF 2.0 before its release. Not everything made into more than one release, but was a nice inspiration. Project Jackpot (AST transformations - interesting for automatic API alignments), Meta Data Repository (MDR) - was one of the first MOF implementations. MDR was capable to perform model to model transformations and code generation. Both subprojects died. If you really need a decent MDSD environment - look at EMF in eclipse land or JetBrains MPS. Here eclipse still shines. JSF Visual Web Pack was one of the first (the first?) WYSIWYG editor for JSF. It was killed by JSF 2.0 and facelets in particular.
  5. Standards / Compatibility / Pragmatism: NetBeans relies on (JCP) standards and uses natively ANT (JDK) or Maven for the code compilation. Although NetBeans compiler is also incremental - at the end everything gets compiled by standard JDK-compiler. I had some trouble with eclipse compiler in the past - it (mistakenly) compiled everything - also wrong generics code - CI (hudson and cruise control) complained later. We spent several hours / few days to find and fix the problem. I never had similar problems with NetBeans. NetBeans runs on plain JDK, is Swing based with very good Swing / Java FX support.  Swing WYSIWYG editor comes out-of-the-box - there are not additional plugins needed. If you are running JDK 1.6 - you have already VisualVM installed. VisualVM is actually the (RCP) core of NetBeans with its profiler. NetBeans also supports a two way Eclipse import / export - what is often used in projects, were developers are forced to use Eclipse :-).
  6. (Look and Feel): NetBeans looks very nice on Mac OS X. I'm using NetBeans intensively since the version 5.5 - so before it actually looked as good as it looks today. It isn't the main reason, why I'm using it. However it looks and feels better than Eclipse on Mac OS X - and far better than IntelliJ. In fact I used the IntelliJ 9 opensource builds and thought they were actually broken. To be clear: IntelliJ is still superb in respect to Java EE 6 features (like ejb-jar.xml support, better JPA QL etc.). NetBeans designers try to improve little things like icons, splash screens, look and feels continually. Because NetBeans is based on Swing, you can use as many L&Fs as you like (see some screenshots here).
It is not only my perception - NetBeans is gaining significant momentum (at least in Germany) - see this results of this quickvote (only 5% behind eclipse and far ahead IntelliJ). NetBeans is like Mac or openBSD...


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Sunday Dec 20, 2009

Why You Should File Bugs - The NetBeans Case

I used the various milestones, the beta and some daily builds of NetBeans 6.8 for my Java EE 6 projects. Sometimes NetBeans detected "slowness" (by e.g. opening 40 projects, or switching between project groups) and encouraged me to report it - what I actually did. It was more a revenge, than a goodwill :-). The first reports were anonymous, than I created an account to be able to track the progress.

With the release of NetBeans 6.8 a nice email arrived in my mailbox:

"...In the past you have taken the time to report issues that you encountered while using NetBeans software. A new version (NetBeans 6.8) has just been released,and we'd like to inform you that the following issue(s) you reported have been addressed in the new release:

170419Invoking Run took 29110 ms.
171690Invoking Close Project took 4127 ms.
171756IllegalStateException: Adding stacktrace with timestamp 4999072337859 is not allowed after a stacktrace with timestamp 4999072745299 has been added
172057AWT thread blocked for 23711 ms.
174278AWT thread blocked for 5513 ms.

Please visit the netbeans.org website to download NetBeans 6.8 and to learn more about the new release.

We appreciate your contribution to our efforts to make NetBeans software and features better for all users. And as always, we look forward to feedback from you about ways we can continue to improve.

 

Thank you.

The NetBeans Team

It seems like some of the issues were actually fixed. The FCS is indeed significantly faster, that the pre-release builds.

The NetBeans issue tracking tool really rocks. You get immediate feedback whether it is a new bug, a known one or what the resolution is ...without leaving the IDE.


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Saturday Dec 12, 2009

NetBeans Is Doing Well In The IDEs QuickVote

In the JavaMagazin's poll "What's Your Favorite IDE?" NetBeans is doing very well

The intermediary result at 11.12.2009 9 pm is: Eclipse 50%, NetBeans 34 %, IntelliJ 14 %, others (like RAD, JDeveloper, vi, emacs and notepad :-))  2%. 1k votes so far.

The poll is still open - vote


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Wednesday Dec 02, 2009

NetBeans 6.8 RC1 - Useful Improvements, New REST Wizard, @Inject available

 First day with NetBeans 6.8 RC 1 and:

  1. The maven project icons are dependent on the maven project type - EJB, EAR, WAR, JAR etc. This helps you to recognize the type already in the "Projects" tab.
  2. New REST wizard: asks you whether you would like to provide your own Application subclass, generate one (default), or enhance the web.xml (the old Java EE 5 way). The REST-Jars, however, are still copied to GF v3, what is actually not needed. You can safely exclude it from the packaging. Then the WAR with EJBs + REST will be rather small (8 kB in my case).
  3. The performance / responsiveness are good - slightly better, than NetBeans 6.8 beta
  4. and the new splash screen looks nice :-)


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Thursday Oct 29, 2009

Two Amazing NetBeans 6.8Beta Features

1. NetBeans 6.8Beta generates Unit-Tests for EJB 3.1 with Embeddable Container code. It looks like:

    @Test

    public void testHello() throws Exception {

        System.out.println("hello");

        HelloService instance = (HelloService)javax.ejb.embeddable.EJBContainer.createEJBContainer().getContext().lookup("java:global/classes/HelloService");

        String expResult = "";

        String result = instance.hello();

        assertEquals(expResult, result);

        // TODO review the generated test code and remove the default call to fail.

        fail("The test case is a prototype.");

    }

This is a nice feature: you don't have to look-up the JNDI-name...

2. NetBeans is capable to auto-complete a bound item in the data table:

                <h:dataTable id="hugo" value="#{newTweet.messages}" var="message">

                    <h:column>

                        <h:outputText value="#{message.content}"/>  //the auto-completion works here!

                    </h:column>

                </h:dataTable>

I tested NetBeans 6.8Beta in the last few days. It is stable, fast and especially interesting for Java EE 6 projects... Especially EJB 3.1 / JPA 2.0 support and JSF 2.0 editor were improved significantly.... 


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Saturday Oct 10, 2009

NetBeans 6.8 m2 - Some Cool + Lightweight Java EE 6 Stuff

NetBeans 6.8m2 is already surprisingly stable. I used the development build of NetBeans 6.8 in a workshop last week and it worked without major problems on different operating systems. Major features are:

  1. NetBeans 6.8m2 comes with Glassfish v3 b66 and so with already well integrated, embedded EJB 3.1 container. See working sample.
  2. The JSF 2.0 editor does support code completion and JavaDoc for JSF tags as well as auto-completion for managed bean value-binding. So you can navigate in the expression from a managed bean, into a session bean and even bind JPA 2.0 entities directly to the UI-elements.
  3. You can create page flows with the JSF 2.0 flow editor. It will create the faces-config.xml for you. In JSF 2 you don't have to -> you can use annotations as well.
  4. JPA 2.0 + Bean Validation are supported and already integrated with JSF 2.0. It means: it is enough to annotate an entity - the error will be displayed directly in the JSF 2 without any additional overhead (<h:messages/> is required). An example (LeanJSF2EJB31Component) was checked in into: http://kenai.com/projects/javaee-patterns/.
  5. Incremental deployment with Glassfish v3 b66 is extremely fast. It takes less than a second in general. Class, interface, method changes are immediately recognized and deployed. 
  6. The HttpSession is preserved during deployment. You don't even have to re-login after the deployment of your application.
  7. Java EE 6 is now supported in maven projects. You can create a Java EE 6 maven project from wizard.
  8. JIRA is directly supported for kenai.com. Additional plugins are no more needed.
You can actually develop a whole Java EE 6 application without any XML (no ejb-jar.xml, no application.xml no faces-config.xml) - except the persistence.xml.


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Friday Oct 02, 2009

JSF 2 + JPA 2 + EJB 3.1 Scaffolding With Netbeans 6.8 in 3 Steps - And The Code Is Even Usable

NetBeans 6.8 comes with a new wizard, which generates a JSF 2 application from an existing database using EJB 3.1 and JPA 2. The resulting code is even usable for real world projects. Also interesting: the generator templates can be easily edited directly from the wizard. This is a serious killer feature and really usable. You can apply the wizard to a Java EE 6 WAR project and deploy it to Glassfish v3. For this purpose:

  1. Create a new WAR application and choose Glassfish v3, Java EE 6 and add JSF 2 as a framework.
  2. Right mouse click on the WAR and choose: "Entity Classes From Database....", choose an existing DataSource, then a Table and don't forget to push the "Create Persistence Unit" button. The result: a JPA entity + persistence.xml.
  3. Right mouse click on the WAR and choose: "JSF Pages from Entity Classes..." and choose the even generated JPA entity. On the second page you can even customize the templates (just click on the link in the right bottom corner). This is really useful.
The resulting code is usable after some tweaks. I used this wizard to generate the code for yesterdays post "(JSF + JPA) - EJB = Bloat". You can also generate JPA controller code without EJB 3 from the context menu choosing "JPA Controller Classes From Entities...". This will, however, result in significantly more plumbing...


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Interviews/About
My Recent Book
Java One 2009
CommunityOne East N.Y.C
JavaONE 2008 Interview
Search
...the last 150 posts
...the last 10 comments
greenfire.dev.java.net
Links
my.netbeans.org
Visitors
License