Wednesday, July 20, 2005

When to use annotations

Since we started our EJB 3.0 implementation, I've written a lot of unit
tests and tutorials for it. Other than actually actually enjoying
writing an EJB for a change, I thought alot about when and where XML
should be used over annotations and in what situations annotations
should probably be used over XML. I came up with these rules:
  1. Use an annotation if the metadata you are applying changes the design of your class.
  2. Use an annotation if the metadata changes the design of code interacting with your class.
  3. If your application needs to be portable between app-servers or
    databases, don't use an annotation that will not allow you to be
    portable
  4. Use XML when you want to configure on a per-deployment basis.

Nice overview of when to use annotations, and when to use XML configuration with EJB 3.0. I really like the notion of looking at annotations as a kind of documentation.

Saturday, July 16, 2005

Wednesday, July 13, 2005

Interaction Design

Some applications make perfect sense to the developer, but not to the end user. Are you thinking of your GUIs in terms of what the developer needs, what the application needs, or what the user needs? In this installment of "Interaction Happens," Jonathan Simon shows how to "think holistically" about your GUI.
rating comment: Very interesting article, which gives some nice ideas of polishing your user interface. I really like the "Message Bubble" example, which is a nice alternative to a normal dialog.

Monday, July 11, 2005

Exceptions and J2EE

Javaworld has an article entitled "Exception management and error tracking in J2EE," which "provides the basis for developing a set of policies along with a supporting framework for error handling in the J2EE world."...
Nice comments and notions about Exception management in J2EE!!

Wednesday, July 6, 2005

Dependency Injection

Dependency Injection continues to grow in popularity due to it's code simplification effects. If you've haven't had a chance to learn and apply DI yet, this new article on TSS by Dhananjay Nene will bring you up to speed on the concepts as well as illustrate how DI is done in Spring, PicoContainer, Hivemind, and XWork.

Monday, July 4, 2005