JavaFX Composer Out !

15 12 2009

I was not looking at JavaFX for a few months and the latest rumors on the potential death of the RIA product under the new owner did not make me spend time learning more, even I believe it might be the missing piece for some boring Java (Swing) enterprise applications. Yesterday the plugin that finally supports the visual creation of JavaFX was released. (Go for plugins,reload catalog and select the version 1.0 of JavaFX plugin)

JavaFX Plugin

Once the download is finished you can start creating JavaFX applications

New JavaFX Project

JavaFX Skeleton Project

I cant judge yet the composer or rather non-manual (full control) way to create a fx stage. The composer creates the code (similar to Swing) in the background and you cant touch it without screwing the fx file. I will try on a few samples.

First Remark: The preview pane renders useless now, it does not work with the composer anyway.

More infos on the JavaFX Composer





Netbeans 6.8, Glassfish V3 and JavaEE6 released

15 12 2009

The waiting is over, finally we get our hands on a production release of EE6 and Glassfish V3. Last week (Dec 10th) released, you also get it together with Netbeans 6.8. There is lot of attention and coverage on the latest version of the enterprise platform, so I spare you from my personal views,  though I was really looking forward to use it beyond previews and beta’s. I am excited to work with the matured and now “rightsized” framework. Time to get active on writing tutorials and books.

Some useful links with more details:





Getting Started with Netbeans and Shiro – Part 1

1 12 2009

Apache Shiro (formerly known as JSecurity and KI) is a security framework that handles authentication, authorization, enterprise session management and cryptography. With the move from sourceforge to Apache the GPL license turned into the Apache license. The current version is still 0.9 (still JSecurity), but you can build yourself a current version until the version is released. Shiro is NOT basd on JAAS.

Pre-Requirements for this tutorial:

  • Netbeans (any newer version 6.5.1 + already installed)
  • Maven (assuming most people dont use it yet)
  • Shiro code base (via svn)
  • Ubuntu (applies only to the installation of maven) Read the rest of this entry »




Tutorial: Getting started with Netbeans and JUnit plus Cobertura and Hudson (Part 3)

26 09 2009

Following part 1 and 2 which covered the JUnit test class creation and the coverage evaluation by Cobertura, we will add in part 3 another dimension: Automation. So far we run the tests manually, but we want to achieve a continuous integration and test environment.

Part 3 (Cobertura and Hudson)

Preparation:





Tutorial: Getting started with Netbeans and JUnit plus Cobertura (Part 2)

25 09 2009

Following part 1 which covered the class and JUnit class creation and ended in a suspected successful test.

Part 1 (covering Cobertura setup and execution)

Preparation:





Book Review: Java EE 5 Development with NetBeans 6

5 08 2009

Java EE 5 Development with NetBeans 6
David R. Heffelfinger
Packt Publishing
www.packtpub.com
ISBN 978-1-847195-46-3

The JAVA bookshelf offers a myriad of titles on almost any given topic, frameworks, tools, plugins or any available IDE. Most of the JAVA EE titles I know, are thick compendiums which go way beyond the level of knowledge you really need in practice, or are of a very theoretical nature. Often they are not pointing to specific products or versions (IDE, applicationserver or DB), eventually only giving some generic directions on how to use them. Someone who is not yet an expert in the EE environment, struggles to get the samples and sourcecode snippets in their choice of IDE and applicationserver up and running.

Other for this title, it guides the reader through the whole lifecycle of Java EE development, inclusive of the basic installation and configuration of Netbeans (6.5B, the actual version at the time of writing the book) and Glassfish in an illustrated step-by-step fashion. What I really like about his book, is the coverage of the most important aspects of the Java EE development in this sample-driven approach. You dont need necessary all the knowledge you gain from the book, as some frameworks abstract away a lot of the details, but is more than viable to to know whats going on under the hood and even more as some of the modern frameworks are only sitting on top of it. The book won’t teach you all details either, but it serves as a good starting point.

A short overview over the chapters and covered topics:

Chapter 1 supports the reader in getting Netbeans with Glassfish installed and running.
Chapter 2 starts with plain JSP development, it runs you through the creation of JSP pages and Servlets, JSP fragments, basic security and introduce you to the HTTP Monitor.
Chapter 3 looks at enhancing JSP pages with JSTL tags (for, choose, foreach), JSTL SQL tags (in case you require some hardcoded quick and dirty db-linked pages) and custom JSP tags. Basic understanding of tag libraries helps in more complex environments is essential.
Chapter 4 introduces into the more visual creation of JSF pages, also covering page flow and validation.
Chapter 5 gives a glance at JPA as a major improvement compared with the old way of creating entity beans and riding on additional relational mapping API’s. The chapter also covers Named queries, JPQL, table relationships and the various ways to creating JPA entity from the database and vice versa using the various little wizards that Netbeans has to offer. A complete sample rounds up the chapter with the automatic creation of JSF pages.
Chapter 6 is an extension to chapter 4 and servers more sophisticated samples for the visual creation of JSF pages including database binding and ajax functionality.
Chapter 7 pushes forward right into the heart of Java enterprise applications, the EJB’s. Even impossible to give a comprehensive overview though, this chapter offers a fairly good start into the complex topic with session beans and DAO design patterns provided by Netbeans.
Chapter 8 gives a quick glance at JMS, Java’s messaging service, which is hardly covered by any book with runnable samples but theoretical descriptions. Key to understand this for any communication to the outside world.
Chapter 9 get us started with Webservices as an core engine of web technology, interoperability and the cloudspace.
Chapter 10 summarize all the previous chapters by assembling a complete enterprise application with EJB module and web application.

I recommend the book as a starting point into the world of Web and Enterprise Applications with Netbeans. Even newer versions of the IDE are available now and Java EE 6 is around the corner, the basics, as you setup your knowledge foundation with this book, wont change. With the tools of the trade you learn to use here, you can continue your reading journey with other more detailed books. I wish I had the book while I was picking up Java EE, instead of wading through compendiums and dry theory material.

The sourcecode is available for download at the publishers website, ready for you to open in Netbeans. I still prefer sometimes hacking code from books line by line, it teaches you more while doing it, other than just blindly looking at code and run it.

Having a nice budget for books, I accumulated a collection of books touching a variety of IT topics, from coding to IT project management.
The development related books usually have 2 problems:
- They are (sometimes) outdated the moment you read them due to the cycle between the time the author writing the title and the versions of a product he refers to, it gets reviewed, edited and published and the time you hold in your hands.
- They are expensive. Sometimes you find information of similar quality, maybe not as combined as a book, in the web, as long you can find the right website or blog.

I recommend looking at the packt books, most of them are available as pdf at a reasonable price (cheaper than the paperversoin of the same). They come with the big advantage that you can carry as many pdf books along as you want. And if you feel the urge to, you can print (parts of) it to read – sometimes reading from paperware is more relaxing than staring at a screen though.





Code Review and Collaboration

5 06 2009

So far I did not suceed finding an online code collaboration tool for code review that is embedded in Netbeans. Except the collab plugin which requires a XMPP server (which I installed but NB not really willing to log into it and rewarding me with errors). I found another tools which is not embedded in Netbeans but an editor by itself: GOBBY (link).
It supports several team members working on the same (text) file and comes with a chat. One needs to start in host mode, so no server is required. It runs both under Windows and Linux. Unfortunately I did not manage to make the Windows version talk to a Linux host.
It still works ok for me because I can share a file (from my Netbeans project) by opening it directly in Gobby. Once the changes are made and you go back to Netbeans, the IDE will update the modified file.

Gobby Collaboration Editor

Gobby Collaboration Editor





How to add Javadoc to Netbeans

8 05 2009

You are wondering why Netbeans give you code completion but no javadoc, rather saying “javadoc not found” ? It is not part of the Netbeans Installer or the regular JDK package. You need to download it separately (link), copy the zip file to a folder of your choice and configure the javadoc in Java platforms.

Netbeans Java Platform

Netbeans Java Platform

Netbeans Java Platform

Netbeans Java Platform





Howto: Netbeans not starting up

3 05 2009

After I installed a new plugin and restarted Netbeans (6.5), it flashed me with this error

Netbeans startup error

Netbeans startup error

I believe the plugin file was corrupt and/or the xml-file with the respective settings turned to be corrupt. An expert might be able to judge from the error (see end of this entry for full error error message). After closing the error message I got a complete empty Netbeans screen.

Netbeans startup error

Netbeans startup error

After investigating about remedies or similar cases, the only solution I found, is to delete (rename) the userdir (see link for more info).

Remarks:

  • There should be a safemode mode to start up Netbeans (is there one?)
  • Deleting the userdir is not a satisfying solution because you throw away all your personalized settings.
  • Submitted as error 164329 (link)

Full error message:

Read the rest of this entry »





News: ZK 3.0.2 released

3 05 2009

As expected the updated Netbeans plugin followed the latest release quickly.
Version 3.0.2 is available for download at sourceforge.net (link)