Тёмный

Do I Need MediatR in Vertical Slice Architecture? 

Gui Ferreira
Подписаться 12 тыс.
Просмотров 6 тыс.
50% 1

⭐️ Use the coupon code GUITDD to get a 20% discount course on my new TDD course: dometrain.com/...
Is MediatR a must-have when implementing Vertical Slice Architecture?
💎 Be a Patreon to get the source code: / gsferreira
🚨 KEY LINKS
🤝 Support me on Patreon (and get access to source code) here: / gsferreira
👋 HEY FRIEND
If you're new to my Channel, my name is Guilherme, but you can call me Gui if Portuguese pronunciation is not your thing.
I see myself as a Minimalist Software Craftsman. That says a lot of what I talk about here.
So, why this RU-vid channel? To share with you to simplify your life as a Developer through knowledge, technology, and practices.
If you are into those things as I do, don't forget to subscribe for new videos.
🔗 GET IN TOUCH
LinkedIn: / gferreira
Twitter: / gsferreira
GitHub: github.com/gsf...
Visit my blog: gsferreira.com
#dotnet #csharp

Опубликовано:

 

27 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 12   
@krccmsitp2884
@krccmsitp2884 9 месяцев назад
When you don't need multiple different pipelines, applying the Template Method pattern to your handlers is a good alternative to MediatR.
@anatolia23
@anatolia23 8 месяцев назад
I'm surprised that the majority of developers still use reflection-based libraries. There is a powerful concept called 'Source Generator' in C#, and many libraries already use it, such as Mediator and Mapperly. Just use them and discover performance gain!
@iliyan-kulishev
@iliyan-kulishev 11 месяцев назад
What can be an argument for NOT using MediatR, even if you do VSA and need pipeline behavior for your handlers? I've heard people say that performance suffers due to the indirection and handler discovery done via reflection.
@gui.ferreira
@gui.ferreira 10 месяцев назад
Performance can be a reason, however, not to the point that it's not a concern for 95% of the applications for sure. To me, the biggest reason is the simplicity. Bringing patterns that are not needed is adding complexity to the design.
@jorgepedraza1275
@jorgepedraza1275 9 месяцев назад
Any repo related with this video? 🤔
@gui.ferreira
@gui.ferreira 9 месяцев назад
Hi! Yes. You can grab it as a Patron: patreon.com/gsferreira
@foonlam7134
@foonlam7134 11 месяцев назад
Hi Gui, I have a controller method that receives a process message request and calls many services to do many things. if I implement a mediator handler how will I put this code in a handler. Videos only show the simple method that does only 1 thing and not one that needs to call many services to read and write data during the processing. Can you help?
@gui.ferreira
@gui.ferreira 11 месяцев назад
Hi! I think I can record a video on that. Do you mind sharing which business problem are you solving?
@foonlam7134
@foonlam7134 11 месяцев назад
@@gui.ferreira I'm trying to process a message received from an efpos terminal for purchase of a product. There are multiple validations and calculations eg the discount we have to give based on the product, then we have to call external apis to update the balance of the credit card and then on success we gave to create the transaction into the database and update the user's account as well as send an acknowledgement to the terminal of the success or failure of the purchase
@abhinavkapoor321
@abhinavkapoor321 5 месяцев назад
One possibility is to register all handlers . And you can find the handler using IServiceProvider in Controller. The problem is that now your controller knows who is the handler, this is hidden with MediatR
@AboutCleanCode
@AboutCleanCode 11 месяцев назад
I really like your recommendation to start simple and to not marry a framework or library right from the beginning of the project. 👍Of course battle proven libraries can give a lot of benefits but we should always make a conscious decision whether those benefits are actually needed - because benefits never come without disadvantages, right? 😉➡ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-JGgeoB-tXJw.html
@gui.ferreira
@gui.ferreira 11 месяцев назад
As it's common to say: "it depends"
Далее
4 Simple Tips for Better REST API Design
10:43
Просмотров 5 тыс.
Vertical Slice Architecture Project Setup From Scratch
22:43
11 ming dollarlik uzum
00:43
Просмотров 155 тыс.
Witch changes monster hair color 👻🤣 #shorts
00:51
How slow is MediatR really?
15:51
Просмотров 60 тыс.
Why I DON'T use MediatR in ASP.NET Core
21:51
Просмотров 14 тыс.
Hexagonal Architecture (All You Need to Know)
9:51
Просмотров 7 тыс.
Being Competent With Coding Is More Fun
11:13
Просмотров 79 тыс.
Vertical Slice Architecture Myths You Need To Know!
8:35
11 ming dollarlik uzum
00:43
Просмотров 155 тыс.