diff options
author | xengineering <me@xengineering.eu> | 2024-10-23 18:17:44 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-10-23 18:17:44 +0200 |
commit | e8f52156bf07a7668fb434eadb0e22f3e7dad648 (patch) | |
tree | 90091ccce314bde3acb11202f1e1f6e1461aafaa | |
parent | 98d6bc5dda57146cdf26de4adc5b2cf747d81934 (diff) | |
download | ceres-e8f52156bf07a7668fb434eadb0e22f3e7dad648.tar ceres-e8f52156bf07a7668fb434eadb0e22f3e7dad648.tar.zst ceres-e8f52156bf07a7668fb434eadb0e22f3e7dad648.zip |
Explain package structure in README.md
-rw-r--r-- | README.md | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -36,6 +36,21 @@ go run --race ./... --examples The help page (`./ceres --help`) contains further details. +## Repository structure + +This repository uses an interpretation of the [Model-view-controller +pattern][3] to organize the code. The result is a set of three sub-packages of +the main `xengineering.eu/ceres` package. + +The `model` package contains the struct definitions for the handled data and +the code for [Object-relational mapping][5] to store the data in a SQL-based +database. Usually the common create, read, update and delete ([CRUD][6]) +functionalities are implemented as methods. + +The `controller` package contains all HTTP handlers used to modify the data +while the `view` package contains all HTTP handlers to display the data in any +formats. HTML templates are part of this package. + ## API definition for Semantic Versioning Ceres uses Semantic Versioning as defined by [semver.org][1]. This requires to @@ -50,4 +65,7 @@ As soon as version 1.0.0 is reached these aspects are stable. [1]: https://semver.org [2]: https://git-scm.com +[3]: https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller [4]: https://go.dev +[5]: https://en.wikipedia.org/wiki/Object%E2%80%93relational_mapping +[6]: https://en.wikipedia.org/wiki/Create,_read,_update_and_delete |