Moving the data access logic into a DAO class making the core logic unit testable without requiring a server