Skip to content

Where should Service Objects go? #209

Answered by ellmetha
nanobeep asked this question in Q&A
Discussion options

You must be logged in to vote

Hey! 👋

Thanks for the kind words! 😊

This is an excellent question. Presently there are no real conventions around this, and Marten projects can choose to to define service objects however they want! I am not opinionated regarding this aspect personally; if I had to define service objects in a Marten project, I would probably create a services folder under each application and define service abstraction under those.

An example for a project containing the default application only:

myproject/
├── config/
├── spec/
├── src
│   ├── assets/
│   ├── emails/
│   ├── handlers/
│   ├── migrations/
│   ├── models/
│   ├── schemas/
│   ├── services/
│   │   ├── object_creator.cr
│   │   └── event_no…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nanobeep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants