Rating:  Summary: Updated review Review: -- addendum 07/2004 - I used this book until it fell apart on me (not the first O'Reilly book to have done that, BTW). This is the source I reach for first when tackling a new problem. I eagerly await the second edition, apparently coming soon. -- addendum 09/2003- you know, I've had this book for a while now and while the java.sun tutorials are OK, there are times when you need just a basic little client to do something and I keep coming back to this book and its code. I don't use his packages but I do use his Q&D examples for things I don't use a lot like JNDI and Native Code.To run with the cookbook metaphor, this book is full of recipes for ten-minute soup while Sun's site is more like "First the seed is planted, then cellular mitosis expresses genetic characteristics...let's stop to look at the details of nucleotides, shall we?" -- My original review was great for beginners but quickly trips over itself. Darwin writes classes to help the beginner, which is nice for running his examples but not much else. The examples are nice but java.sun.com has better and more recent stuff. Not badly written, not a terrible book but I can't recommend it due to the evolution of high quality tutorials and examples on the Javasoft web site.
Rating:  Summary: Great source for how to code specific situations Review: Anyone who has been involved in programming very long soon comes to realize the value of the various programming cookbooks. The cookbooks are not for the person who wants to learn how to program in a particular language, but are very useful for programmers with a basic knowledge of the language. The idea is simple, take the most common problems people deal with and put the solutions into a book. Simply state the problem and then show the code to resolve it. So, if you need to know how to do something you can look it up, enter the code, and test it.
Some of the chapter subjects include Interacting with the Environment, Strings and Things, Pattern Matching, Numbers, Dates and Times, Object-Oriented Techniques, Directory and Filesystem Operations, Graphics and Sound, Network Clients, Server-Side Java, Database Access, XML, and Threaded Java. Typical of any of the programming cookbooks, it is a quick and easy source for answers. Each item has a short explanation of the problem and then goes straight to the code to demonstrate how it works. A great time saver and required resource for Java programmers, Java Cookbook, 2nd Edition is highly recommended.
Rating:  Summary: Great book for the right audience. Review: Having owned (and read) a separate (mostly O'Reilly or Sun) book on almost every subject covered here, I didn't find almost anything new or exciting. This is not to say that the book is not good, but just to emphasize one more time that the intended audience have to be taken into consideration. I think this is a great learning book for intermediate Java programmers who already tried writing some Java programs, but don't have much practical experience yet. Beginners may not realize "why" these topics are picked for coverage and what are the important points of each example. Yet reading this book may help "prepare the soil" for reading other, special-topic books and source code. Experienced developers may not find anything eye-opening, as most of what is described in this book they have already learned, usually the hard way. Nevertheless, this book can be used as a good reference book, replacing a whole set of special-topic Java books. This book provides a good collection of advice about programming problems that occur most often during Java development. Explanations are mostly brief but clear. Code examples are very good. Writing style is clear, just enough humor to keep a reader from falling to sleep. Author's dislike for Windows is made a little too apparent throughout the book and is slightly annoying, but doesn't spoil the overall picture. To summ things up: a good buy, but you need to understand your needs/expecations.
Rating:  Summary: My favorite type of supplemental reference manual... Review: I make no apologies about being an "R&D" developer... "Rob & Duplicate". I learn best by seeing something that works, and then adapting it to my own needs. Therefore, a book like Java Cookbook by Ian Darwin (O'Reilly) is the exact type of book I look for and use on a regular basis.
The chapter breakdown: Getting Started; Interacting With The Environment; Strings and Things; Pattern Matching with Regular Expressions; Numbers; Dates and Times; Structuring Data with Java; Data Structuring with Generics, foreach, and Enumerations; Object-Oriented Techniques; Input and Output; Directory and Filesystem Operations; Programming External Devices: Serial and Parallel Ports; Graphics and Sound; Graphical User Interfaces; Internationalization and Localization; Network Clients; Server-Side Java: Sockets; Network Clients II: Applets and Web Clients; Java and Electronic Mail; Database Access; XML; Distributed Java: RMI; Packages and Packaging; Threaded Java; Introspection, or "A Class Named Class"; Using Java with Other Languages
For those unfamiliar with the "Cookbook" style, the chapters have a series of real-life problems, such as playing a sound file, playing a video clip, and printing in Java. The problem is followed by a short one or two line solution and an expanded discussion of the issue complete with code. This approach makes it really easy to find something that is similar to the issue you're facing and to see how someone else would solve it.
For me, the quality of this book is really high. It's a second edition covering the Java 1.5 package, so it's fully up on the current technology. In fact, the Generics chapter deals exclusively with new features in 1.5. Some of the solutions are code classes developed by the author and made available for download. But unlike some books I've reviewed where the author supplies code, this isn't an attempt to push their company or product. It's just a clean way to use a solution that someone else has worked through.
This isn't a book you'd use to learn Java from scratch, but it's a book you'll use on a regular basis as you continue to expand your Java knowledge. Highly recommended.
Rating:  Summary: Much better than the first version Review: I'm blown away by how much better the second version has improved from the first. I was so disappointed by the first edition that I swore off O'Reilly for a little while. One of my major gripes, the rampant use of classes provided by the author in libraries has all but vanished. In addition the anti-patterns of bad SQL use that are so rampant in other Java books are nowhere to be found, and in their place are recipes that show sane and proper use of JDBC.
I heartily recommend this practical work for Java engineers. For those not familiar with the first edition this is a solid practical work that covers a wide range of Java programming challenges. For those turned off by the first edition, you should take a look at the second, the improvement is profound.
Rating:  Summary: Excellent for Beginners and Intermediate Developers Review: I'm relatively new to Java and having this book makes finding simple answers easy. For beginners and intermediate developers this is a wonderful resource when you don't know the answer off the top of your head. I was thrown into coding in Java at my job without any formal training so I'm learning the language as I develop solutions for clients. This book helps me get my job done quicker and also helps me understand the language better.
Rating:  Summary: Good to see how others would do something... Review: I'm very into a method of programming called "R&D"... that stands for "Rob And Duplicate". I'd rather not invent or reinvent something if I can "borrow" someone else's solution. Given that as my mindset, I LOVE this book! While the hardcore reference books are necessary, all too often the beleaguered developer is left asking for a simple example of how something works in a real program. Sometimes it's nice just to be able to see a class (like the Java I/O classes) used in the context of a complete solution. From there, you can figure out how to start using the class in your own program. That's the real value of this book. I may conceptually understand what a class does, but it's sometimes hard to translate that knowledge into syntactically correct code. Seeing an example helps me get a grasp of how it is really used. For Notes/Domino 5 developers, this is an extremely useful book. Many Notes/Domino developers are used to using and sharing solutions that have already been coded and solved by others. This book will feel very natural to them. It allows you to get a core set of code working, and then from there you can expand to work into a complete coding solution. Conclusion Regardless of where you are at in your Java career, you should have this book. If you're a Java newbie, it will help you bridge the gap between reference manuals and real programs. If you're an experienced Java programmer, it will give you different perspectives on how a problem could be solved.
Rating:  Summary: Good to see how others would do something... Review: I'm very into a method of programming called "R&D"... that stands for "Rob And Duplicate". I'd rather not invent or reinvent something if I can "borrow" someone else's solution. Given that as my mindset, I LOVE this book! While the hardcore reference books are necessary, all too often the beleaguered developer is left asking for a simple example of how something works in a real program. Sometimes it's nice just to be able to see a class (like the Java I/O classes) used in the context of a complete solution. From there, you can figure out how to start using the class in your own program. That's the real value of this book. I may conceptually understand what a class does, but it's sometimes hard to translate that knowledge into syntactically correct code. Seeing an example helps me get a grasp of how it is really used. For Notes/Domino 5 developers, this is an extremely useful book. Many Notes/Domino developers are used to using and sharing solutions that have already been coded and solved by others. This book will feel very natural to them. It allows you to get a core set of code working, and then from there you can expand to work into a complete coding solution. Conclusion Regardless of where you are at in your Java career, you should have this book. If you're a Java newbie, it will help you bridge the gap between reference manuals and real programs. If you're an experienced Java programmer, it will give you different perspectives on how a problem could be solved.
Rating:  Summary: Invaluable reference guide Review: Ok, You've been writing Java code for months, maybe even a couple of years. Objects aren't anything special... they're just the natural way to do things. You don't even need to LOOK at the Servlet API anymore. You might even have a SCJP or SCWCD under your belt. Then, for the first time in years, it happens: you need to interact with a real, honest-to-god file sitting on the hard drive. Or parse a String into a Date object. And this time, you can't just throw the job at Tomcat or JDBC and let it do the dirty work for you. And to your absolute horror, you realize that you don't have the slightest clue in hell how to do it in Java. That's right... simple, trivial things like file i/o. Something stupid, like reading a text file into a String. After cursing Gosling and Sun for a half hour for not giving String a constructor that takes a File object as its argument and making things that should be trivially easy to do needlessly complicated [ok, all in unison... 'if ((foo != null) && (foo.equals("whatever")))', vs. 'if (foo == "whatever")' ...], it sinks in: You don't know how to do it. Well, OK, that's not quite fair. You have a general idea. Hell, you did it all the time in Perl and C++. You know it probably has something to do with java.io.File, and following the deprecation chain from java.util.Date will lead you to java.util.Calendar. But the devil's in the details, and trying to figure out how to do it from the javadocs alone isn't exactly the most efficient way to burn an afternoon. Especially since all the nice, convenient methods that let you ignore ugly things like character encoding were deprecated LONG ago. Ditto for date parsing. OK, so you dig out the old books you haven't touched in months, maybe years, on introductory Java. They ignore the topic completely. File I/O? Date parsing? Ewwwwwwww. That's *so* 20th century. Objects, Swing, and j2ee are SO much sexier and profitable to write about. What? You really DO need to soil your hands and do it? Well, you'll have to look elsewhere. That's where this book comes in. It covers all the non-glamourous stuff that 99% of the books on Java more or less ignore or gloss over. Things like I/O. Text handling. You get the idea. The stuff that everyone wants to just delegate to the servlet container or database, but occasionally you really DO need to deal with directly. There's not really anything in this book that you can't find online. But that's not the point... you can blow an hour or two scavenging the info and experimenting to make it work, or you can get the answer in 2 minutes with this book. Buy it. BEFORE you need it. You'll be glad you did.
Rating:  Summary: Practical Examples Beyond Basics Review: OK, you've learned the basics. You know 'public static void main string args' from a hole in th ground. What now? I teach Java at a college. Only a small percentage of my students are CS majors. Most introductory java books lack good practical problems to solve. The Java Cookbook is a list of common problems and code examples on how to solve them. I learned more in two days with this book than I did with several very good java books because I need to see examples and how things work in context. If you're like that too, you'll love this book. I pack it with my laptop so I'm never without it when I need it -- it's that useful to me!
|