В C# есть модификатор доступа internal, который закрывает свойство или метод для всего, кроме текущей сборки (сборка это по сути группа пространств имён). И это чертовски удобно для построения правильной архитектуры по DDD — ты делаешь домен отдельной сборкой без внешних зависимостей, у сущностей закрываешь сеттеры и другие поля модификатором internal, а бизнес-правила с открытыми методами уже пишешь в агрегатах, которые содержат эти сущности. Агрегаты объявлены в той же сборке, так что они могут с сущностями делать что угодно, но слой приложения уже сможет вызвать только метод агрегата.
Пример. Есть бизнес-процесс, который включает в себя две сущности: письмо и прикреплённый к нему документ. У каждой из этих сущностей разные жизненные циклы, но письмо можно отправить только в том случае, если статус документа "Согласован". Мы делаем агрегат "письмо с документом" и там public-метод отправки письма сначала проверяет статус документа, а потом вызывает internal-метод отправки в сущности письма. Снаружи (вне домена) вызвать сразу отправку письма невозможно.
Но как эту задачу решают разработчики на других языках? Я совершенно не понимаю, как сделать хорошую архитектуру без internal. Окей, в некоторых языках вообще нет вменяемого ОПП и системы типов, но и к таким ребятам я бы не подходил с вопросами об энтерпрайз-архитектуре. Однако, многие серьёзные проекты пишутся на Java или, скажем, Go, что делают разработчики там? Может, кто-нибудь знает, и расскажет мне в комментариях?
#dev
#vlog
Forgot to share the vlog here! With exams approaching days are going even faster and tomorrow is already December!
While trying to study hard, I am also working on my skills and my side projects. Love college, love life, love my family and friends. And of course love you!
~ 🤓~
↬@jastm1🐰
#vlog
New week, new vlog🍎😁
Did u miss me? I was away during the weekends…
Courses are getting harder and it’s getting harder to film vlogs but I am trying to make them as good as possible 😬
~🐈~
↬@jastm1🌊
#vlog
✨ Another little glimpse into my day ✨
Yesterday was packed with challenges - from a dentist appointment to preparing for upcoming quizzes. It was long, it was busy, and yes, I ended the day completely exhausted. 💗
But here’s the thing: every busy day is also a step forward. Each challenge we push through is shaping us, teaching us resilience, and bringing us closer to our goals. 🎀
So if you’re also feeling tired from studying, working, or just managing life, remember, it’s all part of the journey. Keep going, because the effort you’re putting in today will turn into tomorrow’s growth. 🍵🤩
Let me know if you want more vlogs like this🤎
~🐈~
↬@jastm1🌊
#vlog
Yesterday was a very colorful, interesting, and tiring day. The first day of September turned out pretty productive! I woke up early and prepared for my classes (Algorithms, to be exact
😶). We had a very challenging Algorithms class — I could literally feel my brain frying 😀. Our professor is really funny though, with a Russian accent.
Then I had another class - a core course called Chance. Honestly, I’d call it “a chance for a good sleep.” We have a lovely French professor who’s over 70 and speaks very quietly and slowly
🥲. And since the class is at 2 p.m., you can imagine…
After that class, I was ready to go to my Jiu Jitsu training, but it got canceled. So instead, I helped out at the Student Fest, where all the clubs at our uni gathered to present themselves. Our Central Asian Student Association was there too, and it was so much fun! Everyone waited for somsa and chebureki... I got to meet many new freshmen, and they were super friendly. One of them even turned out to be subscribed to my channel - such an honor honestly
⭐.
So yeah, the day was so tiring it felt like Friday. My roommate and I couldn’t even wake up early today :)
~🐈~
↬@jastm1🌊
#vlog
I am back with another cute vlog 🥰
It was filmed like a week ago. Hope you will enjoy it.
These weeks are very busy and I am filming another long and funny vlog for you! Hopefully I will have time to edit it 🥲
#vlog
My daily routine at university. Everyday is the same :wake up -> eat ->study and that's on repeat.
Right now I am trying to learn and apply as much knowledge as I can, building the necessary foundation for the future internships (hopefully).
Also watching anime about pharmacy girl in ancient times, I LOVE IT 😊.
Yesterday I freaked out and had a good cry because of my cs assignment, but then managed to somehow finish it by 2 am. Now the most challenging part is left - DEBUGGING.
Alhamdullilah for such stability 🍵
~🍋~
↬@jastm1🌊