
Component Development for the Java(TM) Platform
Stuart Dabbs Halloway | 2001-12-24 00:00:00 | Addison-Wesley Professional | 368 | Networking
Reveals both the potential and pitfalls of developing components using the Java platform. Delves into the component-oriented features of the Java platform, thoroughly discussing class loading, reflection, serialization, native interoperation, and code generation. Softcover.
Reviews
Well, I don't think this book deserves 5 stars and here's why:
1) The book provides good description of Class Loaders, reflection and of serialization (I liked them, really) but after that I was expecting to read about, you know, "Component Development", the title of the book ? Like how one divides his application to deployable components, why and when. Nothing about that - author just gave us tools that we can use without providing any further information. But I know Java provides CL, reflection and serialization for many years already - how does it help me to write components ? Where are some real-life examples (besides RMI, EJB and JSP) ?
The chapter about GP (Generative Programming) gives a good description of various approaches about it (and if you know JBoss and it's dynamic invocation stack built with dynamic proxies vs other containers running "rmic" - you understand them even better) but still, I would call this book "Java CL, reflection, serialization and high-level GP overview" - that's exactly the information that I've received from it. Nothing about "component development" besides some basic example in the very beginning.
2) The book spends time and space discussing C++/COM integration with Java and while I understand some will find this information invaluable - I'm sure for most Java developers (and that includes me) this is highly irrelevant.
3) In 2007 it's became outdated in many points as we have Java SE 6 released and 7 upcoming - author only mentions J2SE 1.4.2. Right, many points still hold true but not all of them (does setAccessible(true) allows one to write final fields or not?) and one can never be sure whether what's he's reading is correct today the way it was back in 2001
4) I checked "Java Class File Editor" plugged by the author - it's just a bunch of classes without any documentation (and I've never heard of any bytecode instrumentation guru using this library so it's not of big value after all). So I would call it a "toy project abandoned shortly after publishing a book"
Reviews
This book is a must buy for everyone who wants to know how technologies like EJB is implemented. A tour de force.
Reviews
I had already been teaching some of this book's material, from notes I had put together. Then I found this book - it covers more material, and does it beautifully. I give the book my highest recommendation.
This covers component software from the standpoint that I prefer: the underlying technology that make components work. This book is not for the cut&paste programmer. It's for someone who wants to understand what really happens when a program (or component) starts execution. It's for someone who wants real control over code activation, or someone who just wants to execute every test() method in every class, without having to type in the ever-changing list of class names.
This book also has a place in any library on code security. For example, reflection exposes a lot more of your program than you may have thought, and serialization creates a whole new family of possible data exposures. Security is not an explicit topic, but lots of the material has security implications.
The only major topic this book misses is long-term (XML)serialization. Well, that's new at Java 1.4, and the book seems to predate that API. Maybe the second edition will cover it better. The book doesn't mention EJB styles of serialization or the Java Activcation Framework either, but those are just applications of the basic technologies described here.
There was good reason for this book to be written about Java. I look forward to a .NET companion volume, when (if!) .NET provides the same capabilities. In the mean time, I'd recommend this to any advanced programmer, since analogies to Java will help readers understand environments other than Java, too.
Reviews
It heleps to have a problem to solve in order to recognize an elegant solution. Stu Halloway's book is exceptionally well-wriiten and an informative read. His examples clearly support the issue at hand. Three such issues of importance to me include Dynamic Proxies (Section 3.4); Custom Metadata (Section 3.7) and Generative Programming (Chapter 7).
In the Dynamic Proxies section, he writes: "The strength of dynamic proxies is method call forwarding." [p. 87] Such succinct expression brings clarity to the discussion at hand, exemplifying the author's firm grasp of the subject.
His Custom Metadata section illustrates pragmatic guidelines for implemenation of new-found insight:
"Standard java compilers will not emit your custom attributes, and the Reflection API provides no support for accessing them. If you want to define and use custom attributes, a custom class loader that tracks the attributes as classes are loaded, and extensions to reflection that can access these attributes at runtime." [p. 101]
Chapter 7 (GP), has been my focus. I appreciated his thorough comparison of parametric and inheritance issues in light of Czarnecki et al., Generative Programming: Methods, Tools, and Applications (p.176) wrt their emphasis on parametric polymorphism.
Indispensable stuff.
Reviews
I bought this book for my department (well, my company bought it - I ordered it ;) ) to help us with the deployment problems we'd been having. These were normal issues, of making sure all files are in the right place, that environment variables were set correctly, etc. We always solved them, but it usually took a whole day to install something and make sure it was all working correctly. Enter Mr. Halloway's book.
While most Java books tell you how to write "this" or make an algorithm to do "that", Mr. Halloway's book tells you how to take almost no extra time and make those programs garaunteed to work in any installation environment. It's more than just changing your mindset, the book gives you very clear examples of how to make your application easily deployed and dynamic. For example, in chapter 2 you learn how to easily create an application that can continue running and update its classes to your new version.
The best section in the book, I think, is the section on ClassLoaders - which I garauntee will be your best friend after reading this book. Before reading the book, I almost never dealt with the ClassLoader. Now I use it all the time to:
1. Create dynamically updated classes
2. Manage security features not built in
3. Allow for easy deployment without needing knowledge
of the file system structure
Perhaps most valuable of all is Mr. Halloway himself. ..., he has been more than willing to help me understand any parts of his book that were confusing to me. To me, that was the most valuable return on my purchase.
Other resources to check out after reading this book:
1. AVALON FRAMEWORK
This is from Apache.org and it's a good framework for
easy configuration which continues in the same vein as this
book. http://jakarta.apache.org/avalon/
2. Stuart Halloway's Ideas for a Configuration API
...
Definitely worth checking out, it will give you some great
ideas.
Download this book!
Free Ebooks Download