2021-03-14 12:01:23 +00:00
|
|
|
#+TITLE: service-pattern
|
|
|
|
#+Author: Yann Esposito
|
|
|
|
#+Date: [2021-03-14]
|
|
|
|
|
|
|
|
- tags :: programming
|
|
|
|
- source ::
|
2021-03-14 12:03:39 +00:00
|
|
|
|
|
|
|
The question about code structure and organization is one of the most
|
|
|
|
prolific one.
|
|
|
|
The problem are always the same.
|
|
|
|
|
|
|
|
Here I will talk about one possible solution in this huge design space.
|
2021-03-14 12:05:19 +00:00
|
|
|
First of all, I will focus on a functional programming pattern.
|
2021-03-14 12:06:46 +00:00
|
|
|
But I think the lessons could be extended to any generic programming
|
|
|
|
language.
|
|
|
|
|
|
|
|
Before explaining the pattern I would like to take the time to provide a
|
|
|
|
few distinctions between different programming language patterns.
|
2021-03-14 12:07:52 +00:00
|
|
|
Quite often, one fundamental question very important when choosing a
|
|
|
|
pattern for your code is about find the the correct level of the pattern.
|
|
|
|
|
|
|
|
There are a tower of patterns and meta-patterns.
|
|
|
|
For example in imperative programming not using =goto= statement was
|
|
|
|
considered as a programming pattern.
|