Tackling a Problem with a Familiar Pattern

Learn about the different template patterns.

Before going into specific solutions, it’s important to recognize a key trait of the Spring portfolio. And that’s reducing Java complexity. In fact, that very expression was Rod Johnson’s message at the Spring Experience conference in 2008.

Template patterns

First and foremost, Spring was designed to simplify the way we build apps. One of the most powerful mechanisms available is the template pattern. It’s so powerful that it’s even included in the Gang of Four’s famous Design Patterns book.

JdbcTemplate

In essence, a template is meant to reduce the complexity of a particular API into its most simple operations. A good example is the JdbcTemplate. JDBC (Java™ EE Database Connectivity) has a long history of people writing queries, managing connections, and debugging the queries once 200 have been written.

Get hands-on with 1200+ tech skills courses.