this post was submitted on 30 May 2024
1 points (100.0% liked)

Experienced Devs

3928 readers
1 users here now

A community for discussion amongst professional software developers.

Posts should be relevant to those well into their careers.

For those looking to break into the industry, are hustling for their first job, or have just started their career and are looking for advice, check out:

founded 1 year ago
MODERATORS
 

Somewhere between API resources, queue workers, repositories, clients and serializers there is a class of ... classes/modules that does the needful. Gun-to-my-head, I would call them "services" but I'm looking for a less overloaded term. Maybe capabilities? Controllers? Pick a term from the business domain? What do you call them?

top 10 comments
sorted by: hot top controversial new old
[–] [email protected] 0 points 3 months ago (1 children)

Stealing from "Domain Driven Design", I think calling them "domain objects" is appropriate.

[–] [email protected] 0 points 3 months ago

that's a good call actually. I got pretty hung up on domain objects being mostly data classes, but one approach is to have them perform business logic themselves.

[–] [email protected] 0 points 3 months ago

i call then the "domain".

[–] [email protected] 0 points 3 months ago* (last edited 3 months ago)

It's not that universal, but we have named a few things "Engines", for example Balancing Engine. We also use services, but they are actually independent programs that performs jobs. Engine are used in other places, such as the ViewModels, or in the services.

We put them in the DomainModel project which most things reference though. That's were most basic functionality and shared resources end up if they are used across Client/Service/Backend projects. So Domain / DomainModel might be a thing to use as well, if you want a specific namespace for that kind of use.

[–] [email protected] 0 points 3 months ago (1 children)
[–] [email protected] 0 points 3 months ago

(often abbreviated BS)

[–] [email protected] 0 points 3 months ago

We had a separate namespace called BusinessLayer, often abbreviated BL.

[–] [email protected] 0 points 3 months ago (1 children)

In respect to sitting above the API layer and turning DTO's to/from Domain Object's, I'd call them "Brokers".

[–] [email protected] 0 points 3 months ago

"broker" as a service-between-services is a great name

[–] [email protected] 0 points 3 months ago* (last edited 3 months ago)

We call that business logic layer “services” at work too, for lack of a better word, but I’ll be watching over this thread for better ideas…