- Taschenbuch: 273 Seiten
- Verlag: In Action; Auflage: 01 (1. Oktober 2004)
- Sprache: Englisch
- ISBN-10: 1932394184
- ISBN-13: 978-1932394184
- Größe und/oder Gewicht: 18,8 x 1,5 x 23,4 cm
- Durchschnittliche Kundenbewertung: 1 Kundenrezension
- Amazon Bestseller-Rang: Nr. 301.659 in Fremdsprachige Bücher (Siehe Top 100 in Fremdsprachige Bücher)
- Komplettes Inhaltsverzeichnis ansehen
Java Reflection in Action (Englisch) Taschenbuch – 1. Oktober 2004
Kunden, die diesen Artikel gekauft haben, kauften auch
Es wird kein Kindle Gerät benötigt. Laden Sie eine der kostenlosen Kindle Apps herunter und beginnen Sie, Kindle-Bücher auf Ihrem Smartphone, Tablet und Computer zu lesen.
Geben Sie Ihre Mobiltelefonnummer ein, um die kostenfreie App zu beziehen.
Wenn Sie dieses Produkt verkaufen, möchten Sie über Seller Support Updates vorschlagen?
You are a Java developer. You are asked to add a simple feature to your application. But "simple" can be deceiving: you have to make many changes, in locations which can be difficult to find. If this sounds familiar, you want to know about Java reflection. With reflection, you can work smarter by designing flexible applications to which you can easily add likely new requirements. Then, with a few code changes in easy-to-find places, you've got the job done. Reflection adds a new dimension to your programming skills. It will boost your effectiveness. Java Reflection in Action starts from the basics. It gradually builds a complete understanding, adding as it goes reflective concepts illustrated with many small examples that are useful in real applications. In a subplot, the book follows a programmer, George, as he tackles common but difficult tasks. In each case, George finds flexible, reflective solutions that replace the usual hard-coded ones. The power of reflection becomes clear through his story.What's Inside *Introduction to reflective programming *How reflective code generation can address common cross-cutting concerns *How to load new classes dynamically into a running application *How to decide when reflection is the best solution
Über den Autor und weitere Mitwirkende
Dr. Ira Forman is a senior software engineer at IBM. He started working on reflection in the early 1990s when he developped IBM's SOM Metaclass Framework. Nate Forman works for Ticom Geomatics where he uses reflection in day-to-day problems. Ira and Nate are father and son. They live in Austin, Texas.
Derzeit tritt ein Problem beim Filtern der Rezensionen auf. Bitte versuchen Sie es später noch einmal.
Leider bezieht sich das Buch nur auf Java 1.4, weshalb Sprachelemente, wie z.B. Generics noch als unbekannt gelten.
Für erfahrene Programmierer und Informatikstudenten, die der englischen Sprache mächtig sind ist dieses Buch nur zu empfehlen. Anfänger sollten aber die Finger davon lassen!
Good job Dr. Forman!!!
Die hilfreichsten Kundenrezensionen auf Amazon.com
Overall: I would recommend buying after I've read the book.
Now, a less glorious side... This book is OLD. It is based on Java 1.4 and Java 5 was only in works when it was published, so annotations and generics are not really covered: they are mentioned as "well... let's wait until it gets finalized and then Reflection would be likely expanded to cover these topics"...
The second part of the book (starting from "code generation") is perceived by me as a collection on hacks which authors put into this book just to make up the volume...
Anyway: book is definitely worth reading :)
My only qualm about the book is their discussion of the use of microbenchmarks to evaluate the impact of reflection upon execution speed. My experience is that microbenchmarks such as these, give you a best case lower bound on execution speed.
Echoing the other reviews, every Java programmer should know this. It will make your code cleaner, better and more maintainable. The book also contains an excellent set of references to help the reader explore the general topic of reflection in greater depth.
The book covers all the basics. It starts with the whole idea of metaprogramming, writing programs about programs. Maybe it sounds involuted, but the first two chapters show how it works for handling the basic features of an application, the methods and fields. The next topics cover object creation: first, objects of classes that already exist, then classes created on the fly using Java's Proxy mechanism. A little later, they cover class loaders and custom loaders in the clearest, best-motivated discussion I've seen anywhere. The chapter on Design Patterns is, as in so many books, somewhat perfunctory. I've used reflection to analyze DPs in running programs, so I found that chapter disappointing. The last chapter begs to be rewritten. This book was in production when Java 5 was on the horizon, but issued after Java 5 hit the streets. Java 5 introduced many new features such as annotation, and new reflective APIs to support them. That last chapter looks forward to features that have since become real - not a fault of the authors', but enough reason for a second edition.
There are some real problems in this book, though. A minor one is that the reflection API isn't actually laid out entire anywhere in the discussion, but JavaDoc will take care of that for you. More importantly, serialization is a crucial part of the component technologies that reflection supports. This book largely disregards the standard APIs and SPIs in favor of an ad hoc, roll-your-own approach. Trust me, that's a bad idea. See Halloway's aging 'Component Development' book or old editions of 'Java in a Nutshell' for much more complete treatment of real serialization. Part of the problem in this treatment of serialization is its weak discussion of the inheritance hierarchy: when serializing a subclass, you have access to only half of an object. The superclass[es] is[are] the other half, and may have private data that the subclass can't serialize on its own. This weakness recurs in an otherwise interesting discussion on checking of invariants. The approach in this book seems to forget that the subclass invariants are only half of the object invariants, and the superclass is not handled. Also, as Szyperski notes, invariants interact subtly with callbacks, a discussion conspicuous by its absence.
This is an advanced book that Java newbies might not benefit from, and I don't mean that as a criticism. It's for experienced programmers with big, complex problems. It's for dynamic, extensible systems, the kind that we all want to work on. Even though it's Java-based, it's for anyone programming in any reflective language, at least until your language gets its own version of this book. Despite some significant problems, I recommend this book highly.
I liked the choice of introducing new material with a very simple and self contained example before attempting a more complex "put it all together" example. Also, yes, the examples are quite contrieved, but that can be justified because while it's true that little bits and pieces of the reflection API can be useful in most programs, it's definitely hard to come up with an example program that gains real advantage by using ALL of the reflection API.
Starting with chapter 7 on code generation, this book takes the very sorry road of an overly academical, obscure style that is only about introducing unnecessary complications. My bet is the real reason for introducing these last chapters was to fatten up a book that even like that is quite slim. In fact it's certainly not easy to produce a 200+ pages book on reflection alone, but still the author's would have been better off introducing more examples, or even treating another subject besides reflection, than introducing these bogus chapters. Still a worthy buy though, for a java programmer that has digested the basics and is curious to find out what is possible with the apparently arcane features of reflection.
I'm a technical writer myself and follow the simple rule: "the book/article is ready when you can't remove anything from it". The authors have managed to cover complicated topics in a 250-page book that has nothing to remove.