Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)DD
d23dro @lemmy.sdf.org
Posts 0
Comments 1
What do you call application modules that are responsible for business logic?
  • I would call them “agents” at a class layer and encapsulate the logic specific to each domain in its own class. Completely arbitrary but in my mind: adapters - call other web services

    dao - database calls

    agent - responsible for stitching the pieces all together and doing the actual business logic.

    Example: OpenWeatherAdapter - call the OpenWeather API. No business logic. H2SelectDao - get user preferences from an internal database. No business logic.

    WeatherAgent(openWeatherAdapter, h2SelectDao) - All the business logic.

    Note: this is in context of a API service like a middleware.