You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+51-46Lines changed: 51 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,19 +11,18 @@
11
11
12
12
## 📚 Table of Contents <!-- omit from toc -->
13
13
14
-
-[Supported Ruby and Rails](#supported-ruby-and-rails)
15
14
-[Introduction](#introduction)
16
15
-[Installation](#installation)
17
-
-[The Mental Model](#the-mental-model)
18
16
-[The Basic Structure](#the-basic-structure)
19
-
-[Calling a Process](#calling-a-process)
20
17
-[Further Reading](#further-reading)
21
18
-[Development](#development)
22
19
-[Contributing](#contributing)
23
20
-[License](#license)
24
21
-[Code of Conduct](#code-of-conduct)
22
+
-[Acknowledgments](#acknowledgments)
23
+
-[About](#about)
25
24
26
-
## Supported Ruby and Rails
25
+
## Supported Ruby and Rails<!-- omit from toc -->
27
26
28
27
This library is tested (100% coverage) against:
29
28
@@ -40,63 +39,55 @@ This library is tested (100% coverage) against:
40
39
41
40
`solid-process` is a Ruby/Rails library designed to encapsulate business logic into manageable processes. It simplifies writing, testing, maintaining, and evolving your code, ensuring it remains clear and approachable as your application scales.
42
41
43
-
**Key Objectives:**
42
+
**Features:** (Touch to expand)
44
43
45
-
1.**Seamless Rails integration:** Designed to complement Ruby on Rails, this library integrates smoothly without conflicting with existing framework conventions and features.
2.**Support progressive mastery:** Offers an intuitive entry point for novices while providing robust, advanced features that cater to experienced developers.
46
+
> Designed to complement Ruby on Rails, this library integrates smoothly without conflicting with existing framework conventions and features.
48
47
49
-
3.**Promote conceptual integrity and rapid onboarding:** By maintaining a consistent design philosophy, `solid-process` reduces the learning curve for new developers, allowing them to contribute more effectively and quickly to a codebase.
48
+
</details>
50
49
51
-
4.**Enhanced observability:** Equipped with sophisticated instrumentation mechanisms, the library enables detailed logging and tracing without compromising code readability, even when processes are nested.
<palign="right"><ahref="#-table-of-contents-">⬆️ back to top</a></p>
52
+
> Offers an intuitive entry point for novices while providing robust, advanced features that cater to experienced developers.
54
53
55
-
### Examples <!-- omit in toc -->
54
+
</details>
56
55
57
-
Take a look at the [examples](examples) folder in this repository. Or check out [Solid Rails App](https://github.com/solid-process/solid-rails-app) for a complete example of how to use `solid-process` in a Rails application. [Twelve versions (branches)](https://github.com/solid-process/solid-rails-app?tab=readme-ov-file#-repository-branches) show how the gem can be incrementally integrated. Access it to see from simple services/form objects to implementing the ports and adapters (hexagonal) architectural pattern.
56
+
<details><summary>3️⃣ <strong>Promote conceptual integrity and rapid onboarding</strong></summary>
58
57
59
-
<palign="right"><ahref="#-table-of-contents-">⬆️ back to top</a></p>
58
+
> By maintaining a consistent design philosophy, `solid-process` reduces the learning curve for new developers, allowing them to contribute more effectively and quickly to a codebase.
60
59
61
-
## Installation
60
+
</details>
62
61
63
-
Install the gem and add to the application's Gemfile by executing:
> Equipped with sophisticated instrumentation mechanisms, the library enables detailed logging and tracing without compromising code readability, even when processes are nested.
66
65
67
-
If bundler is not being used to manage dependencies, install the gem by executing:
68
-
69
-
$ gem install solid-process
70
-
71
-
And require it in your code:
72
-
73
-
require 'solid/process'
66
+
</details>
74
67
75
68
<palign="right"><ahref="#-table-of-contents-">⬆️ back to top</a></p>
76
69
77
-
##The Mental Model
70
+
### Examples <!-- omit in toc -->
78
71
79
-
### What is a process? <!-- omit from toc -->
72
+
Check out [Solid Rails App](https://github.com/solid-process/solid-rails-app) for a complete example of how to use `solid-process` in a Rails application. [Twelve versions (branches)](https://github.com/solid-process/solid-rails-app?tab=readme-ov-file#-repository-branches) show how the gem can be incrementally integrated, access it to see from simple services/form objects to implementing the ports and adapters (hexagonal) architectural pattern.
80
73
81
-
A sequence of steps or actions to achieve a specific end. In other words, it is a series of steps that produce a result.
74
+
You can also check the [examples](examples) directory for more simple examples of how to use the gem.
82
75
83
-
### What is a `Solid::Process`? <!-- omit from toc -->
76
+
<palign="right"><ahref="#-table-of-contents-">⬆️ back to top</a></p>
84
77
85
-
It is a class that encapsulates reusable business logic. Its main goal is to **act as an orchestrator** who knows the order, what to use, and the steps necessary to produce an expected result.
78
+
## Installation
86
79
87
-
### Emergent Design <!-- omit from toc -->
80
+
Install the gem and add to the application's Gemfile by executing:
88
81
89
-
The business rule is directly coupled with business needs. We are often unclear about these rules and how they will be implemented as code. Clarity tends to improve over time and after many maintenance cycles.
82
+
$ bundle add solid-process
90
83
91
-
For this reason, this abstraction embraces emerging design, allowing developers to implement code in a basic structure that can evolve and become sophisticated through the learnings obtained over time.
84
+
If bundler is not being used to manage dependencies, install the gem by executing:
92
85
93
-
### The Mantra <!-- omit from toc -->
86
+
$ gem install solid-process
94
87
95
-
***Make it Work**, then
96
-
***Make it Better**, then
97
-
***Make it Even Better**.
88
+
And require it in your code:
98
89
99
-
Using the emerging design concept, I invite you to embrace this development cycle, write the minimum necessary to implement processes and add more solid-process features based on actual needs.
90
+
require 'solid/process'
100
91
101
92
<palign="right"><ahref="#-table-of-contents-">⬆️ back to top</a></p>
102
93
@@ -145,7 +136,7 @@ end
145
136
146
137
<palign="right"><ahref="#-table-of-contents-">⬆️ back to top</a></p>
147
138
148
-
### Calling a Process
139
+
### Calling a Process<!-- omit from toc -->
149
140
150
141
To call a process, you can use the `call` method directly, or instantiate the class and call the `#call` method.
-[09 - Ports and Adapters (Hexagonal Architecture)](docs/09_PORTS_AND_ADAPTERS.md)
190
+
10.[Ports and Adapters (Hexagonal Architecture)](docs/100_PORTS_AND_ADAPTERS.md)
199
191
200
192
<palign="right"><ahref="#-table-of-contents-">⬆️ back to top</a></p>
201
193
@@ -224,3 +216,16 @@ The gem is available as open source under the terms of the [MIT License](https:/
224
216
Everyone interacting in the Solid::Process project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/solid-process/solid-process/blob/main/CODE_OF_CONDUCT.md).
225
217
226
218
<palign="right"><ahref="#-table-of-contents-">⬆️ back to top</a></p>
219
+
220
+
## Acknowledgments
221
+
222
+
I want to thank some people who helped me by testing and giving feedback as this project took shape, they are:
223
+
224
+
-[Diego Linhares](https://github.com/diegolinhares) and [Ralf Schmitz Bongiolo](https://github.com/mrbongiolo) they were the brave ones who worked for a few months with the first versions of the ecosystem (it was called B/CDD). Their feedback was essential for improving DX and helped me to pivot some core decisions.
225
+
-[Vitor Avelino](https://github.com/vitoravelino), [Tomás Coêlho](https://github.com/tomascco), [Haroldo Furtado](https://github.com/haroldofurtado) (I could repeat Ralf and Diego again) for the various feedbacks, documentation, API, support and words of encouragement.
226
+
227
+
## About
228
+
229
+
[Rodrigo Serradura](https://rodrigoserradura.com) created this project. He is the Solid Process creator and has already made similar gems like the [u-case](https://github.com/serradura/u-case) and [kind](https://github.com/serradura/kind). This gem can be used independently, but it also contains essential features that facilitate the adoption of Solid Process (the method) in code.
230
+
231
+
<palign="right"><ahref="#-table-of-contents-">⬆️ back to top</a></p>
`Previous`[Table of Contents](../README.md#further-reading) | `Next`[Basic Usage](./020_BASIC_USAGE.md)
4
+
5
+
</small>
6
+
7
+
# The Key Concepts
8
+
9
+
### What is a process?
10
+
11
+
A sequence of steps or actions to achieve a specific end. In other words, it is a series of steps that produce a result.
12
+
13
+
### What is a `Solid::Process`?
14
+
15
+
It is a class that encapsulates reusable business logic. Its main goal is to **ACT AS AN ORCHESTRATOR** who knows the order, what to use, and the steps necessary to produce an expected result.
16
+
17
+
### Emergent Design
18
+
19
+
The business rule is directly coupled with business needs. We are often unclear about these rules and how they will be implemented as code. Clarity tends to improve over time and after many maintenance cycles.
20
+
21
+
For this reason, this abstraction embraces emerging design, allowing developers to implement code in a basic structure that can evolve and become sophisticated through the learnings obtained over time.
22
+
23
+
### The Mantra
24
+
25
+
***Make it Work**, then
26
+
***Make it Better**, then
27
+
***Make it Even Better**.
28
+
29
+
Using the emerging design concept, I invite you to embrace this development cycle, write the minimum necessary to implement processes and add more solid-process features based on actual needs.
30
+
31
+
<palign="right"><ahref="#the-key-concepts">⬆️ back to top</a></p>
0 commit comments