Posted by: Jay Jonas | November 21, 2008

Top Five Java Technologies to Learn in 2009

I took this list somewhere I can’t remember. That’s not yet a complete list, Mr. Letterman. But I will update it later.

#? OSGI – Reality check, monolithic containers carry too much baggage and Java libraries are so richly cross dependent. The trend is there, a lot of frameworks are moving towards OSGI to bring some sanity in their deployment. Projects that have employed OSGI in anger are Eclipse via Equinox, Nuxeo and BEA Event Server,

#? JCR – Reality check, not all data fits well within a relational database. In most cases, users want to store their own documents and have those properly managed (i.e. versioned). JCR with it’s Jackrabbit implementation is becoming the de-facto standard for maintaining data other than the structured kind. Some examples of projects that have used this in unexpected and innovative ways are Drools BRMS for managing business rules, Apache Sling for universal resource storage and Mule Galaxy for SOA governance management.

#3 GWT – Reality check, AJAX is here to stay and Javascript is still a pain to work with. GWT is gaining traction like wildfire at the expense of other Java web technologies like JSF. A lot of projects have begun creating extremely cool products with it. Some impressive examples are Queplix a CRM, Compiere an ERP and GPokr a multiplayer Texas hold-em poker game.

#2 Groovy – Reality check, sometimes you have to write quick and dirty scripts to get your tasks done quickly. There’s a lot of traction these days for dynamic scripting languages like Ruby. However if you want to truly leverage your existing skill set, then it’s more efficient to take a evolutionary step. Groovy has come a long way since it’s rocky beginnings. I believe Groovy is finally mature enough (it finally has a debugger) that it’s safe to dip your toes in it. Furthermore, there’s are a of books, books about frameworks (i.e. Grails) and tools (i.e. IntelliJ) that help you from getting lost.

#1 Cloud Computing – Reality check, sometimes it just isn’t worth it to setup your own physical servers. Amazon’s services are going to be an extreme boon to development productivity. One of the most time consuming efforts, and one that is too often taken for granted, is the deployment of a load and performance testing harness. In a lot of rigid organization, it is sometime problematic to acquire so much hardware for use only for short time periods. There aren’t many tools out there yet for the Java developer (see: “Grid Gain Distributed JUnit“), however it’s ramping up pretty quickly. So just as we create our builds from the cloud via Maven repositories, one shouldn’t be surprised to find cloud based testing resources to be part of every developer’s tool chain in the future.

Posted by: Jay Jonas | September 11, 2008

AppFuse: removing auto-generated classes

Martin Homi, from Think.Reflect.Act, wrote this usefull post. I reproduce it here as part of a kind of a Log Post.

AppFuse is an application-framework based on the latest software developments. One extremely useful feature is automatic generation of code (snippets) from POJO classes. Unfortunately, there is no auto-deinstall function. So once, you have generated and installed code automatically, you have to remove the code snippets by hand.Here is a short description how to proceed. Let’s assume, you did not go through the full “Person” tutorial. Instead you implemented a POJO class including annotations and ran ‘mvn appfuse:gen|install -Dentity=Person’. To remove “Person” from project you have to delete:

  • src/main/java/**/model/Person.java
  • src/main/java/**/model/webapp/action/PersonAction.java
  • src/test/java/**/model/webapp/action/PersonActionTest.java
  • src/main/resources/**/model/Person-validation.xml
  • src/main/resources/**/webapp/action/PersonAction-validation.xml
  • src/main/webapp/WEB-INF/pages/personForm.jsp
  • src/main/webapp/WEB-INF/pages/personList.jsp

Remove “Person” related entries from the following files:

  • src/main/resources/hibernate.cfg.xml Delete mapping to Person modell class.
  • src/main/resources/struts.xml Delete all Person actions.
  • src/main/resources/ApplicationResources.properties Delete properties related to Person. Also delete properties inside other languages.
  • src/main/webapp/common/menu.jsp Delete entry for Person
  • src/main/webapp/WEB-INF/applicationContext.xml Delete Person related beans.
  • src/main/webapp/WEB-INF/menu-config.xml Delete Person section.
  • src/test/resources/sample-data.xml Delete Person mockup data.
  • src/test/resources/web-tests.xml Delete Person Canoo web test data. Don’t forget to delete PersonTests in the top target.
Posted by: Jay Jonas | September 3, 2008

Space Invaders are Back

Posted by: Jay Jonas | September 3, 2008

Google Chrome: Back to the Future

Google Chrome

Google Chrome

Remember that set of poorly debugged device drivers?

Posted by: Jay Jonas | May 29, 2008

Java Splash Screen of the day

I love splash screens so much so I will post java application splash screens here. If you don’t know, splash screen is an image that appears while a computer program is loading and it is used to displays the product name and version, the vendor’s corporate image and branding. The splash screen also contains important copyright and third party components information, as well as provides automated text information about application loading.

Today, the Java Splash Screen of the Day goes to Eclipse Ganymede 3.4.0 RC1, the next version of the open development platform from Eclipse Foundation.

Eclipse 3.4.0 Ganymede RC1

455x294x24
Posted by: Jay Jonas | May 20, 2008

Eclipse Icons

Ben had a nice script for fetching all the icons from the cvs. I’m adding it here because I don’t want to lost it:Eclipse Icon

#!/bin/shCVSROOT=:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse
export CVSROOT
mkdir -p eclipse
cd eclipse
cvs -q co org.eclipse.debug.ui/icons
cvs -q co org.eclipse.pde.ui/icons
cvs -q co org.eclipse.jdt.ui/icons
cvs -q co org.eclipse.vcm.ui/icons
cvs -q co org.eclipse.team.ui/icons
cvs -q co org.eclipse.ant.ui/icons
cvs -q co org.eclipse.help.ui/icons
cvs -q co org.eclipse.ui/icons
cvs -q co org.eclipse.ui.views/icons
cvs -q co org.eclipse.ui.console/icons
cd ..
rm -f ~/public_html/eclipse-icons.zip
find eclipse -name "*.gif" -print | zip ~/public_html/eclipse-icons.zip -@
 

Many common images, as such as undo, redo, file, folder, cut and copy, are available thru the org.eclipse.ui.ISharedImages interface. You can get them with IWorkbench:

Image folderImg = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER)
 

If you want to access the icons from other plugins without bundling them in your plugin, just do this:

AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.ui", "$nl$/icons/full/etool16/import_wiz.gif");
 

The complete set of above icons can be downloaded from here (*) and it’s all under EPL. You can read the Eclipse Icons Graphics Specifications from here.

(*) This link was broken, but it’s fixed now!
Posted by: Jay Jonas | May 15, 2008

Utf-8 is the answer.

That it is! Don’t mess your strings.Eclipse Preferences Dialog

If you use Eclipse like me and you code for multi-platform (ie. Windows and Linux), then there is something you need to keep in mind. The default Eclipse text file encoding is an old Windows-1252, aka CP1252, but nowadays everywhere is UTF-8.

Go to Preferences dialog and make your settings.

Posted by: Jay Jonas | February 20, 2008

Getting Started with OSGi

OSGi is the powerful dynamic framework that underlies the Eclipse IDE and platform, but its use is not restricted to Eclipse. In fact it is used everywhere from mobile phone and vehicle entertainment systems to enterprise application servers. It is, essentially, the module system for Java.

Neil Bartlett, OSGi Enthusiast, recently gave a webinar presentation that was broadcasted on Eclipse Live. The subject was an introduction to OSGi: what it is, when you should use it and how to get started learning it. The whole presentation is avalaible following this link and you can download the slides as well as the demo source code.

Posted by: Jay Jonas | February 2, 2008

SQuirreL SQL Client

As a developer I’m always wondering how much time I’ve got connect to databases and interacting with way more them then I’d prefer. My tool for these moments is SQuirreL, a Universal SQL Client.

SQuirreL SQL Client is a program written in Java that allows me to view the contents of a database, execute SQL commands and perform a number of other functions. The list of supported JDBC-compliant databases is so impressive:

SQuirreL’s default language is English and the contribuitors has added translation packages for several others. With a plugin architecture, new functionalities are released to each new version. Did I mention it is Hibernate HQL supported too? Does not matter what database I will be connected, this simple front end open source application makes my day a bit more easier.

Posted by: Jay Jonas | January 26, 2008

Dishonest Programming

David Brady, from Javalobby News, their weekly newsletter, wrote a interesting article about Dishonest Programming. I took this excerpt, wrote it down and put it on my desk. If you are a developer, you should read it too.

Honesty Tip #1:
Name functions for what they really do. You’ve been taught to write foo munging code by drawing a box on the paper and labeling it fooMunger() and then writing the code. Okay, but when you’re done, go back and read your code. Is it really fooMunging code, or does it also do something else? If you’re spending 80% of your method checking error conditions, your method is clearly less concerned with munging foos than determining whether it should munge foos. Congratulations–you’ve written an event handler. Rename it to onMungeFoo() or handleFooMungeRequest() or whatever, and extract the code that ONLY munges foos to mungeFoo().

Honesty Tip #2:
Let your yea mean yea and your nil mean nil. Don’t set up code to cleverly create side effects. EVERY effect is a side effect! Name your code for the intended side effect and document any other side effects. Don’t name your code for the unintended effect, especially if you think you’re cleverly creating an abstraction. (If the abstraction is really good AND other code will use it unchanged, you may create an abstracted method but you should still not use the abstraction in your other code. Write a wrapper method that explains your intended effect, like:

bool isLegalOverride(Foo a, Bar b) { return !areSimilar(a, b); }

Honesty Tip #3:
Don’t pee on my leg and tell me it’s raining, and don’t write a public accessor to a private member and tell me that member is still private. If an object is completely and utterly accessible from anywhere in the application, it’s a global variable.

Honesty Tip #4:
Don’t try to trick the compiler into giving you what you want. You’ll only trick your coworkers (and probably yourself). Tell the compiler what you want and write code that makes it give it to you.

Older Posts »

Categories

Follow

Get every new post delivered to your Inbox.