Appendix CAgile Approach Checklist for Console CRUD Applications

This appendix outlines an approach that can be used to break down a project and implement it in a stepwise and agile way. This will allow you to deliver demonstrable, testable code in small increments.

ASSUMPTIONS

Our applications are mainly concerned with creating, reading, updating, and deleting (CRUD) data to and from persistent storage (files or databases).

  • Our programs (even the simple ones) must be split into tiers or layers as practice for more complicated problems. This leads us to create projects with the following features:
    • Data transfer objects (DTOs), also known as domain objects (e.g., Address)
    • A data access object that handles storing data in memory and reading and writing data from persistent storage (e.g., AddressBookDao)
    • Some kind of user interface (e.g., the console)
    • Logic that orchestrates the objects in the program (this will be found in the controller)

REQUIREMENT STEPS

Step 1

Create user stories from the problem statement and/or requirements. For Address Book, they would be as follows:

  • Add an address
  • View an address
  • Delete an address
  • Edit an address
  • List all addresses
  • Show the number of addresses in the address book
  • Save to file
  • Read from file

DESIGN STEPS

Step 2

Analyze the problem statement and identify the required classes. For Address Book, we have the following:

Get Job Ready Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.