Tightly Coupling Java to Windows, the Microsoft Way

Good coverage of Microsoft-centric Java development, falls short of exploring the more important mysteries than make real Windows programming such a nightmare.


ORIGINAL DRAFT

I had an interesting experience at JavaOne when I talked to the third party component vendors about their user base and where the demand seemed to be. Only one of the vendors had invested time in a library that was tightly coupled to Windows using the WFC (Windows Foundation Classes). They had sold exactly one copy. Nobody I spoke to was seeing much demand for Windows-only Java components at JavaOne. If you really believe there’s value in the WFC, you may not be part of a large user base, but at least you can get some useful information from this book. Bruce Krell is a clear convert and his arguments are fairly lucid, if not altogether compelling.

The book covers a number of approaches to developing Windows programs in Java. It might be more accurate to suggest that the content is more about doing Java the Microsoft way, given the exploration of DHTML, which isn’t strictly Windows in many cases. I liked the coverage of COM development. In the real world, you’ll run into a lot of companies that have invested heavily in Microsoft solutions and communicating with the component object model is key to supporting loose coupling and good componentization.

The material about pure Java is fairly presented, though I was frankly offended by the authors performance comparison based on GUI startup speed, which demonstrated a lack of understanding of the whole JVM paradigm and unfairly pitted native Windows applications against Java initialization time. The Direct/J treatment was useful but not as deep as it needs to be if you want to leverage Java/Win32 interoperability. The premise is that any Win32 calls can be mapped onto the J/Direct paradigm, but in practice, its very difficult to determine the correct approach to use with various datatypes, events, notification and callbacks.

There are times when projects take strong advantage of native Windows applications or infrastructure and Java/Windows interoperability may be necessary. Most of us will avoid this at any cost, but sometimes a compromise is the right thing to do. If you are working in such an environment, this book provides some of the tools you need, since there are so few books that explore true Windows-centric Java programming. Unfortunately, this book is no better at exploring the implications than the Microsoft documentation and I can’t subscribe to the author’s bias, so whether you buy this book can only depend on how convinced you are about the need for Windows-only Java development.