David R. Heffelfinger

Bookmark and Share
Tuesday Nov 06, 2012
Bookmark and Share

NetBeans Tip: Quickly opening windows without memorizing keyboard shortcuts

When working with NetBeans, sometimes I need to open a window to look at some information (breakpoints, output, etc). Windows can be accessed by going to the "Windows" pull down menu, then selecting the appropriate window, or, most windows have a keyboard shortcut (ctrl+1 for projects, for example).

The "Window" menu has several submenus, and it is not always entirely obvious where a specific window may be (the "Terminal" window, for example, is under "Output").

 NetBeans Window Menu

 Sometimes I would like to open a window, but I'm not sure exactly where it is located, and I don't know it's keyboard shortcut.

Fortunately NetBeans has a "Quick Search" text field at the top right, and typing the name of the window makes it appear in the search results, therefore, if I want to open the "Breakpoints" window, for example, all I have to do is type "Breakpoints" in the quick search

NetBeans search window


Saturday Oct 06, 2012
Bookmark and Share

Java One JSF with NetBeans BOF Demo

I had the pleasure of being a speaker at this year's JavaOne conference. One of the sessions I participated was a Birds of a Feather (BOF) session on JSF development with the NetBeans IDE.

During the demo I showed how a complete, nice looking application can be developed in only a few minutes using NetBeans.

For the benefit of those that couldn't attend the session, here is a video of said demonstration.

For those that want to learn more, I wrote a book on NetBeans and Java EE.

 


Sunday Apr 29, 2012
Bookmark and Share

Trying to keep an open mind in the Spring Vs Java EE Debacle

One common criticism of my Spring to Java EE Migration article series (see part 1, part 2, part 3 and part 4) is that the article uses an old version of Spring against a modern version of Java EE. There's a reason for that, since project using older versions of Spring are the most likely ones to be looking to migrate to a newer technology stack, be it a newer version of the Spring Framework, Java EE or something else.

Nevertheless, truth be told, I've been focusing on Java EE projects for the last few years, and the times I've used Spring have been when maintaining legacy applications that don't use modern versions of the Spring framework.

Trying to keep an open mind, I bought Just Spring by Madhusudhan Konda for my Kindle Fire. The book uses Spring 3.0, versus Spring 2.5 in my article series. I decided to go for this book since it is a quick read (just over 60 pages), I didn't want to have to go through a 300+ behemoth of a book just to see if my opinion of Spring was outdated.

Quite frankly, the book did little to change my opinion in the Java EE vs Spring debacle. Although annotations get a brief mention in Konda's book, most of the examples still use XML configuration, and the seemingly endless XML needed to do anything nontrivial in Spring is one of the main reasons I'm not a fan of the framework.

 

To learn more about Java EE development, please check out my own books, Java EE 6 with GlassFish 3 Application Server and  Java EE 6 Development with NetBeans 7.

 

Saturday Apr 28, 2012
Bookmark and Share

tar failing with error message "file changed as we read it"

Today I'm upgrading my laptop to the recently released Ubuntu 12.04 Precise Pangolin.

Even though I have my /home directory in it's own partition and the installer shouldn't wipe it out, I'm erring on the side of caution and backing up my home directory before beginning the installation.

I'm using the Linux tar command to compress and back up my home directory, but for some reason after waiting for several minutes the command kept failing with the following error message:

"file changed as we read it"

After googling for a bit I found the solution to the problem, using the --ignore-failed-read flag for tar took care of the issue.

tar --ignore-failed-read -ztvf backup.tar.gz /home/myhomedir

did the trick. 

Bookmark and Share

Spring to Java EE Migration Article, Part 4

The fourth and final part of my Spring to Java EE migration article series has been published.

Spring to Java EE Migration, Part 4 

Part 4 compares equivalent functionality in Java EE and Spring, covering topics such as MVC design pattern implementation, data access, transaction management, and dependency injection. 

Wednesday Apr 04, 2012
Bookmark and Share

Spring to Java EE Migration Article, Part 3

Part 3 of my Spring to Java EE migration article series has been published.

This part covers how to tweak the NetBeans-generated JSF user interface and compares the Spring and Java EE versions of the Pet Clinic application. 

Saturday Dec 17, 2011
Bookmark and Share

Spring to Java EE Migration, Part 2

Part 2 of my Spring to Java EE migration series has been published. 

This part of the article shows off NetBeans Java EE capabilities, such as automatically generating JSF pages, JSF managed beans and Data Access Objects (DAO's) implemented as EJB session Beans. 

Wednesday Nov 02, 2011
Bookmark and Share

New Spring to Java EE Migration Article Series

For the past few weeks I've been working on a new article series for the Oracle Technology Network. The topic of the series is Spring to Java EE migration using the NetBeans IDE. 

Part 1 of the series was just published. In this part we begin migrating Spring's sample Pet Clinic application to standard Java EE APIs such as JavaServer Faces (JSF) and the Java Persistence API (JPA), while showcasing time saving NetBeans features such as JPA entity generation.

Sunday Sep 04, 2011
Bookmark and Share

Ordered a Sony Xperia Play from Amazon

Amazon has a deal going on for the Sony Xperia Play for one cent ($0.01) with a two year contract with Verizon Wireless.

I was already with Verizon and fairly happy with them, and my old Motorola Droid was starting to show it's age (the power button sometimes doesn't work, I have to press it multiple times to turn the phone on or off), so I decided to give it a go.

For those that don't know, the Xperia Play is the so called "Playstation Phone", that has a built in game pad and several exclusive titles. The XPeria play also has stock Android 2.3 (Gingerbread). I'm not a fan of Android skins like Sense UI and others, since having those skins make the phones harder to upgrade for the manufacturer, since they have to update their skins for every new version of Android.

As far as the Sony Xperia Play goes, I am primarily interested in getting a Stock Android Gingerbread device for 1 cent, plus it is a nice hardware upgrade for me. The fact that it has a built in gamepad and exclusive games is just gravy, at least it will give me something to do during my daily bus and train commute.

Thursday Sep 01, 2011
Bookmark and Share

Kevin Mitnick's "Ghost in the Wires"

I just finished reading Kevin Mitnick's new book, Ghost in the Wires, on my Kindle.

I remember learning about Mitnick by reading about him on Slashdot via the "Free Kevin" movement several years ago.

Mitnick's life story is quite interesting, and the book is full of several interesting anecdotes.

He explains how he was able to figure out a way to travel for free on the bus as a kid; illustrating how he had an ability for social engineering from a young age.

Mitnick then goes on to tell the story explaining how some friends from high school introduced him to phone phreaking, making long distance phone calls for free. 

He also tells a story on how he was able to defeat the security of the computer systems in the college he was attending, and how his professors asked him to secure the system as an "honors project" or face expulsion.

The book is full of several stories detailing how he was able to break into several computer systems, steal cell phone service, monitor phone calls (including FBI lines), obtain new identities and other clever and "less than legal" activities. Mitnick had an ability for social engineering, that is, he could easily dupe people into giving him information that he shouldn't have. He would call companies and pretend to be a coworker or customer, and more often than not he could convince the other person on the line to do something for him or provide some confidential information, including usernames and passwords.

All in all, Ghost in the Wires is a very interesting read, and very much worth it for anybody interested in computers or security.

Wednesday Aug 31, 2011
Bookmark and Share

James Gosling, Father of Java, Leaves Google

A while back, there were news all over the blogosphere about James
Gosling, father of Java, leaving Oracle shortly after the database giant
bought Sun Microsystems.

Gosling was unemployed for a while, but in March 2011, he went to work for Google. Today he published a new blog entry, announcing that he left Google to join a company called Liquid Robotics, a company that makes an unmanned ocean vehicle called the Wave Glider.

I'm
surprised that Mr. Gosling decided to leave Google after less than six
months of employment; nevertheless I wish him the best of luck in his
new endeavors. I'm sure Liquid Robotics will benefit greatly from the
positive public relations of having the father of Java join their
company, and I'm sure they are hoping his tenure will be longer than the
one he had at Google.

Wednesday Jun 29, 2011
Bookmark and Share

Java EE 6 Development With NetBeans 7

A new edition of my NetBeans book has recently been published by Packt Publishing. 

Java EE 6 Development With NetBeans 7

The book covers NetBeans 7's support for all major Java EE 6 APIs,
including JSF 2.0, EJB 3.1, JPA 2.0, CDI 1.0 and Servlets 3.0. The book
also covers NetBeans support for PrimeFaces, a very popular high quality
JSF 2.0 component library.

Development of web applications taking advantage of new Servlet 3.0 and JSF 2.0 features is covered. New
JSF 2.0 features such as XML-less configuration, project stages, new
JSF 2.0 conventions, resource directories, Facelets templating
(including predefined templates included with NetBeans) are covered as
well. The book also explains how NetBeans can help application
developers build JSF 2.0 components using markup only, without having to
develop any Java code.

The book explains how to develop sophisticated JSF 2.0 applications with PrimeFaces.

New EJB 3.1 features such as the new EJB timer service are covered.

The book also covers NetBeans 7 support for JPA 2.0, including the new
Criteria API, and how to use NetBeans to automatically generate JPA code
from existing databases; as well as generating complete Java EE CRUD
applications from an existing database schema.

Contexts and Dependency Injection (CDI) is covered as well, including coverage of CDI
named beans, scopes, CDI Qualifiers, Stereotypes and Interceptor
Binding Types are covered as well.

After finishing the book, readers not only will be well versed in the latest Java EE technologies,
but they will also be able to take advantage of NetBeans 7
functionality that allows developing Java EE applications in record
time.

Wednesday Mar 16, 2011
Bookmark and Share

Reports of Java's Demise Have Been Greatly Exaggerated

It seems like every other day a new article or blog post comes out declaring Java as a dead language. Every time I read one of these articles, I scratch my head in confusion. Are these people serious? If Java is so dead then why is there so much demand for it?

What does it mean for a language to be dead anyway? Is it that there is no demand for programmers with expertise in the language? If this is the case, then Java is definitely not dead since I routinely get emails out of the blue from companies looking for Java developers. I have been doing contract work since the late 1990's, and I move from one project to the next with ease, in most cases I have several offers before my current project is over. Therefore in this sense, Java is not dead.

Is a programming language dead if it's not evolving? If that's the case Java is certainly not dead.  JDK 7 is just around the corner, and there are so many Java libraries out there, which release new versions periodically. Java is still very much evolving and improving, therefore in this sense Java is definitely not dead.

I can't think of any other reason why a programming language may be considered "dead", other than lack of demand for expertise or lack of evolution, therefore I'm pretty certain that Java is very much alive and well.

Perhaps the bloggers and reporters declaring Java's demise are actually doing us Java developers a favor, the less Java developers out there, the less competition for Java projects, which would in turn increase the demand (and billing rate) of us Java programmers. Keep stating that Java is dead folks, me, my colleagues (and our bank accounts) will thank you.

Friday Sep 10, 2010
Bookmark and Share

GlassFish Book Giveaway Winners

Java EE 6 with GlassFish 3 Application Server

Over the last few weeks, we have been having a giveaway for my latest book, Java EE 6 with GlassFish Application Server.

The giveaway is now over, and we have randomly selected three winners.

Without further ado, here are the winners:

Congratulations to all the winners!

Obtaining a copy of the book

If you would like a copy of the book and you are not one of our lucky winners, I encourage you to purchase it directly from Packt Publishing.

Thanks to everybody that participated and congratulations once again to our winners!

Tuesday Aug 17, 2010
Bookmark and Share

Win a Free Copy of Java EE 6 with GlassFish 3 Application Server

Java EE 6 with GlassFish 3 Application Server

As some of you know, my latest book, Java EE 6 with GlassFish Application Server, was recently published by Packt Publishing.

Packt Publishing was kind enough to offer me three copies of the book to give away.

About the Book

The book covers all aspects of Java EE 6 development using GlassFish 3, some of the topics include:

  • JavaServer Faces (JSF) 2.0
  • Java Persistence API (JPA) 2.0
  • Enterprise JavaBeans (EJB) 3.1
  • Contexts and Dependency Injection (CDI) 1.0
  • Java API for RESTful Web Services (JAX-RS) 1.1
  • Java API for XML Web Services (JAX-WS) 2.1
  • Servlet 3.0

How to Enter for a Chance to Win

All you have to do is answer one (or both) of the following questions in a comment below:

  1. What would you like to learn from the book?
  2. Why would you like to win a copy of the book?

If you prefer a certain book format and you are a USA or Europe resident, please note that in your comment as well, and we'll do our best to accommodate you (paperbacks are only available for USA and Europe residents).

Giveaway Details

The duration of this giveaway is 20 days. The giveaway ends on Monday, September 6th, 2010 after which comments will be disabled on this post.

Three winners will be randomly selected to win a copy of  Java EE with GlassFish 3 application Server, authored by David Heffelfinger (yours truly) and published by Packt Publishing. Make sure you use a valid email address in the comments so that we can contact you if you win. Winners will be announced on Friday, September 10th, 2010 and also contacted via email. Good luck!

Update: The giveaway is now over. Thanks to all that participated. Winners will be announced this Friday, September 10th.

Bookmark and Share
Ensode Technology, LLC
Ensode
Technology, LLC

Calendar


Feeds

Search

Links

Navigation