Skip to content

Commit

Permalink
Update pages on 2024-01-21 13:41:43
Browse files Browse the repository at this point in the history
  • Loading branch information
emacsway committed Jan 21, 2024
1 parent cdf52bf commit 38f0574
Show file tree
Hide file tree
Showing 157 changed files with 4,845 additions and 4,757 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 74c809a1018a1cda72910db3b5550fb2
config: 6422b45b1cda3e77711ec4e02813b508
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file not shown.
Binary file modified .doctrees/emacsway/it/ddd/grade/domain/shotgun-surgery.doctree
Binary file not shown.
Binary file not shown.
Binary file modified .doctrees/emacsway/it/sdlc/models/agile/agile.doctree
Binary file not shown.
Binary file not shown.
Binary file modified .doctrees/emacsway/soft-skills/cognitive-biases.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
2 changes: 1 addition & 1 deletion README.html
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ <h3 id="searchlabel">Быстрый поиск</h3>
</div>

<div class="footer">
&copy;2023, @dckms (<a href="https://dckms.github.io/system-architecture/LICENSE.txt" rel="nofollow">License</a>).
&copy;2024, @dckms (<a href="https://dckms.github.io/system-architecture/LICENSE.txt" rel="nofollow">License</a>).

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 5.1.1</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,3 +419,15 @@ Exporter
Это еще один аргумент в пользу первого варианта с отдельными сеттерами для каждого атрибута Агрегата.

Попробовав оба варианта, я остановился, все-таки, на первом, каноническом, даже несмотря на его многословность.


Импорт состояния
================

В Golang область видимости структуры доступна всему пакету, поэтому нет большой необходимости реализовывать Importer/Provider - достаточно положить Reconstitutor в тот же пакет.

В других языках может потребоваться делать Importer/Provider, что образует брешь в инкапсуляции.
Поэтому импорт состояния делают либо посредством конструктора, если поддерживается множественная диспетчеризация (overloading), либо посредством статического метода класса - чтобы можно было создать, но невозможно было изменить.
Правда, при этом возникает сложность с синхронизацией состояния объектов в IdentityMap при фиксации изменений (commit), ведь состояние агрегата теперь недоступно для синхронизации.
В таком случае остается только очистить IdentityMap при фиксации изменений.

4 changes: 4 additions & 0 deletions _sources/emacsway/it/ddd/grade/domain/shotgun-surgery.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ Shotgun Surgery
===============

Может показаться, что используя Raw-SQL мы обретаем классифицированный Code Smell, известный как Shotgun Surgery (Разлет Дроби), ибо добавление одного поля в Сущность требует правки многих файлов.

Это не так страшно, т.к. :ref:`ввод символов с клавиатуры не оказывает существенного влияния на темпы разработки <emacsway-who-reads-the-code>`, поскольку занимает не более 10% от времени конструирования кода.
При этом вероятность возникновения ошибки тоже минимальна, т.к. легко отлавливается статическим анализатором кода.

Есть два способа решить эту проблему (и снизить Coupling), о которых писал Martin Fowler в главе "Metadata Mapping" книги "Patterns of Enterprise Application Architecture": "reflective program" и "code generation", причем, сам он лично предпочитает второй вариант:

Generated code is more explicit so you can see what's going on in the debugger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ Repository and Causal Consistency
И здесь обнажается проблема, т.к. при инкрементировании версии агрегата единожды на транзакцию, возникает риск образования более одного публичного Доменного События с одной и той же версией Агрегата.
А это означает, что версию Агрегата не получится использовать для восстановления очередности Событий.

Есть еще одна проблема.
Если за один инкремент версии агрегат издал несколько событий, то при обновлении ReadModel по событиям её версия разъедется с версией агрегата, и будет утрачена возможность отслеживать, например, с frontend, докатились ли изменения до ReadModel.
Но это так же означает, что доменное событие должно производиться на абсолютно каждое изменение состояния агрегата.


Варианты решений
================
Expand Down
7 changes: 7 additions & 0 deletions _sources/emacsway/it/sdlc/models/agile/agile.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,13 @@ Impossible. Точка.

-- "Software Architecture in Practice" 3d edition by Len Bass, Paul Clements, Rick Kazman

..
💬 So, agile and architecture are addressing the same problem from different angles: architecture gives you the options to sustain velocity when the unexpected happens.
And agile gives you the attitude to always be learning and to quickly adapt to changing circumstances.

-- "`Agile and Architecture: Friend, not Foe: Agile methods and architecture both thrive in times of uncertainty. <https://architectelevator.com/transformation/agile_architecture/>`__" by Gregor Hohpe

..
💬 "After all software is supposed to be soft."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,14 @@ Simon Brown тоже обратил внимание на тот факт, чт

💬 "Architecture is the decisions that you wish you could get right early in a project, but that you are not necessarily more likely to get them right than any other." -- Ralph Johnson

..
Remember Johnson’s secondary definition: “Architecture is the decisions that you wish you could get right early in a project.”
Why do people feel the need to get some things right early in the project?
The answer, of course, is because they perceive those things as hard to change.

-- "`Who Needs Architect <https://martinfowler.com/ieeeSoftware/whoNeedsArchitect.pdf>`__" by Martin Fowler

на

💬 "A good architect pretends that the decision has not been made, and shapes the system such that those decisions can still be deferred or changed for as long as possible.
Expand Down
1 change: 1 addition & 0 deletions _sources/emacsway/soft-skills/cognitive-biases.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@

- "`Логическая ошибка <https://ru.wikipedia.org/wiki/%D0%9B%D0%BE%D0%B3%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B0%D1%8F_%D0%BE%D1%88%D0%B8%D0%B1%D0%BA%D0%B0>`__"
- "`Список когнитивных искажений <https://ru.wikipedia.org/wiki/%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA_%D0%BA%D0%BE%D0%B3%D0%BD%D0%B8%D1%82%D0%B8%D0%B2%D0%BD%D1%8B%D1%85_%D0%B8%D1%81%D0%BA%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B9>`__"
- "`Демагогические приемы <https://ru.wikipedia.org/wiki/%D0%94%D0%B5%D0%BC%D0%B0%D0%B3%D0%BE%D0%B3%D0%B8%D1%8F#%D0%9E%D1%88%D0%B8%D0%B1%D0%BE%D1%87%D0%BD%D1%8B%D0%B5_%D1%81%D0%B8%D0%BB%D0%BB%D0%BE%D0%B3%D0%B8%D0%B7%D0%BC%D1%8B>`__"
- "`Decision-making <https://en.wikipedia.org/wiki/Decision-making>`__"

- "`5 cognitive bias examples and how to avoid them in decision-making <https://www.atlassian.com/blog/productivity/cognitive-bias-examples>`__" by Ben Crothers
Expand Down
2 changes: 1 addition & 1 deletion emacsway/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ <h3 id="searchlabel">Быстрый поиск</h3>
</div>

<div class="footer">
&copy;2023, @dckms (<a href="https://dckms.github.io/system-architecture/LICENSE.txt" rel="nofollow">License</a>).
&copy;2024, @dckms (<a href="https://dckms.github.io/system-architecture/LICENSE.txt" rel="nofollow">License</a>).

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 5.1.1</a>
Expand Down
2 changes: 1 addition & 1 deletion emacsway/it/concurrency/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ <h3 id="searchlabel">Быстрый поиск</h3>
</div>

<div class="footer">
&copy;2023, @dckms (<a href="https://dckms.github.io/system-architecture/LICENSE.txt" rel="nofollow">License</a>).
&copy;2024, @dckms (<a href="https://dckms.github.io/system-architecture/LICENSE.txt" rel="nofollow">License</a>).

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 5.1.1</a>
Expand Down
2 changes: 1 addition & 1 deletion emacsway/it/concurrency/saga.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ <h3 id="searchlabel">Быстрый поиск</h3>
</div>

<div class="footer">
&copy;2023, @dckms (<a href="https://dckms.github.io/system-architecture/LICENSE.txt" rel="nofollow">License</a>).
&copy;2024, @dckms (<a href="https://dckms.github.io/system-architecture/LICENSE.txt" rel="nofollow">License</a>).

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 5.1.1</a>
Expand Down
2 changes: 1 addition & 1 deletion emacsway/it/concurrency/transaction.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ <h3 id="searchlabel">Быстрый поиск</h3>
</div>

<div class="footer">
&copy;2023, @dckms (<a href="https://dckms.github.io/system-architecture/LICENSE.txt" rel="nofollow">License</a>).
&copy;2024, @dckms (<a href="https://dckms.github.io/system-architecture/LICENSE.txt" rel="nofollow">License</a>).

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 5.1.1</a>
Expand Down
2 changes: 1 addition & 1 deletion emacsway/it/ddd/ddd-in-practice/event-storming/archi.html
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ <h3 id="searchlabel">Быстрый поиск</h3>
</div>

<div class="footer">
&copy;2023, @dckms (<a href="https://dckms.github.io/system-architecture/LICENSE.txt" rel="nofollow">License</a>).
&copy;2024, @dckms (<a href="https://dckms.github.io/system-architecture/LICENSE.txt" rel="nofollow">License</a>).

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 5.1.1</a>
Expand Down
2 changes: 1 addition & 1 deletion emacsway/it/ddd/ddd-in-practice/event-storming/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ <h3 id="searchlabel">Быстрый поиск</h3>
</div>

<div class="footer">
&copy;2023, @dckms (<a href="https://dckms.github.io/system-architecture/LICENSE.txt" rel="nofollow">License</a>).
&copy;2024, @dckms (<a href="https://dckms.github.io/system-architecture/LICENSE.txt" rel="nofollow">License</a>).

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 5.1.1</a>
Expand Down
2 changes: 1 addition & 1 deletion emacsway/it/ddd/ddd-in-practice/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ <h3 id="searchlabel">Быстрый поиск</h3>
</div>

<div class="footer">
&copy;2023, @dckms (<a href="https://dckms.github.io/system-architecture/LICENSE.txt" rel="nofollow">License</a>).
&copy;2024, @dckms (<a href="https://dckms.github.io/system-architecture/LICENSE.txt" rel="nofollow">License</a>).

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 5.1.1</a>
Expand Down
2 changes: 1 addition & 1 deletion emacsway/it/ddd/grade/domain/aggregate-boundaries.html
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ <h3 id="searchlabel">Быстрый поиск</h3>
</div>

<div class="footer">
&copy;2023, @dckms (<a href="https://dckms.github.io/system-architecture/LICENSE.txt" rel="nofollow">License</a>).
&copy;2024, @dckms (<a href="https://dckms.github.io/system-architecture/LICENSE.txt" rel="nofollow">License</a>).

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 5.1.1</a>
Expand Down
Loading

0 comments on commit 38f0574

Please sign in to comment.