Howard Lewis Ship

Creator of Apache Tapestry

Howard Lewis Ship is the original creator of the Apache Tapestry project, and is a noted expert on Java framework design and developer productivity. He has over twenty years of full-time software development under his belt, with over fifteen years of Java. He cut his teeth writing customer support software for Stratus Computer, but eventually traded PL/1 for Objective-C and NeXTSTEP before settling into Java.

Howard has been developing financial and e-commerce applications in 100% Clojure since 2012.

Howard currently works for Wal-Mart's Global E-Commerce division. He lives in Portland, Oregon with his wife Suzanne, and his children, Jacob and Olivia.

Presentations

Call it “single page” or “rich client”, but modern web applications have advanced far beyond the “click this link and wait for the page to render” approach. Clients demand that pages react immediately to the user: no waiting allowed. Frameworks like jQuery and Backbone may let you manage the DOM and respond to events … but AngularJS goes far past that: it lets you seamlessly marry your data objects, controllers, and the UI together gracefully and naturally … or create your own HTML elements or attributes as needed. Rather than work with HTML the way the W3C provides it, you can create the markup you want.

AngularJS, by Google, describes itself as a “Superheroic JavaScript MVW Framework” (that's “Model-View-Whatever”). AngularJS is about freedom: freedom from the annoyances related to working directly with the DOM (even through a layer of jQuery or Backbone), and freedom to define your own HTML vocabulary and make it Just Work. It reworks HTML to make dynamic views normal and natural, and was designed with interoperability, extensibility, and testability as top priorities.

We'll cover the basics of setting up a page with AngularJS and delve into its core concepts: templates, bindings, scopes, controllers, routing, partial templates, and its dependency injection framework. From there we'll discuss communication with the server as well as how to extend AngularJS.

Follow the trends and you'll notice that, increasingly, web applications are running in the browser. That can be great news … until you have to write the JavaScript for all that client-side behavior. Fortunately, a new breed of client-side MVC frameworks have emerged, including Backbone.js. You still have controllers, models, and views … just in the browser.

Backbone might seem familiar, especially to Rails developers: it has the models, controllers, and views you'd expect in a server-side framework … but it all runs in place, inside the browser. The server ends up as the source & sink of data. We'll investigate the basics of using Backbone, how to create dynamic, interactive views, and how to get and save data. We'll see how concise and readable the JavaScript can be, especially when using CoffeeScript. Much of the complexity of modern web applications simply falls away when all rendering and client logic moves to the browser … as long as you have a proper backbone to hang that logic on.

Clojure is not just a language; it's a tool at the center of a large and growing ecosystem of tools, books, documentation, and libraries. If you want to be effective with Clojure from Day One you'll want to know about what's out there and how to best use it.

Clojure's threadbare home page belies a critical fact: there are some amazing tools, books, libraries, documentation, and other resources out there to make you effective in this excellent language from Day One. In this talk we'll cover a few of the most important ones:

  • The Leiningen build tool
  • Clojars: the central repository for Clojure libraries
  • Cursive: the super-productive development environment built on IntelliJ
  • The best Clojure web sites and books

We'll cover how to get a project started, the best way to write and debug your code, and even how to publish your new library for others to use … and where to turn when you hit a stumbling block.

A brief introduction to the Clojure programming language: combining the best features from 40 years of Lisp heritage with the familiarity, performance, and ubiquity of Java and the Java virtual machine.

Maybe you've heard the buzz around Clojure. It's Lisp for the JVM (what does that even mean?). It has immutable data structures (why would you want that?) It has agents and software transactional memory (what does that buy me?). At first glance, it's just a jumble of new concepts and confusing choices wrapped in a vastly unfamiliar syntax. Despite that a lot of heavy hitters are embracing this little language that's breaking all the rules, leaving Java and Ruby behind and never looking back. This talk is an introduction to the language, focusing on the syntax (quite minimal, that's half the point), the basic data structures and core functions, the concurrency support, and the interoperability with Java. You'll get a feel for why people quickly learn to love this language, embracing 40 years of elegance from the Lisp side, combined with the ubiquity and performance of the Java virtual machine.

Clojure is an elegant language … concise, and expressive, without going overboard (I'm looking at you Haskell!). Weaving together the language itself, the immutable collection types, the carefully crafted mutable reference types, lazy evaluation, and the macro capabilities, results in a pretty comprehensive set of tools that can be applied to your hardest, and most interesting, problems.

Clojure is all about creating a sane and scalable approach to dealing with complex problems … including dealing with concurrency, which normally makes even the simplest programs complex. Combining immutable collections with well-defined reference types (mutable slots with well defined concurrent behavior) gives Clojure a leg up on solving challenging and interesting problems. Of course, part of the point of Clojure is full interoperation with Java; we'll see how easily Clojure functions and Java objects can work together. At the other end of the spectrum, we'll see how Clojure macros allow you to add new language features to Clojure … in Clojure itself!

Over the last few years, JavaScript has gained popularity with ever increasing speed. It has gone from being the “Red Headed Stepchild” of programming languages (as described by its creator, Brendan Eich), coded in ten days flat, and now ubiquitous in browsers, on servers, and inside smart phones. JavaScript fluency is increasingly essential for anyone doing anything for the web, yet for all the advances in adoption, JavaScript is full of syntactic and behavior weirdness … full of hidden gotchas, odd special cases, and counter intuitive idioms.

CoffeeScript is “a little language that compiles into JavaScript” . CoffeeScript syntax is pragmatic and elegant, borrowing ideas from Ruby, Python, and elsewhere. CoffeeScript tackles the problems in JavaScript, but leaves its roots intact. The end result is a language that is elegant, readable and something you'll look forward to coding in.

Sure, Google and many others have proven that you can accomplish amazing things in JavaScript: but that doesn't make the language any prettier, or any easier to code in. Ordinary JavaScript leaves you open to any number of trivial coding errors that can cause you lots of grief at runtime; a missing comma, an extra newline, and suddenly your code does something completely wrong.

CoffeeScript grafts a new syntax onto JavaScript that works better with JavaScript's fundamentally functional nature, such as list comprehensions, function binding and destructuring assignment. It also adds features that really quickly become dear to you, such as string interpolation, heredocs (multi-line strings), extended regular expressions, and a proper class system.

CoffeeScript also includes a fair number of wonderful heresies … such as jettisoning the curly braces of the C language world in exchange for Python-style indentation. In CoffeeScript, every statement (even an if … then) is an expression whose result can be stored, and every function returns a value.

Despite all these features; CoffeeScript is fully interoperable with JavaScript, so you can easily use it with jQuery, Underscore, or whatever other frameworks you have cooking: browser-side or server-side. And for all the cool stuff it adds, the mapping to JavaScript is close enough that debugging is not a great challenge.

Whether you dabble in a bit of client-side logic or are hip deep in NodeJS, you owe it to yourself to take a peek at this elegant language that lets you keep what you like about JavaScript and improves on everything that makes you want to pull your hair out!

Imagine the perfect database: it would be easy to code against, without using or needing an ORM (such as Hibernate). It would be easy to setup, and easy to test against. It would be flexible enough for you change your mind about how data is stored … even after your application is in production. It would be fast, and scale from tiny applications to massive ones. It would be ACID. It would be deployable in the cloud. And it would never forget anything. That's Datomic, the database that stands to change everything.

Datomic is a new product from Relevence (it is not open source, but has a limited Free edition). Datomic is implemented in Clojure, but has a Java API as well as a REST web interface.

Datomic challenges you to rethink what your database is: not a scratchpad of rows and columns, but a set of entities and facts about those entities. Datomic side-steps the challenges of object/relational mapping by being data oriented (not rows and columns, and not objects).

Datomic breaks the traditional ties between identity and state: where a traditional database updates rows in place, and loses those prior values, Datomic records new facts about entities. Since updates occur inside transactions, it is possible to query the database as it existed in the past, or even query the database about how entities have changed over time.

Complete SQL queries got you down? Datomic uses the awesome Datalog logic programming language instead. Worried about scaling? Datomic shifts the cost of queries from the database to the clients (or “peers”) and its data model is amazingly cache friendly. Concerned about data changing during queries? Don't be … in Datomic the database is a value, consistent to a specific moment in time, even as changes occur later. Datomic understand time in a way traditional databases simply can not. Can't figure out how to efficiently implement inheritance? Datomic is about data not objects; any entity can have any attributes you application wants, so inheritance has no meaning.

Free your mind from what databases are and come see what databases should be. It's easy to set up, easy to get going … and hard to go back to anything else, SQL or otherwise.

Clojure's standard library is packed to the gills with essential functions and macros, and more cool ideas than you can shake a stick at including: concurrency, rich data types, interoperation with Java, and even extending the Clojure language … in Clojure!

Clojure's standard library can be overwhelming … there's just so much in there … over 600 functions, macros, and symbols. Fortunately, you don't need to know every single one (or even most of them) but there's a number of essentials you'll want to master early.

Concurrency: Clojure's concurrency types, combined with immutable data types, removes the teeth gnashing and uncertainty from working with lots of threads that share data. We'll discuss how and when to use Atoms, Agents, and Vars.

Threading Macros: Still think there's too many parenthesis in Clojure? The threading macros (->, -», and friends) let you organize your code into concise, readable flows where you can see exactly what's happening at each step … and often avoid a few levels of parentheses and nesting along the way.

Java Interop: Some say Clojure is a better language for invoking Java methods than Java is.

Records, Types, and Protocols: Sometimes a basic Clojure map doesn't fit the bill; Defining Records and Types and implementing Protocols lets you keep the efficiency of Java without sacrificing the elegance of Clojure.

Macros: So Clojure doesn't quite do what you want? Well, you can change Clojure to fit your needs: and macros are the way you do that. Macros are simultaneously: clever, invaluable, over-used, and a double-edged sword … but you won't want to work in a language without them ever again!

Apache Tapestry is a fast, easy to use, high-performance, general purpose web framework. Tapestry eschews heavy XML configuration, base classes, and boilerplate code: instead it embraces convention-over-configuration, letting you build your application from simple, concise POJO (Plain Old Java) page and component classes. Tapestry is laser-focused on giving you maximum bang for your programming buck, and this shows up as a broad range of well-integrated features, including extensive Ajax support. Don't let unfamiliarity get in the way of learning this powerful, friendly tool.

Tapestry is different from traditional action-oriented frameworks, such as Struts and SpringMVC, because it is component-based: it organizes the overall application into pages, and builds pages from reusable components. Tapestry leverages this overall map of the application to take over many responsibilities normally tossed in the developer's lap, such as building and dispatching on URLs, and managing server-side state.

Tapestry is very easy to get started with: a few seconds using Maven and you'll have a template project ready to customize. In this session, we'll start with that template, add in some database support, and have a somewhat polished application that includes client-side and server-side input validation and basic Ajax support. Along the way we'll learn a bit about what Tapestry is doing under the covers to support you as a developer: obsessive attention to exception reporting, live reloading of classes, the ease with which reusable components can be created, and lots of meta-programming. We'll also touch on what makes Tapestry great in production: its terrific performance, its approach to organizing and deploying JavaScript, and how it exposes other assets to the client in a scalable, efficient way.

If you're of an, ahem, certain age, you may remember the joy of text adventures: adventure games powered by prose and the player's imagination. The days of “Zork” and “Planetfall” and commercially available text adventures are long gone … but the concept, now known as “Interactive Fiction”, has been reborn around modern tools and a modern community. Where games of the past were simple dungeon romps and puzzle quests, modern games are an interactive equivalent of the short story, complete with characters, conversations, and carefully crafted plots … and lots of room for imagination and “thinking outside the box”.

This session will get you started with the basics of Inform 7: a free, integrated development environment for authoring interactive fiction. You'll see how easy it is to create rooms to visit, objects to examine and manipulate, rules to manage your world, puzzles to solve … even other characters to interact with. Inform 7 is a great way for writers to learn about programming, and programmers to learn about writing … and also a great way to create games if you can write and code, but not draw!

If you've done a cursory look at Gradle, you might think “that would be nice, but we're stuck on Maven.” Well, you aren't, and you shouldn't be layering on the technical debt by staying with Maven. Moving from Maven to Gradle is quite reasonable; we'll cover the basic process, as well as some key pitfalls to avoid.

Maven is well known as a tool with some great core ideas, and an implementation that causes quite a few developers to froth at the mouth. Until recently, we all just had to grin and bear it … but now there's Gradle, which keeps the best ideas from Maven, discards the rest, and comes up with something that's fast, reliable, and scalable.

If you think you're wedded to Maven … you're not. Moving from Maven to Gradle isn't automatic, but it doesn't have to be painful, either. We'll cover the basic process, as well as the pitfalls and how to avoid them.

We're all increasingly in the business of writing richly interactive applications using HTML and JavaScript … that's a given. But the devil's in the details, and most applications get those details wrong. Building visually attractive applications that work in all browsers takes a lot of work … and good as jQuery is, as more logic moves to the browser, something as sophisticated as jQuery is needed for data, not DOM, and that's Underscore.

Applications are moving from the server into the browser, and that can be a
good, and rewarding, thing … but compared to the rich infrastructure available
to any Java program, what's available to JavaScript running in the browser is
pretty anemic. jQuery is great at manipulating the DOM, but rich client
applications do a lot more than that, and too often, this leads to lots of code
and lots of bugs.

Underscore is your client-side infrastructure: a set of unobtrusive functional
programming tools that can make your JavaScript slick, performant, readable
… and compatible with older browsers.

However, Underscore doesn't make your application look pretty: that's the job of
Twitter's Bootstrap: a standard set of CSS rules that give your applications a
modern “Web 2.0” look and feel. Bootstrap is developed by experts to look good
across all the major browsers. We'll dive into how to use Bootstrap: how to get
good looking results up quickly, how all the CSS classes work together, and how
to get even better results using the bundled jQuery plugins.

Spock is a fabulous new testing framework for the JVM. Spock leverages all the DSL power of the Groovy language to make testing a breeze. Spock tests are concise and readable, with excellent support for error reporting and for mock object creation. Spock removes much of the pain from test driven development!

Spock is a testing DSL (Domain Specific Language) that transforms the Groovy programming language into a language specifically targeting testing. Spock can be used to test Java, Groovy, or any JVM language.

In Spock, classes are test specifications; methods of those classes are used to describe expected features of the system under specification. Each feature method is broken up into blocks that specify a stimulus (such as invoking a method) and a response (the behavior or state from that method invocation). Spock keeps you honest about what kind of code can appear in each block, and the end result is a highly readable, highly maintainable test.

Spock also has first class support for mock-object testing, and the Spock DSL uses an elegant and obvious syntax to specify how the mock objects interact with the system under specification. Rolled together, Spock is a formidable tool … and makes using any other testing framework a highly illogical choice.

If you build web applications and cringe at the phrase “but how are we going to test it?” you're going to love Geb: the browser automation and testing tool. Geb is a Groovy framework for testing web applications: it builds on Selenium, but draws ideas from jQuery and elsewhere to make it productive and fun to test your applications in-browser.

Geb is rich with ideas to keep your tests clear, concise and maintainable. It is useful in all major testing frameworks: JUnit, TestNG, and Spock. We'll see how to navigate around the browser, clicking links, submitting forms, and verifying results. We'll also see Geb Pages and Modules, which allow you to define elements inside a page once, and reference them across many tests. Basically, Geb removes the excuses for not testing your web application, and that's a great thing!

Books

Tapestry in Action (In Action series)

by Howard M. Lewis Ship

  • The creator of Tapestry details how to use this new framework's components to create rich web-based GUIs using links, images, and HTML forms. The challenges of web application development are discussed, such as managing server-side state properly, application localization, and maintaining synchronization between the client web browser and the application server. At the same time, the benefits of a clean separation between presentation logic and business logic and how well Tapestry succeeds in keeping these two concerns apart are identified. Written for new Tapestry users and even developers new to creating web applications in general, this guide includes extensive notes on development ""gotchas,"" including common Tapestry errors and how to fix them. Advanced techniques are covered as well, including creating entirely new components, integration with traditional servlet and JSP applications, and creation of client-side JavaScript. Finally, a complete J2EE application, the Virtual Library, is presented and analyzed in detail.