I have been working on a project recently which required the migration of a non-trivial application from a, circa 2000, web application built on Struts and JDBC, to a more modern layered architecture using Java Persistence API (JPA), the Spring framework and Wicket for the front-end. Rather than rewrite everything at once the client opted for a phased approach.