A Design Pattern is a solution which experienced software developers have been using over the years when they have to solve a given type of problem. The most popular book covering the fundamental Design Patterns is:
Useful design patterns include:
- creational patterns like Abstract factory and Singleton,
- structural patterns like Adapter (or Façade) and Composite and
- behavioral patterns like Observer and Strategy
We will implement an event database using our knowledge of object-oriented programming and design patterns.
The domain logic of the web application is:
Implement the following:
- User domainlogic class with its unit test
- Event domainlogic class with its unit test
- Repository domainlogic class with its unit test (together with helper classes if needed)
The persistence layer of the application is based on the Strategy design pattern. Implement:
- The Database and the Engine interface (its concrete classes will be implemented later…)
- InMemoryEngine which manages data in memory.
- Create a main menu as well as functionality to show all events
- Show events for a specific period
- Show events by keyword
- Show events falling on a specific date
- Create a new event (not really useful because we are using an in memory database…)
- Consequently, replace the in memory database engine by a MySQL database engine.