Friday, July 29, 2005

Hibernate Forum Now Based on Credit System

So the Hibernate team has finally pulled out the final stop in trying to, well, the only thing I can come up with is to get people to stop asking questions. They state that this is to force people to help each other, but it seems to me that helping is something that comes natural in most community forums.

You can read about this rediculous effort here. And just so you know, Javaranch has a forum dedicated to ORM tools including Hibernate and we are actually really friendly and helpful just out of the goodness of our hearts. So if your sick of the crap you have to put up with on the Hibernate forums, we'd love to see you at the Ranch.

Hibernate is an awesome tool, but they really make it hard to want to use it, don't they?

.NET Near Darwin Award Goes To...

God help us if this developer switches to Java.

Wednesday, July 27, 2005

JSF Component Blushing

I've been looking for a way to blush some of my text components based on whether or not they passed JSF's built in validation of some input components rather than displaying error messages because they tend to mess up my layout and I don't like the global messages.

Found out from a guy on Javaranch you can do something similar to this:

styleClass="#{newIssueForm.summaryText.valid ? 'normal' : 'error'}"

Where normal and error are styles defined in your stylesheet. Works great. Thanks a lot to Mauro Castaldo for pointing this out to me.

Friday, July 22, 2005

Desktop Java Live - A Must Have For Desktop Developers

Recently I was fortunate enough to win a copy of Desktop Java Live by Scott Delap (who also runs during a book promotion over at Javaranch. Desktop Java Live isn’t your typical “how-to” java book full of API references and examples of how to create JFrame’s, JComboBoxes, and custom widgets. DJL is a pioneering book distributed by a pioneering publisher (SourceBeat) that teaches you how to write desktop applications using best practices as well as how to use a plethora of open source libraries to enhance and ease the development of your applications.

Currently there are 7 chapters available with chapter 8 due out the beginning of August. If you don’t know how SourceBeat titles work I’d suggest visiting their website and seeing what they offer. Books are bought on a yearly subscription and for that year you have access to any updated material as well as new chapters as they are made available. A lot better than waiting years for second and third editions. You get the hottest topics while they are still hot.

Scott starts your journey in chapter one and introduces you to desktop applications all over again. He talks about the swing (no pun intended) from rich desktop apps to browser based web applications over the past several years and how to determine if your application is right for the desktop. From there you move on to Layout Managers, GUI Builders (not to be confused with GUI designers), Look And Feel and then to a chapter that is pure gold. Swing Threads.

Chapter 5 on Swing Threads is also the sample chapter available as a free download. This chapter introduces you to the Event Dispatching Thread and discusses common threading pitfalls in Swing applications. Scott then shows you several different freely available API’s that have been made available to help Swing developers deal with threads more effectively. You can search the web for weeks and not find the culmination of useful information available in this single chapter of Scott’s book.

The book continues on with data binding and validation and to my knowledge is the only book that actually teaches you how to use JGoodies data binding and validation frameworks. The book is full of sample code. You never get bogged down in API references or theory. But theory is still important. And I had the honor of being able to read Chapter 8 prior to its release this August which is about Swing Patterns. This chapter also contains a sample application that uses what you have learned all the way to this point. Chapter 8 discusses MVC (Model-View-Controller) and MVP (Model-View-Presenter) and how they are used in and with Swing. Again, no other book that I know of teaches you what Scott does in this chapter alone. And although chapter 8 as well as many other chapters are biased to Swing the concepts are true for almost any toolkit. If you only buy this book for one chapter, it should be chapter 8.

On the horizon are chapters on Java WebStart, Installers, Obfuscators, and the all important Testing. Scott writes in a way that that is easy to follow and understand but does not water down the topics. Scott knows what he is talking about and that shows throughout the book. If you’ve never written a Swing application this book won’t explain how to do that. But if you are even remotely familiar with how to develop Swing applications this book will help your next application be the best it can be.

Thursday, July 07, 2005

DB4Free - Help Make MySQL 5 As Perfect As Possible

I ran across this little site yesterday from a post at Javaranch. Basically, you sign up and you get a free MySQL 5 database on a remote server that you have access to. You can give access from any host or limit it to be from a single host. You can register 2 databases under a single email address.

The main goal of this project is to help get MySQL 5 ready for primetime. From the website: With this project we also like to help the MySQL AB company to make the new MySQL 5 database server as perfect as possible. If you find any bugs, we would like you to report them on the MySQL website.

Obviously you wouldn't want to use this for anything in production or anything secure but it's a nice way to test out the new features of MySQL 5 without having to install and configure it yourself. Also, my site host only gives me 1 MySQL database so if I needed another one this would be a good temporary solution. Plus, I am all for helping MySQL out. They've been good to me by providing really good free database servers.

Friday, July 01, 2005

The Desktop War and Java

Yesterday I had a conversation with a friend of mine about linux, mac, windows, etc. He is a big fan of the mac and suggested I get one so I could have the best of both worlds, meaning windows and linux. I made some comment about not needing to buy new hardware just so I can run OSX. Linux has everything I need with the exception of good solid gaming support, which mac currently is one up on linux because they can run World of Warcraft natively.

But in all honesty the desktop I run is meaningless to me. Software is more important right there with getting done what I need to get done. I don't even care what the desktop looks like. I run blackbox on linux if that tells you anything. Sure there are features of a desktop that are nice, like OSX's drag and drop to/from anything, but visually speaking I am too busy programming or playing games in fullscreen mode to care if the menu's fade in/out, have drop shadows, or what is animated. This is all fluff. And desktops like Gnome, WindowsXP, KDE, etc just eat up system memory that could be put into better things like the applications I run.

Given that I don't care about the desktop but software is important it makes sense to acknowledge that I should run the desktop with the best support for the software I like to use. But software should not determine what Desktop OS I run. Java developers need to grab hold of this concept. There are a lot of native packages that have been ported to all different platforms. Java developers wake up, this is a sign. More and more people are demanding good software run on anything. And no matter what anyone says, Java is the best solution. Write your code on any platform, compile to bytecode on said platform, deploy anywhere. There is no other language that can do this. There is no other language that makes it easier to develop for any OS. If you are developing applications for multiple platforms and you aren't using Java, you are wasting valuable time in cross platform development. It's natural only to Java.

Writing code native to a platform only makes sense if there are features of that platform that java can't get to and you are only planning those features on said platform. If you are writing an application that interacts with MS Outlook, then just write in C# or VB.NET or even C++ and MFC. I am 100% for using the best language to get the job done. But I'll always consider Java as the first language of choice and if I don't feel it can accomplish the tasks at hand, I'll find something that can. But honestly, there isn't much that java can't do these days.

The desktop war can only last so long until people get really sick of paying high prices for fluff. Windows, Mac, Linux, I don't care. I just want to run software and get my work done. Give me all my tools in Java and the desktop war is over!