Western Canada Software Symposium
September 28 - 30, 2007 - Calgary, Alberta
Scott Davis
Author of "Groovy Recipes"
Scott Davis is the founder of ThirstyHead.com, a training company that specializes in Groovy and Grails training.
Scott published one of the first public websites implemented in Grails in 2006 and has been actively working with the technology ever since. Author of the book Groovy Recipes: Greasing the Wheels of Java and two ongoing IBM developerWorks article series (Mastering Grails and in 2009, Practically Groovy), Scott writes extensively about how Groovy and Grails are the future of Java development.
Presentations
Groovy: The Next Generation of Java
This is the year of the dynamic scripting language. Ruby (and Rails) has won the hearts and minds of many independent software developers. JavaScript is experiencing a renaissance thanks to the wild success of AJAX and websites like Google Maps. And Groovy (JSR-241) brings the same level of excitement and "scripting goodness" to the Java platform.
In this presentation, we take a very pragmatic "prove it in code" approach to learning Groovy. Since the syntax is (almost) identical to Java, we can dive right in from the very beginning, learning the "syntactic sugar" as we solve real world problems.
You'll learn how easy it is to install Groovy and get started working with it. You'll tackle file I/O, reading and creating text files. You'll create and parse XML and HTML. You'll interact with databases. You'll create Groovlets (servlets sprinkled with Groovy-dust). And finally, you'll get a brief introduction to Grails (hint: the 'G' is silent).
Groovy and Java: The Integration Story
I'm attracted to Groovy because of its spirit of inclusiveness. Because it extends my platform of choice, not replaces it -- include a single JAR in your classpath and you are Groovy-enabled. Because it offers full bidirectional integration with Java. Because it offers a nearly flat learning curve for experienced Java developers. Come see how you can use Groovy to augment your existing Java codebase.
We'll look at calling Groovy from Java. We'll look at calling Java from Groovy. We'll look at compiling Groovy code, JARring it up, and deploying it alongside Java.
Groovy offers the same level of integration with Ant. We'll look at Ant tasks that allow you to include Groovy in your build process. Or maybe you'd prefer to use the Groovy AntBuilder and completely manage your build in code. The choice is yours. The important thing is Groovy works along side your familiar toolkit instead of forcing you to replace it.
Real World Grails
Scott Davis is the Editor in Chief of aboutGroovy.com. The website, in addition to being, umm, about Groovy, is implemented in Grails. This talk shows you how to get started with Grails, but also talks about the experience of using it in a live, production web site.
Grails is a fully integrated, modern Java web development stack. In a single zip file, it includes a web server (Jetty), a database (HSQLDB), a build system (GANT, a Groovy/Ant hybrid), a logging framework (Log4J), and a unit testing framework (JUnit). It also includes mainstream libraries like Spring for dependency injection, Hibernate for Object/Relational mapping, Quartz for scheduling, and SiteMesh for page layout. For Ajax, Grails allows you to choose between three major included technology stacks: Prototype/script.aculo.us, the Yahoo UI library, and Dojo. Coupling the power of these mainstream libraries with the ease-of-use that Groovy offers, you have an unprecedented collection of technologies that will have you up and running in record time.
Grails maximizes the strengths of these familiar Java libraries while minimizing the XML jockeying it usually takes to get them all to play nicely with one another. It brings "Convention over Configuration" to Java. It uses Groovy as the language to glue the pieces together, which means that experienced JEE developers can learn Groovy in the context of libraries that they are already familiar with.
It is no exaggeration to say that you will have your first Grails application up and running in minutes. But Grails is more than about a quick start. In this talk, we'll look at ways to move beyond the default configurations. We'll deploy a Grails app to an external Tomcat instance instead of the included Jetty server. We'll move from the default HSQLDB database to MySQL. We'll include external JARs to bring new functionality to the mix.
KEYNOTE: No, I Won't Tell You Which Web Framework to Use: or The Truth (with Jokes)
"Which framework should I use?" is the question most often heard on the No Fluff, Just Stuff tour. It's well worth asking. Unfortunately, there is no simple answer. After years on the tour, most speakers have crafted a response that would make any Washington politician proud -- long on style, but essentially, "Well, it depends..."
In this humorous keynote, Scott Davis turns to unconventional sources for enlightenment. Could best-sellers like Blink, Freakonomics, The Tipping Point, The Paradox of Choice, and The Wisdom of Crowds finally solve the puzzle? In this "Da Vinci Code"-like romp through the conventional wisdom of the day, will the Holy Grail of web frameworks be revealed? Probably not, but possible side effects may include nausea, dry mouth, and insight into the eternal question of our industry.
Mocking Web Services
In this talk, we'll survey the web services exposed by leading websites (Google, Yahoo, Amazon, eBay) and discuss how they can be easily mocked up for testing purposes and to aid offline development. You'll see working examples of RESTful, SOAP, and JSON web services, as well as strategies for unit and functional testing your asynchronous, service-oriented architecture.
As more software engineers add unit testing to their everyday development regime, the concept of mock objects is becoming increasingly popular. Mock objects proxy more complicated objects, fulfilling their doppelganger's interface and behavior for testing purposes. Coding to interfaces instead of implementations is a best practice that applies equally well to POJOs and Web Services.
Web Services, too, are being added to our toolkit with increasing frequency. Building a true service-oriented architecture brings with it new challenges: how do you code against an external service? If that service is metered, how do you develop iteratively without using up your production budget in tests? These questions and more are answered in this talk.
The Secrets of GORM
GORM (the Grails Object/Relational Mapper) is one of the many high points of the Grails web framework. GORM is a thin Groovy wrapper over Hibernate, but that doesn't begin to capture excitement of what GORM brings to the party. Imagine being able to call book.save() and book.delete() on your Book class; calling Book.get(1) to retrieve your book from the database by primary key; using Book.list() to pull an ArrayList of Book objects into your application. Now imagine getting all of that functionality (and more) for free with each new class you define. No interfaces to implement. No abstract classes to extend. Persistence that is transparent, automatic, and simple to use: GORM.
Querying your data via GORM is a case study in the benefits of using a dynamic language. Queries like Book.findByAuthorAndTitle("Scott Davis", "Groovy Recipes") rule the day. For the really hard stuff, you can always get back to a more traditional SQL-based interface. We'll also explore Query-By-Example.
GORM allows you to model your objects in the database in a variety of ways. In addition to supporting the usual 1:M, 1:1, and M:M relationships, GORM allows you to flatten the model, breaking traditional normalization rules. (Just don't tell your DBAs about it...) Come see how GORM handles HashMaps, Arrays, and ArrayLists in your Groovy objects.
GORM can auto-generate your database schema from existing POGOs, but recognizes that not all development is greenfield development. GORM allows you to map existing tables to objects and arbitrary field names to POGO attributes. We'll also see how to bypass Hibernate altogether using EJB3 annotations.
If you are a Hibernate developer, you owe it to yourself to see how GORM makes a good thing even better. If you are a Groovy/Grails developer, come see how to get the most of your friendly neighborhood persistence framework.
Advanced Grails
Many demonstrations of new technology focus on the shiny turnkey features -- "Look at what this thing magically does for you out of the box!" While Grails has many gee-whiz scaffolding features, it is a framework first. A framework should "make easy things easy and hard things possible." (Apologies to the Perl community for co-opting their battle cry.) This talk focuses on the hard things that are possible with Grails, but require just a bit of glue code to implement.
Grails does a great job making 1:M relationships turnkey. Relating two tables is as simple as adding a line of code to each class. The web scaffolding generates combo-boxes automagically. M:M relationships, on the other hand, require a bit of elbow grease. We'll explore 1:M and M:M in Grails and how to best present them via the web interface.
We'll also look at things like how to best handle file uploads, how to manage user authentication, and even how to incorporate a Captcha into your forms. None of these are impossible, but each requires just a few additional strategic lines of code to handle.
Books
by Scott Davis
-
Each recipe in Groovy Recipes begins with a concise code example for a quick start, followed by in-depth explanation in plain English. These recipes will get you to-to-speed in a Groovy environment quickly.
You'll see how to speed up nearly every aspect of the development process using Groovy. Groovy makes mundane file management tasks like copying and renaming files trivial. Reading and writing XML has never been easier with XmlParsers and XmlBuilders. Breathe new life into Arrays, Maps, and Lists with a number of convenience methods. But Groovy does more than just ease traditional Java development: it brings modern programming features to the Java platform like closures, duck-typing, and metaprogramming.
As an added bonus, this book also covers Grails. You'll be amazed at how quickly you can have a first-class web application up and running from ground zero. Grails includes everything you need in a single zip file⎯a web server (Jetty), a database (HSQLDB), Spring, Hibernate, even a Groovy version of Ant called GANT. We cover everything from getting a basic website in place to advanced features that take you beyond HTML into the world of Web Services: REST, JSON, Atom, Podcasting, and much much more.
-
Each recipe in Groovy Recipes begins with a concise code example for a quick start, followed by in-depth explanation in plain English. These recipes will get you to-to-speed in a Groovy environment quickly.
You'll see how to speed up nearly every aspect of the development process using Groovy. Groovy makes mundane file management tasks like copying and renaming files trivial. Reading and writing XML has never been easier with XmlParsers and XmlBuilders. Breathe new life into Arrays, Maps, and Lists with a number of convenience methods. But Groovy does more than just ease traditional Java development: it brings modern programming features to the Java platform like closures, duck-typing, and metaprogramming.
As an added bonus, this book also covers Grails. You'll be amazed at how quickly you can have a first-class web application up and running from ground zero. Grails includes everything you need in a single zip file⎯a web server (Jetty), a database (HSQLDB), Spring, Hibernate, even a Groovy version of Ant called GANT. We cover everything from getting a basic website in place to advanced features that take you beyond HTML into the world of Web Services: REST, JSON, Atom, Podcasting, and much much more.
by Scott Davis
-
There is a hidden revolution going on: geography is moving from niche to the mainstream. News reports routinely include maps and satellite images. More and more pieces of equipment cell phones, cars, computers now contain Global Positioning System (GPS) receivers. Many of the major database vendors have made geographic data types standard in their flagship products.
GIS for Web Developers introduces Geographic Information Systems (GIS) in simple terms and demonstrates hands-on uses. With this book, you'll explore popular websites like maps.google.com, see the technologies they use, and learn how to create your own. Written with the usual Pragmatic Bookshelf humor and real-world experience, GIS for Web Developers makes geographic programming concepts accessible to the common developer.
This book will demystify GIS and show you how to make GIS work for you. You'll learn the buzzwords and explore ways to geographically-enable your own applications. GIS is not a fundamentally difficult domain, but there is a barrier to entry because of the industry jargon. This book will show you how to "walk the walk" and "talk the talk" of a geographer.
You'll learn how to find the vast amounts of free geographic data that's out there and how to bring it all together. Although this data is free, it's scattered across the web on a variety of different sites, in a variety of incompatible formats. You'll see how to convert it among several popular formats including plain text, ESRI Shapefiles, and Geography Markup Language (GML).
With this book in hand, you'll become a real geographic programmer using the Java programming language. You'll find plenty of working code examples in Java using some of the many GIS-oriented applications and APIs. You'll be able to:
Find free sources of GIS data on the web Browse GIS data using open source desktop viewers Manipulate GIS data programmatically Store and retrieve data using geographically-enabled databases Explore free web toolkits like Google Maps Publish and consume web services using Open Geospatial Consortium (OGC) interfaces
-
There is a hidden revolution going on: geography is moving from niche to the mainstream. News reports routinely include maps and satellite images. More and more pieces of equipment cell phones, cars, computers now contain Global Positioning System (GPS) receivers. Many of the major database vendors have made geographic data types standard in their flagship products.
GIS for Web Developers introduces Geographic Information Systems (GIS) in simple terms and demonstrates hands-on uses. With this book, you'll explore popular websites like maps.google.com, see the technologies they use, and learn how to create your own. Written with the usual Pragmatic Bookshelf humor and real-world experience, GIS for Web Developers makes geographic programming concepts accessible to the common developer.
This book will demystify GIS and show you how to make GIS work for you. You'll learn the buzzwords and explore ways to geographically-enable your own applications. GIS is not a fundamentally difficult domain, but there is a barrier to entry because of the industry jargon. This book will show you how to "walk the walk" and "talk the talk" of a geographer.
You'll learn how to find the vast amounts of free geographic data that's out there and how to bring it all together. Although this data is free, it's scattered across the web on a variety of different sites, in a variety of incompatible formats. You'll see how to convert it among several popular formats including plain text, ESRI Shapefiles, and Geography Markup Language (GML).
With this book in hand, you'll become a real geographic programmer using the Java programming language. You'll find plenty of working code examples in Java using some of the many GIS-oriented applications and APIs. You'll be able to:
Find free sources of GIS data on the web Browse GIS data using open source desktop viewers Manipulate GIS data programmatically Store and retrieve data using geographically-enabled databases Explore free web toolkits like Google Maps Publish and consume web services using Open Geospatial Consortium (OGC) interfaces


