I'd like to use a subset of DDD's language in libcalibre that should make it easier to extend & maintain. With a better understanding of how libcalibre works (now that I've written (part of) it) comes the ability to write a better version.
- repos: how to write to the database. Entities that also have a table get a repo. Other operations are in the aggregates repo? I guess? Includes ways to store Book Files.
- dtos: requests to create new / update existing entities and aggregates.
- services: specifically for
Book, Author, LibraryFile (any file within the lib. root)
Stretch goals
- Remove Arc (Rc is a better choice, but not ref. counting is even better)
- Remove Mutex
- Make setup easier in
citadel-rs – creating (and destroying) 3-4 repos & 3-4 services is wild and mostly annoying. It 100% doesn't not need to do that, it can store the services.
- Remove
mut self's for services. It seems unnecessary
- Minimize
.clone() calls
- Prefer &str to String
- Create struct/types for BookId & AuthorId with parse_from and to_i32 impls (
book_${id} => id)
- High perf versions of read functions, e.g. only return IDs or support windows/pagination
- Filtering (
search(phrase, fields: &str[]) or similar pattern)
Book
Book aggregate (? or "entity"?) allows for CRUD-ing ("managing")
as well as
find_by_id/1
find_by_author/1
list_all/0
create/1, which accepts a minimal DTO
Author
Author entity supports CRUD operations for
I'd like to use a subset of DDD's language in
libcalibrethat should make it easier to extend & maintain. With a better understanding of howlibcalibreworks (now that I've written (part of) it) comes the ability to write a better version.Book,Author,LibraryFile(any file within the lib. root)Stretch goals
citadel-rs– creating (and destroying) 3-4 repos & 3-4 services is wild and mostly annoying. It 100% doesn't not need to do that, it can store the services.mutself's for services. It seems unnecessary.clone()callsbook_${id}=> id)search(phrase, fields: &str[])or similar pattern)Book
Bookaggregate (? or "entity"?) allows for CRUD-ing ("managing")update_linkswhich diffs, adds & removes)as well as
find_by_id/1find_by_author/1list_all/0create/1, which accepts a minimal DTOAuthor
Authorentity supports CRUD operations for