Groovy provides excellent facilities for parsing and creating XML. As well as providing syntactic sugar on top of traditional Java-based parsing approaches (e.g. SAX, DOM, StAX), it has its own XmlParser and XmlSlurper libraries which support XPath-like expressions at the object level (akin to LINQ in the .Net world). In addition, Groovy's markup builders provide an elegant and efficient way to create and modify XML. Groovy also has various options available for SOAP and RESTful web services. We'll examine the most popular of these.
We'll cover: * Reading, creating and updating XML using various approaches including the pros and cons of the various parsers and markup builders * dealing with XML namespaces and XPath * using other XML frameworks: XOM, Dom4j, JDom * integrating with XSLT, XQuery and validators * treating non-XML like XML * GroovySOAP, GroovyWS and Spring web services * JAXB, XmlBeans, CXF and Axis2 for SOAP web services * XML-RPC and RESTful options, RSS, ATOM * trade-offs using Apache Xerces or with native XML support on 1.4 through to 1.7 JVMs * Testing Web services with SoapUI * A quick look at Groovy integration in common XML/web-service tools * Groovy use in web service related products including ESBs and SOA frameworks
You've used Groovy to quickly hack together some short scripts or a simple Grails app. Now you want to treat it more seriously and apply best practices and tools. For Java you'd look at style and coverage checkers, JavaDoc, dependency injection, mocking, testing and build frameworks. For Groovy you have EasyB, Cobertura, CodeNarc, Simian, GroovyDoc, Hudson, Ant, Maven, Gant, Gradle, Spring, Guice, Spock, GMock and more. The talk is packed full of tips and examples for these and other tools.
We'll examine these tools: * EasyB: for writing acceptance tests * Cobertura: for checking code coverage * CodeNarc: for checking code style * Simian: for checking code duplication * GroovyDoc: for writing documentation * Hudson: for CI builds * Maven/Ant/Gant/Gradle: for build files * Spring/Guice: for dependency injection * GroovyMock/Spock: for mocking and testing * OSGi: for writing bundles
Developer practices for traditional and agile Java development are well understood and documented. But dynamic languages (Groovy, Ruby, and others) change the ground rules. Many of the common practices, refactoring techniques, and design patterns we have been taught either no longer apply or should be applied differently and some new techniques also come into play. In this talk, we'll relearn how to do agile development with dynamic languages.
This talk looks at using Groovy for multi-threaded, concurrent and grid computing. It covers everything from using processes, multiple threads, the concurrency libraries ear-marked for Java 7, functional programming, actors including GParallelizer, as well as map reduce, grid and cloud computing frameworks. We'll look at leveraging Java techniques as well as Groovy specific approaches.
Testing can be a complex and thankless task. The technologies change so fast that your tools don't work as they should or you have to write lots of low-level boiler-plate code that is obsolete almost as soon as it's written. Your tests are brittle and hard to relate to customer requirements - you aren't even sure that you are testing the right things. Let's explore some techniques and tools for easing some of these burdens and try to move testing from tedious and hard to easier and fun!
We quickly sample a flavor of many techniques and tools including these topics: * Using Easyb for BDD flavored acceptance tests * developer testing using JUnit 4, TestNG, Instinct, Spock and GMock * writing domain specific testing languages (testing DSLs) * testing web applications with WebTest, Tellurium, Selenium and WebDriver * testing RESTful and SOAP flavored web services * testing databases with DbUnit * testing rich clients and GUIs with FEST * performance testing with JMeter * leveraging AllPairs, All combinations and other testing techniques * model driven testing
Groovy, the brand-new language for the Java platform, brings to Java many of the features that have made Ruby popular. Groovy in Action is a comprehensive guide to Groovy programming, introducing Java developers to the new dynamic features that Groovy provides. To bring you Groovy in Action, Manning again went to the source by working with a team of expert authors including both members and the Manager of the Groovy Project team. The result is the true definitive guide to the new Groovy language.
Groovy in Action introduces Groovy by example, presenting lots of reusable code while explaining the underlying concepts. Java developers new to Groovy find a smooth transition into the dynamic programming world. Groovy experts gain a solid reference that challenges them to explore Groovy deeply and creatively.
Because Groovy is so new, most readers will be learning it from scratch. Groovy in Action quickly moves through the Groovy basics, including:
Readers are presented with rich and detailed examples illustrating Groovy's enhancements to Java, including
Groovy in Action then demonstrates how to Integrate Groovy with XML, and provides,
An additional bonus is a chapter dedicated to Grails, the Groovy Web Application Framework.
Early PDF chapters of Groovy in Action are available from the Manning Early Access Program (MEAP) at http://www.manning.com/koenig. As part of this program, readers can also discuss the early manuscript with the author and help shape the manuscript as it's being developed by joining the Author Forum.