Architecture - gotonode/ohtu GitHub Wiki
This document outlines the architecture for our project.
Outline
Bookmarks Database is a Java console application used to save and list different bookmarks.
A bookmark can be of the following types (not all have been implemented yet): blogpost, video, article, book or podcast
Database in use is SQLite.
Testing will be done with JUnit, and we're also using Cucumber so that the customer can more easily review the testing processes.
Code coverage will be monitored by Codacy. Continous integration and testing will be handled by Travis.
Code style will be enforced by Checkstyle.
Classes and class dependencies
Package: main
Maincontains the starting point for the whole programAppcontains the actual app, responsible for running the logic loop and updating the user interface
Package: ui
UiControllerhas the responsibility of handling the console-based user-interface, as well as reading input from the user via either theConsoleIOorStubIOclass
Package: tools
Builderwill be used to construct various objects
Package: io
IOis an interface, implemented by the two classes belowConsoleIOwill be used in production, to print and read things from the actual consoleStubIOwill be used when testing the app, and doesn't rely on the console
Package: enums
Commandshouses all the commands that the user can choose in an enum
Package: domain
Bookmarkis an abstract class, extended by the classes belowBlogpostcontains, in addition to whatBookmarkcontains, an author and an URL
Package: database
Databasehandles opening the connection to the database, and returning it to the DAO classes
Package: dao
ObjectDaois an interface, implemented by the classes belowBookmarkDaohandles all bookmarks, regardless of typeBlogpostDaoonly handles objects of type Blogpost in and out of the database