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

Experienced Devs

3920 readers
3 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?

you are viewing a single comment's thread
view the rest of the comments
[–] RonSijm 1 points 3 months ago* (last edited 3 months ago)

I'm not completely sure which classes you're talking about - but it sounds like the Business Process Layer

I would call them “services” but I’m looking for a less overloaded term. Maybe capabilities? Controllers?

"Controllers" (in dotnet at least) is usually reserved for the class that initially intakes the http request after middleware (auth, modelbinding etc)

It's probably easier with a concrete example, so lets say the action is "Create User"

It depends on the rest of your architecture, but I usually start with a UserController - that takes all user related requests.

To make sure the Controller doesn't get super big with logic, it sends it though mediatr to a CreateUserCommandHandler

But it's a big vague which parts you're asking about..

"there is a class of … classes/modules that does the needful.".

Everything else you've described

"API resources, queue workers, repositories, clients" and serializers

Is "cross-cutting", "Data Access Layer", and "Service Agent Layer" maybe a bit "Anti-corruption Layer" - but there's a lot of other things in between that "do the needful"