Milan Jovanović Profile picture
Dec 25, 2022 6 tweets 2 min read Read on X
I have a little challenge for you 🧩🧩🧩

#dotnet Image
Image
Image
Image
Image
If you enjoyed this Tweet thread, you might like my weekly .NET newsletter. I share 1 actionable tip every Saturday.

Join more than 6000+ .NET engineers 👇

milanjovanovic.tech

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Milan Jovanović

Milan Jovanović Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @mjovanovictech

Aug 10, 2023
Thinking about separate read/write databases?

Here's what you should know first.

Using separate read and write databases offers a range of benefits:
- Better performance
- Increased scalability
- Fault tolerance

Let's break them down. Image
𝗕𝗲𝘁𝘁𝗲𝗿 𝗽𝗲𝗿𝗳𝗼𝗿𝗺𝗮𝗻𝗰𝗲

By separating reads from writes, you can tune each database for its specific purpose.
𝗜𝗻𝗰𝗿𝗲𝗮𝘀𝗲𝗱 𝘀𝗰𝗮𝗹𝗮𝗯𝗶𝗹𝗶𝘁𝘆

You can scale each database independently when using separate read and write databases. This is particularly useful when your application's queries lean heavily to one side.
Read 8 tweets
Aug 9, 2023
What is the RIGHT way to use HttpClient in .NET?

HttpClient is an excellent abstraction and incredibly easy to work with.

Unfortunately, it's also easy to misuse, leading to problems like port exhaustion.

You need to know how NOT to use it. Image
If you think IHttpClientFactory will solve all your problems, you're only partly right.

Should you use named clients or typed clients?

Microsoft was kind enough to provide us with a set of best practices and recommended use for HttpClient.
- Use a static or singleton HttpClient instance with a PooledConnectionLifetime configured since this solves both port exhaustion and tracking DNS changes
Read 6 tweets
Jul 25, 2023
What is a webhook?

Imagine this:

You have a website or an application, and you want it to automatically do things without you having to trigger them manually.

That's where webhooks come in! Image
Webhooks are like little messengers that allow one system to send a message or data to another system in real-time whenever a specific event happens.

It's like getting a notification on your phone when someone comments on your social media post or when you receive an email.
Webhooks work similarly but for systems and applications.

A webhook is a way for one system to send a message or data to another system in real-time whenever something important happens.
Read 9 tweets
Jul 24, 2023
You don't need to start with Microservices.

Even if you're confident your application will be big enough to justify Microservices.

And here's why. 👇

Microservices come with a premium. Image
The Microservices premium:
- Team coordination
- Dealing with failure
- Eventual consistency
- Automating deployments
- Managing multiple services

And many other factors.
You probably don't need this complexity at the start of a new project.

Ask yourself:
- Is it valuable to your users?

The experience of your team plays a significant role.
Read 7 tweets
Jul 17, 2023
What are the SOLID principles? 🤔

As a .NET developer, I'm always looking for ways to improve the quality and maintainability of my code.

I want to share my experiences using the SOLID principles and how they've helped me create better code. Image
First, let's define what we mean by SOLID.

The acronym 𝗦𝗢𝗟𝗜𝗗 stands for:
- Single responsibility principle
- Open/closed principle
- Liskov substitution principle
- Interface segregation principle
- Dependency inversion principle

Let's break them down. 🔬
1. 𝗦𝗶𝗻𝗴𝗹𝗲 𝗥𝗲𝘀𝗽𝗼𝗻𝘀𝗶𝗯𝗶𝗹𝗶𝘁𝘆 𝗣𝗿𝗶𝗻𝗰𝗶𝗽𝗹𝗲 (𝗦𝗥𝗣)

A class should have only one reason to change. In other words, a class should have a single, well-defined responsibility. That class should entirely encapsulate responsibility.
Read 13 tweets
Jul 12, 2023
I've been using Clean Architecture for 5 years and counting.

Here's why I think it's amazing. 👇

Clean architecture isn't revolutionary.

But it is opinionated about how to structure your code.

It's just another form of layered architecture.
The core concept you need to grasp is the Domain.

Another way to think about Clean architecture is that it's a Domain-centric architecture.

The Domain is at the center of the architecture, and it's treated as the most essential part.

The other components support the Domain.
What are some common Domain-centric architectures?
- Hexagonal architecture
- Clean architecture
- Onion architecture

They all revolve around the same idea.
Read 12 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(