- Taschenbuch: 341 Seiten
- Verlag: Manning; Auflage: Pap/Psc (26. September 2013)
- Sprache: Englisch
- ISBN-10: 1935182943
- ISBN-13: 978-1935182948
- Größe und/oder Gewicht: 18,7 x 1,9 x 23,5 cm
- Durchschnittliche Kundenbewertung: Schreiben Sie die erste Bewertung
- Amazon Bestseller-Rang: Nr. 144.283 in Fremdsprachige Bücher (Siehe Top 100 in Fremdsprachige Bücher)
Making Java Groovy (Englisch) Taschenbuch – 26. September 2013
Wird oft zusammen gekauft
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.
Über den Autor und weitere Mitwirkende
Ken Kousen is an independent consultant and trainer specialising in Spring, Hibernate, Groovy, and Grails. He holds numerous technical certifications, along with degrees in Mathematics, Mechanical and Aerospace Engineering, and Computer Science.
Welche anderen Artikel kaufen Kunden, nachdem sie diesen Artikel angesehen haben?
Die hilfreichsten Kundenrezensionen auf Amazon.com (beta)
Groovy is an object-oriented programming language that works on the Java platform and is intended to complement Java, not replace it. As Guillaume Laforge, the Groovy program manager, notes in his foreword to Kousen's book: "The idea [behind Groovy] was to empower users to be more productive by removing the boilerplate of Java, and to simplify their programming lives by giving them compelling and straightforward APIs [application programming interfaces] to work with."
Kousen emphasizes that, among other things, Groovy "adds new capabilities to existing Java classes." It uses Java libraries and makes working with XML and JSON easier. He notes that "the Groovy version of a Java class is almost always simpler and cleaner. Groovy is far less verbose and generally easier to read." Groovy also offers static and dynamic typing, operator overload, closures, and several other features.
Kousen's book is organized into three parts, with ten chapters and two appendices. The first part is titled "Up to Speed with Groovy." Its chapters focus on some long-time Java problems that Groovy addresses and simplifies, and present ways to use Groovy's features with Java. Kousen offers several Java examples and shows how their code can be made much shorter using Groovy. "Java historically hasn't played well with others [other programming languages]," he cautions. But he demonstrates how Java and Groovy can be integrated smoothly and solve several nagging Java shortcomings.
The book's second part highlights "Groovy Tools," with an emphasis on build processes and testing, "two of the major ways Groovy is often introduced into an organization...."
The third part, "Groovy in the Real World," spotlights "the sorts of challenges Java developers face on a regular basis" and how Groovy can help overcome them. Kousen starts with the Spring framework, "probably the most commonly used open source project in the Java world" and illustrates how "Spring and Groovy are old friends and work together beautifully." He also examines: (1) how Groovy interacts with persistent storage; (2) REST-ful web services, "with an emphasis on the JAX-RS 2.0 specification"; and (3) web application development.
The book's instructions for downloading and installing Groovy seem a bit sparse and are stuck near the back in Appendix A. But this is okay, since Making Java Groovy is not intended for beginning programmers. And writers usually don't like to pause a well-written introduction long enough to show how to install software for several operating systems. Following Kousen's instructions, I installed Groovy fairly easily on a Windows 7 PC, using a Windows EXE installer. He also mentions (too briefly) the Eclipse Marketplace. I used Marketplace and easily added the Groovy and Grails plug-in to Eclipse on a Linux computer.
"Groovy generates Java bytecodes that are interpreted by a Java virtual machine," Kousen states. "This means you have to have Java installed to install Groovy." And: "You need a full Java Development Kit (JDK) rather than a Java Runtime Environment (JRE)."
Appendix B, "Groovy by Feature," expands upon Chapter 2's "Groovy by Example" and seems oddly placed. Kousen explains: "While some people learn best through short, simple code examples illustrating each concept, others prefer to see basic concepts combined to solve actual problems." Appendix B "walks through most of the major features of Groovy and provides short snippets of code illustrating them." I think it would be better positioned as Chapter 3, because many readers can learn both "by feature" and "by example"--and one after the other would add good reinforcement.
But...Kousen's book definitely does a -- dare I say it? -- very groovy job of introducing the Groovy programming language to those who are comfortable with, and maybe even bored with, Java's quirks and fat boilerplate.
A part where the book becomes really interesting is also one of the areas where Groovy truly shines: unit testing. It shows you where you can leverage Groovy features to make writing unit tests a breeze. Also, the Spock framework is introduced and explained in a ready-to-use manner. Some interesting features of Groovy are covered nicely, such as mocking, stubbing and how you can use the dynamic features of Java to write an object on the fly by using the Expando class.
The last part of the book is filled with real-world use cases, ranging from integrating Groovy in Spring applications, using Groovy's Sql class to battle JDBC's exception hell and how Groovy has built-in support for object-relational mapping and NoSQL, to implementing RESTful webservices the right way. Especially the last item is very nicely explained and the book even goes the extra mile on showing you how you should implement hypermedia concepts such as transitional and structural links. To me, this part alone was enough reason to justify buying the book.
However, if you're looking for a book that will show you how you can replace Java, you're looking in the wrong place. The book emphasizes the use of Java's extensive libraries and how you can leverage Groovy to add some productive 'zing' to your code. It's all about polyglot programming, where Java and Groovy both deserve equal attention.
To conclude: the book is very well written with plenty of code examples, showing you clearly how you can integrate Groovy features in Java projects. It delivers on it says it will deliver, which is showing you that Groovy and Java are a great match. All examples have real-world applications and can be easily adapted into any use case. The writing style is clear, to the point and is augmented with a little joke here and there. It's a must read for every Java developer out there who wants to use Groovy to become more productive. After reading this, it's even more apparent to me that Groovy should be in every developer's toolbox, and this book should be on every developer's bookshelf. If you weren't using Groovy before reading this book, you will be after you finish it.
Well, I must admit I was at least partly wrong, as demonstrated with maestria by Ken Kousen in his masterpiece "Making Java Groovy". Ken has chosen a clearly defined scope for his book, sticks to it and the result is almost perfect : well written, structured, concise and insightful. The style is entertaining and the examples are very illustrative. I concur with other reviewers that this is one of the best books about a programming language that I have read in recent years ("Programming in Scala", by Odersky, Spoon and Venners being another gem of the same vein, although different in style and purpose). Ken Kousen shows clearly and convincingly how Groovy can aptly complement Java and gracefully coexist with it. In passing, it becomes also clear that Groovy can replace Java in many respects but this is *not* the author's purpose. Instead, he underscores how (and when) to use Groovy for development or tooling while capitalizing on the many libraries Java has already to offer.
Looking at the Table of Contents, one might have the impression that the sequence of topics is a bit unusual but, as explained by the author, it really makes sense and makes the whole crystal-clear. The whole software development lifecycle is covered, from design to builds to testing and packaging. Each time, just the right amount of information is given and the main points are stressed. Although the book is in many ways self-sufficient, it also provides a number of pointers to other books or Internet resources which will provide more information about a given topic. Also, for a number of topics, Ken provides several approaches, exposed in a very progressive way and without claiming that one is better than the others. On the contrary, he sketches scenario's where one might be more appropriate or less intrusive than the other. All in all, a very good and pragmatic book on a vast but practical topic. Highly recommended for Java as well as for candidate Groovy developers or testers !
Kousen has done an outstanding job structuring this book to allow experienced Java developers to become proficient in Groovy very quickly. When I first picked this book up, I figured I'd skim a few chapters, skip to several of the "hands on" programming examples to quickly get up to speed and just drop the book and move on my merry way.
Well, as soon as I started, I was quickly pulled into reading mode rather than skimming, and Ken's organization of the topics and chapters were exactly the structure I needed to get up and running in very short order. There was no extraneous text that I needed to skip to get to get good stuff. The author does provide a very short background to provide context as to the shortcomings in Java for which Groovy is meant to provide relief.
But as soon as that is done, he drops you right into two pertinent solutions which are solving problems that closely resemble ones you will most likely come across when using Groovy. The first one is fairly simple and the second one is quite in-depth using many facets: web services consumption, xml processing, database access, server side. When I first saw what the second example was attempting to accomplish, I was concerned we jumped way into the deep end too quickly, but then as I read forward the solution was done significantly less code and effort than I would have anticipated -- a testament to both Groovy and the author.
Moving forward, the book will put you through the paces with interaction of Groovy and Java, Build processes, Testing, Spring framework with Groovy, database access, REST web services and web application building and testing.
As an added bonus, the book has a VERY handy “Groovy by Feature” section in its appendix, to help you have a quick and dirty simple lookup on how to do nearly almost all the typical coding patterns available to you in Groovy. This helped me very much on the first several Groovy solutions I coded upon completing this book.
Now that I’m done reading this book and coding my own Groovy solutions, I continue to keep the book close and handy, especially for the “Groovy by Feature” section.
I can’t recommend this book enough. If you are a Java programmer, you really need to learn Groovy and this is the perfect book to get you up and coding quickly.
This book covers every aspect of programming covering lots things in development, build process and testing using lots of use cases that will interest you. The books repository on Github maintains the source code used in book. Most of the time, I tried to work on the development part on my own and only referred to the source code in the book in case I was stuck or was lacking any ideas to complete the code.
The book attempts not to critique Java and evangelize Groovy. Neither it tries to get his readers abandon Java and start using Groovy for all their work. Instead the book attempts toward making Java easier and the developer more efficient.
Before reading the book, I knew that Groovy is a language that runs on JVM and is very close in syntax to Java and therefore is easy to learn. But after reading the book, I know that Groovy is not only easy to learn but also make Java easy to develop. For eg: I have worked extensively on Java and I know the pain it is to work with XMLs. Groovy makes working with XML easier. Groovy adds new capabilities to existing Java classes which makes it possible to write a better and cleaner code in Groovy avoiding all the boiler-plate that Java is infamous for.
The book is divided into three parts: Part 1 is called Upto Speed with Groovy has a four chapters and is a great start for anyone who has never worked on Groovy before. Part 2 is called Groovy Tools that covers Build Proces and Testing. Part 3 is called Groovy in the Real World which deals with integrating Groovy with Spring Framework, Database access, RESTful web services and Building and testing Web applications using Groovlet and Grails.
Though the book is not written for complete beginners in Groovy but the book will be liked by beginners as well as it is essentially Groovy in Practice with a better name. :)
I would highly recommend this book to anyone who needs to work on Groovy.