You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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")
title
authors associated to a Book (update_links which diffs, adds & removes)
which series this book belongs to (add if missing; replace otherwise)
series position
external identifiers
tags
publication date
language
publisher
HTML description
book cover image (replace by file @ path), and
different format files (e.g. .epub, .kepub, and .mobi).
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
name
link
...associated book? that seems like a mistake
The text was updated successfully, but these errors were encountered:
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 howlibcalibre
works (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.mut
self's for services. It seems unnecessary.clone()
callsbook_${id}
=> id)search(phrase, fields: &str[])
or similar pattern)Book
Book
aggregate (? or "entity"?) allows for CRUD-ing ("managing")update_links
which diffs, adds & removes)as well as
find_by_id/1
find_by_author/1
list_all/0
create/1
, which accepts a minimal DTOAuthor
Author
entity supports CRUD operations forThe text was updated successfully, but these errors were encountered: