TGTGInsightтелеграм анализLIVE / telegram public index
← Такты, стеки, два колеса

TGINSIGHT SIMILAR POSTS

Намери подобно съдържание

Изходен канал @clockstackwheels · Post #973 · 20.04

В C# есть модификатор доступа internal, который закрывает свойство или метод для всего, кроме текущей сборки (сборка это по сути группа пространств имён). И это чертовски удобно для построения правильной архитектуры по DDD — ты делаешь домен отдельной сборкой без внешних зависимостей, у сущностей закрываешь сеттеры и другие поля модификатором internal, а бизнес-правила с открытыми методами уже пишешь в агрегатах, которые содержат эти сущности. Агрегаты объявлены в той же сборке, так что они могут с сущностями делать что угодно, но слой приложения уже сможет вызвать только метод агрегата. Пример. Есть бизнес-процесс, который включает в себя две сущности: письмо и прикреплённый к нему документ. У каждой из этих сущностей разные жизненные циклы, но письмо можно отправить только в том случае, если статус документа "Согласован". Мы делаем агрегат "письмо с документом" и там public-метод отправки письма сначала проверяет статус документа, а потом вызывает internal-метод отправки в сущности письма. Снаружи (вне домена) вызвать сразу отправку письма невозможно. Но как эту задачу решают разработчики на других языках? Я совершенно не понимаю, как сделать хорошую архитектуру без internal. Окей, в некоторых языках вообще нет вменяемого ОПП и системы типов, но и к таким ребятам я бы не подходил с вопросами об энтерпрайз-архитектуре. Однако, многие серьёзные проекты пишутся на Java или, скажем, Go, что делают разработчики там? Может, кто-нибудь знает, и расскажет мне в комментариях? #dev

Hashtags

Резултати

Намерени 4 подобни публикации

Търсене: #processes

当前筛选 #processes清除筛选
Amazing Geography 🌍

@amazingeo · Post #647 · 25.02.2026 г., 20:31

🌍 Submarine hydrothermal vents on the ocean floor release superheated water and minerals, fueling unique ecosystems powered by chemical energy instead of sunlight. ✨ #processes⚡#ocean⚡#ecosystems⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #39 · 13.08.2025 г., 00:12

🌍 Earth's crust is in constant motion due to convection currents—slow, swirling movement of hot rock deep below the surface. This drives plate movement, causing earthquakes and forming new land. ✨ #processes⚡#plate⚡#tectonics⚡#geology⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍

djangoproject

@djangoproject · Post #290 · 04.04.2017 г., 21:36

https://pymotw.com/3/asyncio/executors.html Combining Coroutines with Threads and Processes A lot of existing libraries are not ready to be used with #asyncio natively. They may block, or depend on concurrency features not available through the module. It is still possible to use those libraries in an application based on asyncio by using an #executor from #concurrent.futures to run the code either in a separate thread or a separate process. #Threads The #run_in_executor() method of the event loop takes an executor instance, a regular callable to invoke, and any arguments to be passed to the callable. It returns a Future that can be used to wait for the function to finish its work and return something. If no executor is passed in, a #ThreadPoolExecutor is created. This example explicitly creates an executor to limit the number of worker threads it will have available. #Processes A ProcessPoolExecutor works in much the same way, creating a set of worker #processes instead of threads. Using separate processes requires more system resources, but for computationally-intensive operations it can make sense to run a separate task on each CPU core. #learn