Monday August 16, 2004
Why Java Desktop apps are better
Since I've been spending so much time with Microsoft Word lately, I decided to upgrade to the latest versions yesterday. Here's where products like IDEA really shine. If I buy a copy of IDEA, I get a copy for Windows, Linux and OS X. It's written in Java, so it's easy to create versions for different operating systems. I imagine it's just a matter of packaging each install differently.
So I went to CompUSA and had to buy 2 copies of Word - one for Windows and one for OS X. That's bullshit - I should only have to buy one software package. Oh well, it's already paying off since Word on Windows hasn't crashed yet.
Posted in Java
at Aug 16 2004, 10:47:58 PM MDT
11 Comments
log.debug vs. logger.debug - which do you prefer?
This is probably a bit of a religious debate, but it can't hurt to ask. Do you prefer to use log.debug() or logger.debug() in your Java classes? A fair amount of open source projects use Commons Logging and many of them seem to use logger. Personally, I prefer log (esp. b/c it's shorter), but I'm willing to change based on what the community (particularly AppFuse users) prefer.
Here's another tip I learned today. I typically declare a log variable for each class, such as this one in BaseAction.java
:
protected static Log log = LogFactory.getLog(BaseAction.class);
|
A better design can be found in Spring's DaoSupport classes. They have a logger variable that all its subclasses can use - eliminating the need to initialize a log variable in each class.
protected final Log logger = LogFactory.getLog(getClass());
|
Obviously this is cleaner than AppFuse's current design - so I'll be changing it for 1.6. Any reasons why I shouldn't?
Posted in Java at Aug 16 2004, 09:47:58 PM MDT 21 CommentsSearch This Site
Recent Entries
- A Good Friend becomes a DU Hockey Coach
- What's wrong with JSF
- Why such a busy week?
- New Passport in 9 Days
- EhCache Project Busy this Summer
- Spontaneous Stuff Weekend
- Awesome Birthday Present: A Kegerator
- Maven Plugin for Running Integration Tests against Multiple Containers
- Presenting Web Frameworks of the Future Tomorrow in Denver
- My OSCON Aftermath