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.
How do you spot bad code? How do you turn it into good code? We'll be looking at code examples from real applications. We'll start by identifying the problem with the code: things like maintainability, clarity, and testability. Then we'll look for ways to improve that code: perhaps introducing base classes, perhaps other refactorings based on Gang of Four Patterns.
We'll examine a number of common patterns including Builder, Visitor, Chain of Responsibility, Proxy, and Strategy. This session will offer insight into how to spot the problem how to select the solution, and how to apply the changes to get your code nice and shiny!
Ever been envious of how easily Python, Ruby and even JavaScript can “meta-program”? It’s like magic: seemingly simple or innocuous code takes over big responsibilities; new methods and behaviors appear out of thin air. Your code, your primary code, stays simple and easy to follow. Now, we know you can do that for scripting languages, but what do we do about Java? With the proper component-focused context, it is possible to emulate many of those same capabilities, by applying a simple set of code transformations at runtime.
In this session you’ll learn about meta-programming and how it can apply to traditional Java. You’ll learn about the techniques needed to transform classes at runtime, adding new behaviors and addressing cross-cutting concerns. The presentation will discuss a new framework for this specific purpose, but also draw examples from the Apache Tapestry web framework, which itself is rich in meta-programming constructs.
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.