#  @mjovanovictech Milan JovanoviΔ Milan JovanoviΔ posts on X about milan, azure, core, events the most. They currently have [------] followers and [----] posts still getting attention that total [------] engagements in the last [--] hours. ### Engagements: [------] [#](/creator/twitter::1541479855660961792/interactions)  - [--] Week [-------] +163% - [--] Month [-------] +98% - [--] Months [---------] +81% - [--] Year [---------] -56% ### Mentions: [--] [#](/creator/twitter::1541479855660961792/posts_active)  - [--] Month [--] +18% - [--] Months [---] +54% - [--] Year [---] -59% ### Followers: [------] [#](/creator/twitter::1541479855660961792/followers)  - [--] Week [------] +0.32% - [--] Month [------] +1% - [--] Months [------] +8.90% - [--] Year [------] +21% ### CreatorRank: [-------] [#](/creator/twitter::1541479855660961792/influencer_rank)  ### Social Influence **Social category influence** [travel destinations](/list/travel-destinations) #5356 [technology brands](/list/technology-brands) [stocks](/list/stocks) [finance](/list/finance) [social networks](/list/social-networks) [countries](/list/countries) [cryptocurrencies](/list/cryptocurrencies) [celebrities](/list/celebrities) [currencies](/list/currencies) [gaming](/list/gaming) **Social topic influence** [milan](/topic/milan) #201, [azure](/topic/azure), [core](/topic/core) #1205, [events](/topic/events), [if you](/topic/if-you), [what is](/topic/what-is), [api](/topic/api), [how can](/topic/how-can), [clean](/topic/clean), [project](/topic/project) **Top accounts mentioned or mentioned by** [@progressivecod2](/creator/undefined) [@petarivanovv9](/creator/undefined) [@devleaderca](/creator/undefined) [@antonmartyniuk](/creator/undefined) [@davedotnet](/creator/undefined) [@danpdc](/creator/undefined) [@davidfowl](/creator/undefined) [@michel1973](/creator/undefined) [@vojvodaboki](/creator/undefined) [@thecodeman](/creator/undefined) [@nonlinearjames](/creator/undefined) [@florinpop1705](/creator/undefined) [@mcclellandruss](/creator/undefined) [@catalinmpit](/creator/undefined) [@franc0fernand0](/creator/undefined) [@runbikebbq](/creator/undefined) [@mmctrueengineer](/creator/undefined) [@thearchitect452](/creator/undefined) [@milanmilanovic](/creator/undefined) [@rauljuncov](/creator/undefined) **Top assets mentioned** [Microsoft Corp. (MSFT)](/topic/microsoft) [Alphabet Inc Class A (GOOGL)](/topic/$googl) [Fetch (FET)](/topic/fetch) [Monolith (TKN)](/topic/monolith) [Merge (MERGE)](/topic/merge) ### Top Social Posts Top posts by engagements in the last [--] hours "You should never return null collections in C#. There are better solutions. What problem does returning null collections cause Collections are typically iterated over in a loop. If your method returns null collections this can lead to potential errors. The calling code must handle the null case and check for null before accessing any collection elements. You need to add a null-check every time that can clutter the calling code and make it harder to read. It's even worse if the calling code doesn't handle the null case. Things will blow up at runtime which isn't easy to diagnose. I think it's" [X Link](https://x.com/mjovanovictech/status/1642777441356636161) 2023-04-03T06:33Z 44K followers, 42.6K engagements "How can you find a minimum element with LINQ Before .NET [--] you had to sort the collection in ascending order and take the first element. But .NET [--] introduced the MinBy method which does precisely this. Don't try to use this with EF Core as it's still unsupported. #dotnet" [X Link](https://x.com/mjovanovictech/status/1655453541840961537) 2023-05-08T06:04Z 40.2K followers, 11.8K engagements "Where does the Unit of Work pattern belong in your code If you're using MediatR you can introduce a TransactionScope in your pipeline to create an ambient transaction. Never heard of TransactionScope I'll show you how to use it in this video π" [X Link](https://x.com/mjovanovictech/status/1664875622538043394) 2023-06-30T01:06Z 28.1K followers, 14.8K engagements "Most people think Redis is just used for caching. But it can do so much more Here are a few not-so-common use cases for Redis:" [X Link](https://x.com/mjovanovictech/status/1671036228026658818) 2023-06-20T06:04Z 45K followers, 36.8K engagements "C# Tip π‘ How do you create your DTOs We can use to represent DTOs starting from C# [--]. The example from the picture uses a primary constructor so that the record definition can become a one-liner. It's a nice and concise way to define types" [X Link](https://x.com/anyuser/status/1674297724529790976) 2023-06-29T06:04Z [--] followers, [---] engagements "Twitter is rate-limiting its users - us. And this is an excellent time to talk about rate limiting in .NET [--]. Here are the numbers: - [------] posts/day (Twitter Blue) - [-----] posts/day (unverified) - [---] posts/day (new unverified) Why are they doing it" [X Link](https://x.com/mjovanovictech/status/1676185657092317187) 2023-07-13T00:47Z 28.2K followers, 19.5K engagements "How can you build a reverse proxy in .NET A reverse proxy is an intermediary between clients and servers routing client requests to the appropriate Microservice. [--] common use cases: - Load balancing - Monitoring - Caching - Security One more use case for a reverse proxy π" [X Link](https://x.com/mjovanovictech/status/1677921583514415104) 2023-07-10T20:52Z 28.1K followers, 43.2K engagements "@WestDiscGolf Biased π Just kidding I've worked with both before and I enjoy them" [X Link](https://x.com/mjovanovictech/status/1678658057285271554) 2023-07-11T06:50Z 36.9K followers, [----] engagements "What are some common Domain-centric architectures - Hexagonal architecture - Clean architecture - Onion architecture They all revolve around the same idea" [X Link](https://x.com/mjovanovictech/status/1679008759484411907) 2023-07-12T06:04Z 28.1K followers, [----] engagements "1. Domain layer This is where your core domain entities and business logic lives. You will also see events and (entity) repository interfaces (not to be confused with query-side repositories)" [X Link](https://x.com/mjovanovictech/status/1679008765775863808) 2023-07-12T06:04Z 25.9K followers, [----] engagements "4. Presentation layer This is the entry point into your application. It could be a SPA application or a GRPC service. But most commonly this will be a set of API endpoints delegating the request to the inner layers. The presentation layer should be as thin as possible" [X Link](https://x.com/mjovanovictech/status/1679008784063033344) 2023-07-12T06:04Z 28.1K followers, [----] engagements "@___Pool___ I built this a while back: It doesn't apply everything I know now but I think it's a decent enough implementation of CA. Let me know what you think if you end up reviewing it. CA/Onion are almost one and the same. And most .NET CA implementations are" [X Link](https://x.com/mjovanovictech/status/1679027379941851137) 2023-07-12T12:19Z 28K followers, [---] engagements "The biggest mistake I made as a beginner engineer: Not mastering SQL ORMs can obscure how databases really work. Instead focus on the following: - SQL fundamentals - Data modeling - Transactions - Indexing Master relational databases Use SQL daily. You'll grow 10x faster" [X Link](https://x.com/mjovanovictech/status/1681183087164628994) 2023-07-19T23:27Z 24.9K followers, 34.6K engagements "Did you try out the new Rate Limiting in .NET [--] It's a technique to limit the number of requests to a server or an API. There are [--] popular rate limit algorithms: - Fixed window - Sliding window - Token bucket - Concurrency Here's how to use them π" [X Link](https://x.com/mjovanovictech/status/1681545471137927168) 2023-07-20T00:47Z 28.1K followers, 23.3K engagements "It took me [--] years to get promoted to Senior Software Engineer. Here's what I did to get there: Became damn good at .NET Continuous learning Communication skills Leadership Mentoring I got my first job in [----]. I was still a university student at the time" [X Link](https://x.com/mjovanovictech/status/1686618904406241280) 2023-08-02T19:50Z 28.2K followers, 11.4K engagements "I implemented API Key authentication for a .NET [--] project. Here's what I learned. API key authentication is a method of identifying and granting access to specific users or systems that need to consume an API. The client passes an API Key that is used to authenticate it" [X Link](https://x.com/mjovanovictech/status/1686694906176114688) 2023-08-02T11:06Z 28.2K followers, 14.8K engagements "What are Modular monoliths π₯ Modular monoliths are becoming more popular in the software engineering community. They give you the logical architecture of Microservices without the operational complexity. You can safely determine the boundaries between modules" [X Link](https://x.com/mjovanovictech/status/1687343698684628992) 2023-08-04T06:04Z 23.3K followers, 17.8K engagements "Where do you place validation in Clean Architecture I split my validation into two concerns: - Input validation - Business validation Input validation only deals with incoming requests or commands. A bad command is not allowed to reach the handler" [X Link](https://x.com/mjovanovictech/status/1687706057320116224) 2023-08-05T06:04Z 22.2K followers, 10.6K engagements "What Is a Modular Monolith π§±π§±π§± Here's one definition: - A monolith designed with an emphasis on interchangeable modules The problem with most monolith systems is that they become tightly coupled over time. Components are deeply intertwined" [X Link](https://x.com/mjovanovictech/status/1688068493982236672) 2023-08-06T06:04Z 28.2K followers, [----] engagements "I'm launching my first course called Pragmatic Clean Architecture. And I'm giving an exclusive 30% OFF discount to the quickest [---] of you. It's a comprehensive course teaching you how to ship well-architected production-ready apps using Clean Architecture confidently" [X Link](https://x.com/mjovanovictech/status/1688793311367069696) 2023-08-08T06:04Z 36.9K followers, 23.7K engagements "Did you know you can use the Range syntax with LINQ Range syntax support is supported from C# 8+. It's a concise way to represent a range using the . operator. For example take the range x.y: - x is the start of the range - y is the end of the range" [X Link](https://x.com/mjovanovictech/status/1689155615782785024) 2023-08-09T06:04Z 37K followers, 12.1K engagements "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" [X Link](https://x.com/mjovanovictech/status/1689231613962371072) 2023-08-09T11:06Z 28K followers, 24K engagements "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" [X Link](https://x.com/mjovanovictech/status/1689518011722432514) 2023-08-10T06:04Z 28K followers, 11.4K engagements "My life then vs. now: 2020: 9-5 job Software engineer Steady career growth [--] social media followers 2023: Quit my job Solopreneur Microsoft MVP Software architect [--] very cool lava lamp π 150.000+ followers across networks Bet on yourself" [X Link](https://x.com/mjovanovictech/status/1689594000284491776) 2023-08-10T11:06Z 28.1K followers, 26.2K engagements "Mapping a SQL query to an object can be hard. But Dapper makes it easy. Here are [--] common scenarios: [--]. Simple mapping [--]. One-to-one mapping [--]. One-to-many mapping" [X Link](https://x.com/mjovanovictech/status/1689880411004973056) 2023-08-11T06:04Z 28K followers, [----] engagements "Here are [--] tips for managing exceptions in C# π₯" [X Link](https://x.com/mjovanovictech/status/1689956404147208194) 2023-08-11T11:06Z 28K followers, 20.6K engagements "2. Use the catch-when expression Many engineers don't know about this. You can use the catch-when expression to filter on the exception instance. It's helpful if there's a specific value on the exception you are interested in. The alternative is if-else in the catch block" [X Link](https://x.com/mjovanovictech/status/1689956422124027904) 2023-08-11T11:06Z 37K followers, [----] engagements "3. Prefer using specific exceptions I'm not saying you should use exceptions for business logic. But if you are at least do it right. π And prefer using specific exceptions. Otherwise consider using a result object if you have "expected exceptions."" [X Link](https://x.com/mjovanovictech/status/1689956428599980032) 2023-08-11T11:06Z 28.2K followers, [----] engagements "What is a load balancer Load balancers distribute incoming requests between multiple instances of your API. They're used when you need to scale out your application. I'll show you how to implement a load balancer in .NET using the YARP reverse proxy" [X Link](https://x.com/mjovanovictech/status/1690242780667256832) 2023-08-12T06:04Z 28.3K followers, 12.9K engagements "Monoliths can be loosely coupled. Microservices can be tightly coupled. It's up to who is building it" [X Link](https://x.com/mjovanovictech/status/1690318773960454144) 2023-08-12T11:06Z 28K followers, 12.6K engagements "Do you want your SQL query to be blazing fast There are two things you need; - Write the optimal SQL query - A way to map the result into an object This is where object-relational mappers come in. They are also known as ORMs. Dapper is a lightweight .NET mapper" [X Link](https://x.com/mjovanovictech/status/1690605196701835264) 2023-08-13T06:04Z 28K followers, 11.4K engagements "Here are [--] quick tips to be a better software engineer π‘ [--]. Always improve your technical skills by: - Learning new technologies - Staying up-to-date with industry developments [--]. Focus on your tasks and focus on the most important and impactful ones" [X Link](https://x.com/mjovanovictech/status/1690681168901898241) 2023-08-13T11:06Z 28.2K followers, 13K engagements "C# Tip π‘ Did you try out the when working with records You can create a new record instance with modified values using the . This is also known as non-destructive mutation: - The original record is left unchanged - The new record contains the updated value I use this feature frequently when working with records. Here's something you may not have known. You can also use the on anonymous types. P.S. If you enjoyed this post you will love my weekly .NET newsletter. More than 25000+ engineers already read it. Subscribe here: What do you think about non-destructive mutation" [X Link](https://x.com/mjovanovictech/status/1690979036564951040) 2023-08-14T06:49Z 22.3K followers, 24K engagements "Two EF Core methods I use to get blazing performance: [--]. AsNoTracking [--]. AsSplitQuery Here's what you should know π" [X Link](https://x.com/mjovanovictech/status/1691043594189049856) 2023-08-14T11:06Z 28K followers, 22.7K engagements "I worked on a system with [--] API instances running in parallel and handling millions of requests daily. And just like you I wondered for the longest time: - What makes an API horizontally scalable So I want to share my thoughts on this since I had a chance to work on such a system. Horizontal scalability is crucial for building distributed systems that can handle high loads. In simple terms it means running more instances of the same application. You will also hear the term "scaling out." Here are a few characteristics of a horizontally scalable API: Stateless Load balanced Fault-tolerant All" [X Link](https://x.com/mjovanovictech/status/1691343903696289793) 2023-08-15T06:59Z 28.1K followers, 26.8K engagements "My website gets 50k views monthly and it costs me ZERO $ to run it. It also brings in 14k clicks from Google search traffic each month (and growing). I built it in one afternoon with Next.js - I had never used Next.js before. Here's my tech stack: Next.js TypeScript TailwindCSS GitHub Actions (CI/CD) MDX (markdown - blog) It took me [--] more days to build the blog parsing engine. I found a few YT tutorials about it and made it work. I write my content using Markdown - which gets compiled into HTML. Markdown helps with the code snippets. It's deployed to Netlify as a completely static website." [X Link](https://x.com/mjovanovictech/status/1691406792499089409) 2023-08-15T11:09Z 23K followers, 24.6K engagements "Unlocking Clean Architecture is a career changer. That's why I love killer testimonials like this. I'll never get tired of seeing people ship production-ready applications. It's easy to get lost in the complexity of Clean Architecture and DDD. That's why I created the Pragmatic Clean Architecture course. It's short clocking in at [---] hours. But extremely practical. Imagine taking a complex business domain and transforming it into a well-architected application. That's what this course will teach you. I promise there's [--] fluff inside. Join Celso and 730+ other customers here: It's on you to" [X Link](https://x.com/mjovanovictech/status/1691692601756246154) 2023-08-16T06:05Z 28.2K followers, 21K engagements "The dreaded switch statement got an upgrade in C# [--]. You can now write . A few benefits of using switch expressions: Concise code Pattern matching Improved type inference Better performance (sometimes)" [X Link](https://x.com/mjovanovictech/status/1691768344653799493) 2023-08-16T11:06Z 25.7K followers, 10.9K engagements "What is a Modular Monolith and why should you care I see some confusion around this topic and want to clear it up. I've held a few public talks so far talking about Modular monoliths. How I define a Modular Monolith in simple terms is: - Monolith designed in a Modular way" [X Link](https://x.com/mjovanovictech/status/1692054730241929694) 2023-08-17T06:04Z 22.2K followers, 37.7K engagements "@euboid Can we have one where the profile pic + name are on top stars are below and then the testimonial" [X Link](https://x.com/mjovanovictech/status/1692259854902079489) 2023-08-17T19:39Z 23.1K followers, [---] engagements "Want to build a large-scale system You will need rate limiting sooner or later. It's a technique to limit the number of requests hitting your API: - Improves security - Prevents overloading - Reduces resource usage .NET [--] has built-in rate-limiting support" [X Link](https://x.com/mjovanovictech/status/1692417106589937708) 2023-08-18T06:04Z 28.2K followers, 16.2K engagements "Want to build a system that scales to millions of requests You need to learn about messaging. Offloading work to the background is critical for scalability. But if you don't have a distributed system what can you do You can implement Domain events" [X Link](https://x.com/mjovanovictech/status/1692493118292029867) 2023-08-18T11:06Z 28.2K followers, 10.6K engagements "Integration tests using Docker The Testcontainers library can spin up a Docker container inside your test. I use it to create a PostgreSQL instance so my test can now run using a real database. Go from [--] to Hero by watching my Testconatiners video π" [X Link](https://x.com/mjovanovictech/status/1692779497399931046) 2023-08-19T06:04Z 28.1K followers, 23K engagements "One thing I learned about : - They're always wrong. Here's why: - Lack of time for the estimation - Incomplete/unclear information - Constantly changing requirements - Dependencies on existing features - Developers tend to be optimistic" [X Link](https://x.com/mjovanovictech/status/1692855499128033784) 2023-08-19T11:06Z 28.4K followers, 33.7K engagements "How do you stop malicious users And how do you implement usage-based APIs You can solve both problems with rate limiting. If you're using .NET [--] it's your lucky day. You don't need to install any new libraries. The tools you need are already there" [X Link](https://x.com/mjovanovictech/status/1693158514020016455) 2023-08-20T07:10Z 24.2K followers, 17.9K engagements "What's your biggest struggle with Modular Monoliths A few I've seen: - Lack of knowledge - Module isolation - Determining boundaries I'm gathering pain points for my next Modular monolith course. It will be the best one in the market. And you can help me build it" [X Link](https://x.com/mjovanovictech/status/1693217888943943905) 2023-08-20T11:06Z 28.1K followers, 14.7K engagements "@thearchitect452 "The lot art of Monoliths" - could make for a nice subheading π" [X Link](https://x.com/mjovanovictech/status/1693509268798935340) 2023-08-21T06:24Z 28.3K followers, [---] engagements "Bulletproof your C# properties using this new feature. It's called the keyword. And it's available since C# [--]. How does it work - You decorate a property as - It must be initialized when creating a new instance - The compiler will give you an error if the property isn't set I combine this with nullable reference types to create a robust class design. Want to use a constructor You have to decorate the constructor with SetsRequiredMembers to tell the compiler all required members will be set. This is useful for positional records and primary constructors. Required members allow you to use an" [X Link](https://x.com/mjovanovictech/status/1693513483965321511) 2023-08-21T06:40Z 22.8K followers, 26K engagements "Do you need a Reverse Proxy or an API Gateway A reverse proxy acts as an intermediary between clients and servers. Clients can only call the backend servers through the reverse proxy which forwards the request to the appropriate server. But what's the point" [X Link](https://x.com/mjovanovictech/status/1693582810290733167) 2023-08-21T11:16Z 28.1K followers, 55.8K engagements "DDD will help you build better software. For example here are [--] coding rules: [--]. Methods Property setters [--]. Value types Primitive types [--]. Factory methods Constructors DDD helps you build a software representation of the business domain that is coherent with the business language. This also means that strategic design comes first. You need to understand the business before you can model it in your code. Blindly following design patterns won't get you anywhere. P.S. If you liked this consider joining my weekly newsletter (with 26k+ other engineers) that teaches you how to improve at .NET &" [X Link](https://x.com/mjovanovictech/status/1693945968683606114) 2023-08-22T11:19Z 28.1K followers, 29.2K engagements "What is the most valuable resource you have Time. That's why I get excited when I see a testimonial like this. I want you to get results FAST. And my course is the shortcut you need to go from [--] to shipping production-ready applications. Here's what you'll learn inside Pragmatic Clean Architecture: - Clean Architecture - Domain-Driven Design - Domain modeling - Authentication - Testing And I even added a few bonus chapters at the end. Join John and 790+ other customers here: It will save you 20x your time. See you inside" [X Link](https://x.com/mjovanovictech/status/1694231063415988708) 2023-08-23T06:12Z 23.8K followers, [----] engagements "Persistence ignorance doesn't mean what you think it means. Let me explain. The domain model should be agnostic of the persistence layer - the database. It sounds nice in theory. But in practice no application is disconnected and agnostic from the database. Do you want blazing query speed Good so do I. And you need to understand your database to squeeze out the most performance. I'm not suggesting mixing persistence and business logic. A clear boundary between the two is a requirement. But you need to be aware that your beautiful domain model needs to be persisted at some point. This is a" [X Link](https://x.com/mjovanovictech/status/1694309439476527525) 2023-08-23T11:23Z 28K followers, 14.4K engagements "I failed an interview because I didn't know this. So I'm making this post to make sure it never happens to you. Locking allows us to control how many threads can access some section in the code. Why would you want to do this Because you want to protect access to expensive resources. And you need the concurrency control that locking enables. Since I rarely work with low-level code I tried to achieve this using the lock statement. And that's where it all went to π© The lock statement doesn't work inside async code. And it makes sense because you can't guarantee which thread will complete your" [X Link](https://x.com/mjovanovictech/status/1694594265928650988) 2023-08-24T06:15Z 37K followers, 55.6K engagements "@MrPeterLMorris Live coding. I was adding a lock to a piece of code and I started with lock. Figured out it didn't work with async and reverted to Semaphore. But they still failed me because of it" [X Link](https://x.com/mjovanovictech/status/1694652159873237331) 2023-08-24T10:05Z 28K followers, [----] engagements "One change improved page load speed by 1137% β‘ Here's what I did. I was a junior engineer at the time working on an ASP .NET MVC app. You know the thing returning HTML views from the backend Ancient tech in today's world of SPAs. I got a task to improve the loading speed of one page. It took 10-20 seconds to fetch all the data render the view and return it to the user. Would you wait that long I wouldn't. So I thought I'd improve the database query but that didn't get me far. It shaved off a second or two but not enough. I needed a different approach. The page was rendering 4-5 different" [X Link](https://x.com/mjovanovictech/status/1694670069119234119) 2023-08-24T11:16Z 28K followers, 23.4K engagements "When should you use Orchestration in Microservices Orchestration is the centralized approach to communication. One of the services takes on the role of the orchestrator. And coordinates the communication between services. It uses command-driven communication. Here are the benefits: [--]. Simple [--]. Centralized [--]. Ease of troubleshooting [--]. Monitoring is straightforward Orchestration is typically simpler to implement and maintain than choreography. Because there is a central coordinator you can manage and monitor service interactions. What about the drawbacks You'll have to catch tomorrow's" [X Link](https://x.com/mjovanovictech/status/1694957106858688557) 2023-08-25T06:17Z 28.1K followers, 34.4K engagements "EF [--] finally added its long LOST feature. I'm talking about bulk updates (and deletes). EF7 adds two new methods: - ExecuteUpdate - ExecuteDelete Of course there are async overloads of each. ExecuteUpdate allows you to write a query and run a bulk update operation on the entities matching that query. Similarly ExecuteDelete allows you to write a query and delete the entities matching that query. Why should you care Performance. You can write an optimal UPDATE and DELETE query now. Which translates to just one SQL statement sent to the database. There's gotta be a catch right Well there is one" [X Link](https://x.com/anyuser/status/1695032810107523163) 2023-08-25T11:18Z [--] followers, 33.1K engagements "You can add Firebase Authentication to your app in [--] quick steps. Firebase is Google's cloud platform with many services for building applications. One of those services is Firebase Authentication. - Drop-in auth solution - Email & password based auth - Social login providers - Multi-factor authentication How can you use it in .NET In your project you can install the Firebase Admin SDK as a NuGet package. Connect it to your Firebase project and you're good to go. Don't want to waste time figuring things out on your own Great I've got the solution. Watch my JWT auth with Firebase video here π" [X Link](https://x.com/mjovanovictech/status/1695319671568810098) 2023-08-26T06:18Z 22.9K followers, [----] engagements "Modularity is the lost art of software engineering. But what does it mean Modular means to consist of separate parts that when combined form a complete whole. In our world it refers to breaking down complex systems into smaller independent parts - modules. Each module encapsulates a specific functionality that can be independently: - Developed - Tested - Maintained How do you make a system Modular If you follow the Separation of Concerns you end up with smaller components that implement specific functionalities. And you can apply this on the level of a method class or module. Loose coupling" [X Link](https://x.com/mjovanovictech/status/1695395077487542354) 2023-08-26T11:17Z 28.1K followers, [----] engagements "When should you use Choreography for Microservices Yesterday I showed [-----] engineers in my newsletter the pros and cons of Orchestration and Choreography for microservices. Choreography uses event-driven communication - as opposed to orchestration which uses commands. An event is something that has happened in the past and is a fact. The sender does not know who will handle the event or what will happen after processing it. The most important benefits of choreography are: - Loose coupling - Ease of maintenance - Decentralized control - Asynchronous communication Choreography allows" [X Link](https://x.com/mjovanovictech/status/1695682014744113640) 2023-08-27T06:17Z 37K followers, 67.6K engagements "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 another form of layered architecture. Except you need to follow one important principle: - Dependency inversion The core of Clean Architecture is the Domain. Another way to think about it is that it's a Domain-centric architecture. The Domain is treated as the most important component. The other components of the system are there to support the Domain. What are some common Domain-centric" [X Link](https://x.com/mjovanovictech/status/1696045643909713969) 2023-08-28T06:22Z 28K followers, 17.3K engagements "@RaulFerrerDev Thanks for sharing it Ral much appreciated :)" [X Link](https://x.com/mjovanovictech/status/1696051968303677443) 2023-08-28T06:47Z 36.9K followers, [---] engagements "The biggest myths in software engineering: - Refactoring later - Estimations are accurate - Writing tests slows you down - Computer Science degree doesn't matter - Juniors can't have good input on design What's another myth you heard" [X Link](https://x.com/mjovanovictech/status/1696481906219467241) 2023-08-29T11:16Z 28.3K followers, 25.7K engagements "How do you build multi-tenant apps with EF Core Multi-tenancy is present in most applications we build today. One application serves multiple users while keeping their data isolated. You can approach multi-tenancy in two ways: [--]. Logical - Single database - Logical isolation of tenants [--]. Physical - Multiple databases - Physical isolation of tenants Which option you decide to use will depend mostly on your requirements. Some industries require a high degree of data isolation and using a database per tenant is a must. So how can you implement multi-tenancy with EF Core You can use Query" [X Link](https://x.com/mjovanovictech/status/1697207063623991323) 2023-08-31T11:17Z 28K followers, 16.8K engagements "How do you write integration tests using Docker Integration testing is considered "difficult". But the Testcontainers library makes it a breeze. Let's be honest with each other. Using mocks or fake in-memory databases sucks. You want to use production services for integration testing. Testcontainers allow you to write tests with throwaway Docker containers. Do you see how this is powerful - Real services for integration testing - Easy cleanup before test runs - Works in CI/CD pipelines Tomorrow I'll show [-----] subscribers how to write integration tests using Docker. I'm also including the" [X Link](https://x.com/mjovanovictech/status/1697493579801719041) 2023-09-01T06:16Z 28.3K followers, 13K engagements "How do you build a URL Shortener This is a common system design interview question. There are two simple requirements: [--]. Shorten - pass in a long URL and return a unique short URL [--]. Redirect - access the short URL and get redirected to the matching long URL There are many nuances in these two features. - Unique code generation - Determine short URLs length - How to optimize performance - How to make the system scalable If you want to see how to build a URL shortener in .NET I've got you covered. Watch this video π" [X Link](https://x.com/mjovanovictech/status/1697856139193352447) 2023-09-02T06:17Z 28.1K followers, 52.6K engagements "Are you writing integration tests Integration tests verify your system works correctly with actual external services. - Databases - Message brokers - Identity providers - 3rd party services You can't be fully confident in your application without integration tests. Yesterday 27356+ readers learned how to use Testcontainers to write integration tests using Docker. Here's what you'll learn: - What is Testcontainers - Benefits of Docker containers - Using Testcontainers in ASP .NET Core - Integration testing with Docker containers Grab the issue below π P.S. It works in CI/CD pipelines - if" [X Link](https://x.com/mjovanovictech/status/1698218276973683183) 2023-09-03T06:16Z 37K followers, 33.7K engagements "Here are [--] proven tips to improve SQL query performance: - Use the correct index - Reduce network hops - SELECT fewer columns - Use EXISTS instead of IN - Avoid scanning operations - Check execution plans on realistic dataset - Avoid non-sargable queries (can't use index)" [X Link](https://x.com/mjovanovictech/status/1698293826064900461) 2023-09-03T11:16Z 24.7K followers, 14.8K engagements "Do you want to horizontally scale your API You'll need a Load Balancer. Here's how to build one in [--] simple steps: [--]. Install Yarp.ReverseProxy [--]. Configure YARP with the application [--]. Add the paths to your downstream services This is the most basic setup. But YARP is extensible and you can add many more things. It's primarily a .NET reverse proxy. But you can use it as a load balancer. YARP comes with the following load balance policies: - FirstAlphabetical - Random - RoundRobin - LeastRequests - PowerOfTwoChoices (default) Using the default policy is likely enough for most applications." [X Link](https://x.com/mjovanovictech/status/1698582738029207684) 2023-09-04T06:24Z 28.1K followers, 30.9K engagements "I spent [--] days optimizing a poorly performing API endpoint. From β‘β‘β‘ . Here's what I learned: - Focus on bottlenecks first (biggest payoff) - Reduce the number of round trips - Caching as a last resort (complexity) - Parallelize external calls if they don't depend on each other How do you approach performance optimization" [X Link](https://x.com/mjovanovictech/status/1698656009575669979) 2023-09-04T11:15Z 28.3K followers, 69K engagements "My favorite approach for writing tests with xUnit: Theory + ClassData = π¦(complete package) Here's what I get with this approach: - Strongly typed test parameters - Generate test cases at runtime - Reusability of test cases How does TheoryData work It's a generic class that allows you to specify the types for the parameterized test. And introducing more test cases is trivial. What's your approach for writing parameterized tests P.S. If you liked this consider joining The .NET Weekly - my newsletter with 27000+ engineers that teaches you how to improve at .NET & software architecture." [X Link](https://x.com/mjovanovictech/status/1698943081251226032) 2023-09-05T06:16Z 22.2K followers, 15.7K engagements "Here's my approach for the Clean Architecture folder structure. π I focus on features not types. Let's use the Application layer for the example: π Application __ π FeatureFolder1 _____ π Feature1A _____ π Feature1B __ π FeatureFolder2 _____ π Feature2A _____ π Feature2B _____ . What's the idea here I'm grouping the files based on the feature they belong to. A use case will be a command/query and a respective handler. And often there's a command validator there. Instead of grouping by type Commands/Queries I group everything related to a single command (feature) in one folder. Here's" [X Link](https://x.com/mjovanovictech/status/1699018656087195841) 2023-09-05T11:16Z 28.3K followers, 74.7K engagements "@MrCamaraderie Don't mention it. Which approach do you use" [X Link](https://x.com/mjovanovictech/status/1699022027586207881) 2023-09-05T11:29Z 28.3K followers, [---] engagements "@ProgressiveCod2 Thanks a lot appreciate it :) What was a course you watched that left a big impact on you" [X Link](https://x.com/mjovanovictech/status/1699310151457484986) 2023-09-06T06:34Z 28.1K followers, [---] engagements "@ProgressiveCod2 The funny part is sometimes I turn out the be the "alien" whose code I'm reading and scratching my head. π" [X Link](https://x.com/mjovanovictech/status/1699310332856893611) 2023-09-06T06:35Z 26K followers, [---] engagements "@ProgressiveCod2 That's awesome. I need a course on migrating to Next.js [--] I think π₯ Currently stuck on v12. I'm not sure the next one will be short because it needs to explain a lot more concepts" [X Link](https://x.com/mjovanovictech/status/1699312424778670574) 2023-09-06T06:43Z 28K followers, [--] engagements "When writing LINQ try to not wide. Here's what I mean. Instead of writing a LINQ expression like this: .( = .).( = .).( = (. .)).(); Try to follow the " ": .( = .) .( = .) .( = (. .)) .(); Going tall with your LINQ will improve readability and make it easier to understand. Readability makes a HUGE difference in a team environment How do you write LINQ This also works with SQL queries. Don't be lazy. P.S. If you got to the end here's a small bonus. π Here are [--] more tips for writing Clean Code:" [X Link](https://x.com/mjovanovictech/status/1699668776948552040) 2023-09-07T06:19Z 28.4K followers, 31.7K engagements "Why is Clean Architecture great for complex projects I've been using Clean Architecture for 6+ years on large-scale applications. Clean architecture isn't revolutionary. But it's prescriptive about how you should structure the code. Here are some promises of Clean Architecture: - Maintainability - Testability - Loose coupling - Separation of concerns So when do I use it I use the Clean Architecture when I want to: - Apply Domain-Driven Design - Solve complex business logic - Build highly testable projects - Enforce design policies via the architecture If the above is true for your project" [X Link](https://x.com/mjovanovictech/status/1699743291674140673) 2023-09-07T11:15Z 28K followers, 56.7K engagements "@milan_milanovic This is so nicely explained and good job for going the extra mile for the visuals. What's the database underneath it all with the persistent storage" [X Link](https://x.com/mjovanovictech/status/1699743728867344416) 2023-09-07T11:17Z 28.3K followers, [----] engagements "There's a race condition hiding somewhere in this code snippet. Can you see it This happens more often than you think. You write the code for a new feature confirm that it works and call it a day. But one week later you find out you introduced a nasty bug because you didn't think about concurrency. The most common issue is race conditions with two competing threads executing the same function. If you don't consider this during development you introduce the risk of leaving the system in a corrupted state. So how can you fix this By controlling concurrency with: - Pessimistic locking -" [X Link](https://x.com/mjovanovictech/status/1700030489019511100) 2023-09-08T06:17Z 24.7K followers, 27.9K engagements "Why do we need background tasks Sometimes I want to offload some work in my application to the background. It will run outside the normal application flow. Here are a few examples: - Sending an email after completing a sale - Processing messages from a queue - Clearing stale cache items Background tasks can also improve performance and here's why. Let's take the example of sending an email after a sale. I don't want to slow down the API response by waiting for the email. Instead I can queue an email and process it in the background. You can set up a background task in .NET within minutes. The" [X Link](https://x.com/mjovanovictech/status/1700106232965586950) 2023-09-08T11:18Z 28.2K followers, 28.7K engagements "You can build amazing systems with Vertical Slice Architecture. Do you know how to implement it It's an architectural approach that groups related files together. - Better cohesion - Adding new features is simple - Easier navigation through code Compared to the Clean Architecture layers VSA takes a different path. Let's say we have a use case made of: - Command - Command handler - Validator - Request/response objects In VSA you will group these files as close to each other as possible. You start thinking in terms of features and separate yourself from technical concerns. Here's how to" [X Link](https://x.com/mjovanovictech/status/1700393115972989181) 2023-09-09T06:18Z 22.2K followers, 38.6K engagements "My team isn't afraid of deploying to Production on Fridays. π Here's our secret: - We deploy to Production 10x per day every day For some teams deploying changes is scary. And rightly so. - Things can break - Subtle bugs can creep in - Databases can become corrupted For my team deploying changes is something we (usually) don't have to think about. Because I implemented a very good process. Here's how I did it: - Trunk-based development - Many (many) tests - Feature flagging There is only one main branch that everyone pushes changes to. Short-lived feature branches are also okay. When a" [X Link](https://x.com/mjovanovictech/status/1700468223487930451) 2023-09-09T11:16Z 23.1K followers, 46.7K engagements "@Galaxxius Tickets. Which gets turned to change logs by the scrum master. So we have documentation for each release" [X Link](https://x.com/mjovanovictech/status/1700471958553391464) 2023-09-09T11:31Z 28.1K followers, [---] engagements "How do you solve race conditions with EF Core There are a few things you can try. One of them is using optimistic concurrency with row versioning. - No locks required - Scales well as the app grows - Doesn't block other transactions - Great when there aren't many conflicts Yesterday 28354+ engineers learned how to use optimistic locking with EF Core. If you missed the issue fear not. It's available on my blog for FREE. Read it here" [X Link](https://x.com/mjovanovictech/status/1700755130826539491) 2023-09-10T06:16Z 28K followers, 26.9K engagements "Here's a quick way to implement the Decorator pattern. You can use the ASP .NET Core dependency injection support. - Register your service using the interface - Use the overload with a service provider - Resolve the required services - Create the decorator Hope that's helpful" [X Link](https://x.com/mjovanovictech/status/1700830286865387765) 2023-09-10T11:15Z 28.3K followers, 11.9K engagements "Here's a quick way to implement the Decorator pattern. You can leverage the ASP .NET Core dependency injection support. - Register your service using the interface - Use the overload with a service provider - Resolve the required services - Create the decorator instance Hope that's helpful" [X Link](https://x.com/mjovanovictech/status/1700830566315102691) 2023-09-10T11:16Z 28.1K followers, 28.6K engagements "How can you enforce your software architecture rules Architecture tests. These are automated tests that verify the structure and design of your code. You can use them to enforce design rules expressed with C# code. - Enforce the direction of project dependencies - Define naming conventions for classes - Force classes to be sealed Imagine reducing the cost of enforcing your software architecture to zero. This is what architecture tests can give you. Simply awesome. P.S. If you liked this consider joining The .NET Weekly - my newsletter with 28000+ engineers that teaches you how to improve at" [X Link](https://x.com/mjovanovictech/status/1701117377805434955) 2023-09-11T06:16Z 28K followers, 54.6K engagements "Here are [--] things I set up on every new .NET project: [--]. Logging - Serilog App Insights [--]. Coding conventions - .editorconfig [--]. Static code analysis - SonarAnalyzer [--]. Docker-compose - for local development [--]. CI/CD pipeline for build & tests (bare minimum) Everything is easier after that. And I make sure the team has a consistent development experience" [X Link](https://x.com/mjovanovictech/status/1701192711850611012) 2023-09-11T11:15Z 28.3K followers, 35.7K engagements "@BarzolaGabriel Beautiful thank you so much for sharing this Whenever someone mentions I can use Roslyn analyzers for architecture tests - they can never back up their claim with an example. Because I don't have any experience with them. Now I have what to study so thanks again :)" [X Link](https://x.com/mjovanovictech/status/1701353471255904373) 2023-09-11T21:54Z 23.1K followers, [--] engagements "Controllers vs. Minimal APIs Minimal APIs are the new way of building API applications in .NET. They were introduced in .NET [--] and are now my preferred approach for new projects. Watch this video to learn how to migrate controllers to Minimal APIs π" [X Link](https://x.com/mjovanovictech/status/1701506488571769280) 2023-09-12T08:02Z 28.3K followers, 14.6K engagements "To quote Martin Fowler: "You shouldn't start a new project with microservices even if you're sure your application will be big enough to make it worthwhile." The main reason for this is the complexity of microservice-based systems. I don't want to dive deeper into this. But I do want to bring something else to your attention. There's a way to combine: - Physical architecture of Monoliths - Logical architecture of Microservices And get the benefits of both. It's called a Modular Monolith. Did you ever build one" [X Link](https://x.com/mjovanovictech/status/1701555548628398337) 2023-09-12T11:17Z 28K followers, 45.3K engagements "If you want to learn more about Modular Monoliths start here" [X Link](https://x.com/mjovanovictech/status/1701559223862079873) 2023-09-12T11:31Z 28.3K followers, [----] engagements "How do you publish messages in parallel with MediatR You couldn't do that until recently. MediatR version [--] was released a few months ago. And it brings some exciting changes - the INotificationPublisher. Before v12.0 each handler would run individually when you publish a message. But now you can use the strategy with a concurrent execution strategy. All you need to do is configure the TaskWhenAllPublisher. It will give you a performance boost. But could introduce concurrency issues. You can't win every time. Here are two more use cases for a custom publishing strategy: - Ordering handlers -" [X Link](https://x.com/mjovanovictech/status/1702204556677959730) 2023-09-14T06:16Z 28.2K followers, 19.4K engagements "The biggest lie about CQRS: - You need separate read/write databases The truth is you can have one database and still be doing CQRS. You also don't need event sourcing. Here's what CQRS is: - Logical separation of reads & writes - Commands change state return void - Queries don't change state return data CQRS is simple. Don't make it complicated" [X Link](https://x.com/mjovanovictech/status/1702280433197539493) 2023-09-14T11:17Z 37K followers, 60.2K engagements "@ProgressiveCod2 How do you achieve these properties in your codebase" [X Link](https://x.com/mjovanovictech/status/1702575972808020421) 2023-09-15T06:51Z 28.1K followers, [--] engagements "How do you use feature flags in .NET Feature flags allow .NET applications to turn features on or off dynamically. You can use them for: - A/B testing - Feature toggles - Trunk-based development I cover this and more in my latest videoπ #dotnet" [X Link](https://x.com/mjovanovictech/status/1702620775725830173) 2023-09-15T09:50Z 28.1K followers, 14K engagements "How do you build loosely coupled Microservices In my new video I'll show you how to implement this using: - MassTransit - RabbitMQ Watch the video here π #dotnet" [X Link](https://x.com/mjovanovictech/status/1702929809926418723) 2023-09-16T06:18Z 28K followers, [---] engagements "What is the cleanest way to get configuration values in .NET I use the Options pattern and here's why you. App configuration lives in environment variables or JSON files. You can get individual values using the IConfiguration interface. But this is error-prone and" [X Link](https://x.com/mjovanovictech/status/1703001023990677907) 2023-09-16T11:00Z 25.6K followers, [---] engagements "How can you use Feature Flags in .NET It's only a few lines of code. Here's how. π Feature flags are used to turn features on or off in your application without redeploying the code. Here are [--] simple steps to get started: - Install Microsoft.FeatureManagment - Register feature management services - Define your feature flags in appsettings.json - Check the feature flag state using IFeatureManager Sounds simple Great but we only scratched the surface of what's possible. Now you need to learn about feature filters phased rollouts and A/B testing. Yesterday [-----] engineers learned to work with" [X Link](https://x.com/mjovanovictech/status/1703290334090867001) 2023-09-17T06:10Z 28.3K followers, 45.9K engagements "This YouTube comment made my day. :) Give away massive amounts of value for free. You can change lives for the better. And you'll get rewarded for it" [X Link](https://x.com/mjovanovictech/status/1703367210742280237) 2023-09-17T11:16Z 24.2K followers, 11.5K engagements "If you are trying to be a senior engineer stop procrastinating. You must work on these [--] skills: - Communication skills - Understanding tradeoffs - Willingness to help juniors - Know how to simplify problems - Understanding of software architecture Top-noth Tech skills + Excellent soft skills = Senior engineer" [X Link](https://x.com/mjovanovictech/status/1703441181353320523) 2023-09-17T16:10Z 22.6K followers, 33.7K engagements "@ProgressiveCod2 I usually have the requirements before starting the project so I know what we need to build. From there we can figure out which use cases are simple CRUD (great for anemic model) and which use cases have complex business logic that we want to model inside our domain" [X Link](https://x.com/mjovanovictech/status/1703658286367535181) 2023-09-18T06:32Z 28.2K followers, [---] engagements "I helped a team save $100k in Azure cloud costs by "flipping a switch". Here are the details at the start of the project: - $10000/month cloud spend - Extensive use of logging via App Insights - A few people tried to solve the issue without success - That's where I come in to solve the problem for good Azure has a helpful cost breakdown view to track spending. But it wasn't giving me much information. I spent a solid week researching potential issues. - Volume of logging - Different log levels - Configuration settings The end solution was funny. Someone left on Azure SQL query logging. And" [X Link](https://x.com/mjovanovictech/status/1704122717237288986) 2023-09-19T13:18Z 28.3K followers, 36.1K engagements "@simped Nobody figured it out for months. Can't do a complete writeup of all the details but it's not as simple as I made it sound" [X Link](https://x.com/mjovanovictech/status/1704247674453602355) 2023-09-19T21:34Z 36.6K followers, [----] engagements "How do you connect your Blazor client app with SignalR In my latest video I covered the following: - Strongly-typed Hubs - Authorize-ing a Hub - Authenticating SignalR connections - Sending messages to users based on the user ID Watch it here π" [X Link](https://x.com/mjovanovictech/status/1704424436672131265) 2023-09-20T09:17Z 22.8K followers, 11.9K engagements "How do you design fault-tolerant applications By accepting that failure is unavoidable and preparing for when it happens. Polly is a .NET resilience and fault-handling library. It allows you to express policies like: - Retry - Timeout - Circuit Breaker - Fallback And defining the fault-handling policies is easy. Let's unwrap the example from the image: - Policy class is the access point to define policies - Then you define which exception to handle - CircuitBreaker is one of the available policies - You can configure the circuit breaker further When is the circuit breaker policy useful When a" [X Link](https://x.com/mjovanovictech/status/1705178746007789953) 2023-09-22T11:14Z 28.4K followers, [----] engagements "Transactions are one of the most amazing SQL database features. But do you know how to use transactions with EF Core EF Core has built-in support for database transactions. You use the DbContext to create a transaction and commit the transaction when you're done. However" [X Link](https://x.com/mjovanovictech/status/1705542353908371489) 2023-09-23T11:19Z 23.2K followers, [---] engagements "Do you want to improve your software architecture skills You should know what a Modular monolith is. It's a versatile architectural approach. Each module contains a cohesive set of functionalities. Each module is also isolated from other modules in the system. The isolation refers to: - Database dependencies - Inter-module communication You can think of a module as a distinct application within the monolith. The degree of coupling depends on the communication approach you put in place. It can be either: - Synchronous (method calls) - Asynchronous (messaging) My preferred approach is" [X Link](https://x.com/mjovanovictech/status/1705828040826089982) 2023-09-24T06:14Z 25.5K followers, 46.7K engagements "EF [--] is adding support for raw SQL queries for unmapped types. Why is this big news Until now you could only return entity types with raw SQL queries. You could also configure views as keyless entities. But this is clunky. This new feature fixes everything. You don't have to worry about SQL injection attacks. This isn't an interpolated string at all. The SqlQuery method will capture interpolated parameters and convert them to SQL parameters. You can also execute raw SQL queries and return results from: - Views - Functions - Stored procedures It also supports composing raw SQL queries with" [X Link](https://x.com/mjovanovictech/status/1705959813404852475) 2023-09-24T14:58Z 28.2K followers, 39K engagements "@CodeNotFound Implementations of repositories would go into the Infrastructure layer" [X Link](https://x.com/mjovanovictech/status/1706202295661216254) 2023-09-25T07:01Z 37K followers, [----] engagements "Here are some concepts that will make you a better engineer: β Event-driven Architectures β Functional programming β Domain-Driven Design β Clean Architecture β SQL Databases Here's what won't help: β Hating on any of these and discouraging people because you think it sucks. There's more than one way to write good software. Have an open mind" [X Link](https://x.com/mjovanovictech/status/1706266726952784125) 2023-09-25T11:17Z 28K followers, 33.5K engagements "Do you want the secret to being a better software engineer I'll share what I did to improve my skills. Side projects made me a better software engineer. I tried to spend 30-45 minutes daily hacking away at my side project. I focused on a few specific things: - Software architecture - Cloud services - New libraries Sometimes I would try to do everything wrong on purpose. - Software architecture I didn't need - New libraries I will never use - Unnecessary complexity - Overengineering This wasn't a waste of time because I was on a mission. I learned valuable lessons and built an instinct of what" [X Link](https://x.com/mjovanovictech/status/1706630251093110965) 2023-09-26T11:22Z 22.5K followers, 20.9K engagements "What is in Domain-Driven Design Here's a practical explanation so you can easily understand. A bounded context is a logical boundary in which a domain model applies. When you try to model a large domain it isn't easy to use a single model. Different system parts will use a subtly different representation of the same model. Looking at the and bounded contexts notice how we have: - Unrelated concepts (Booking Review) - Shared concepts (Customer Apartment) In this case both the and have a concept of customers and apartments. But different contexts can have very different representations of" [X Link](https://x.com/mjovanovictech/status/1706991372446654800) 2023-09-27T11:17Z 28K followers, 48K engagements ". And it makes the whole process incredibly simple. It's a .NET library that gives you all the tools you need to build modern distributed systems. The core concept of any messaging library is messages. A message can be a record class or interface. It should only contain data properties. The publisher and consumer need to know the message format so you need to be able to share it. You can do this with a shared library or a NuGet package. After that pick one of the supported transport mechanisms for messages. You can use several different transports: - Azure Service Bus - Amazon SQS - RabbitMQ" [X Link](https://x.com/mjovanovictech/status/1707278719205736940) 2023-09-28T06:19Z 37.5K followers, 55K engagements "is a fantastic validation library for .NET and you can use it to solve cross-cutting concerns. It's a mainstay in the applications I build. FluentValidation helps by allowing me to : - Write strongly typed validators - Create reusable business rules - Write async validation rules But which type of validation is it best for I make a difference between input and business validation. Input validation only checks that the request is processable. Business validation checks the system state for preconditions. I prefer using FluentValidation for input validation only. Tomorrow I'll show 29127+" [X Link](https://x.com/mjovanovictech/status/1707640256726515940) 2023-09-29T06:15Z 36.6K followers, 31.6K engagements "There's no looking back after . It's an architectural approach where you group your files into "vertical slices". As opposed to layers like in the Onion or Clean Architecture. Thinking in terms of vertical slices allows you to treat each request separately. If you're building an API the system already breaks down into commands (POST/PUT/DELETE) and queries (GET). And it makes sense to treat each request as a distinct use case. All the files for a single use case are in one folder. So the cohesion for one use case is very high - the files are all related to that use case. As Jimmy Bogard" [X Link](https://x.com/mjovanovictech/status/1707716157182996840) 2023-09-29T11:17Z 28.3K followers, 48.8K engagements "EF Core [--] finally fixes Value Objects. There's a new feature coming in EF8 called Complex Types. It allows you to map objects as part of the domain model and it's a better solution for Value Objects than Owned types. Check out what's possible here π" [X Link](https://x.com/mjovanovictech/status/1708010561819041827) 2023-09-30T06:47Z 28.1K followers, 13K engagements "@graefoster I think you'd still need a Domain since an entity can be part of many use cases" [X Link](https://x.com/mjovanovictech/status/1708010694388351124) 2023-09-30T06:47Z 28.3K followers, [---] engagements "Do you want to build robust and reliable applications that can scale indefinitely and handle any number of requests A critical aspect of achieving this is reliable monitoring of the application's health. You want a short feedback loop when something goes wrong. That's where come in. Health checks provide a way to monitor and verify the health of various components of an application including: - APIs - Caches - Databases - External services And ASP .NET Core has built-in support for implementing health checks. Do you want to learn more about health checks Start here" [X Link](https://x.com/mjovanovictech/status/1708078232874955209) 2023-09-30T11:15Z 28K followers, 39.9K engagements "If you want to accelerate your .NET and software architecture skills check out The .NET Weekly - my newsletter with 29000+ engineers. Join us here" [X Link](https://x.com/mjovanovictech/status/1708093245157261333) 2023-09-30T12:15Z 28.1K followers, [----] engagements "How can you solve as a cross-cutting concern I'll show you an elegant solution using the middleware approach. You need to have two things before you can start. A way to separate validation from your use case. And a way to wrap each request with middleware. I'm using two fantastic libraries to achieve this: - MediatR - FluentValidation With MediatR you can use the IPipelineBehavior to run code before and after each request in the pipeline. And FluentValidation allows you to define strongly-typed validation rules. In yesterday's newsletter 29237+ engineers learned how to implement validation" [X Link](https://x.com/mjovanovictech/status/1708373997203681459) 2023-10-01T06:51Z 28.1K followers, 18.6K engagements "I appreciate the of a monolith system. Especially when it comes to database handling . - Open a transaction - Do some work - Commit the changes Walk in the park. Right But this doesn't work in distributed systems because you can have many different databases involved. So you have to use a distributed transaction. You can choose between: - Two-Phase Commit (2PC) - Saga (eventual consistency) A two-phase commit gives you an atomic transaction. But it can be a performance bottleneck. So I prefer to use the Saga pattern with messaging. It enables an application to maintain data consistency across" [X Link](https://x.com/mjovanovictech/status/1708442249866944523) 2023-10-01T11:22Z 22.6K followers, 66.9K engagements "What is an in - This is one of the first concepts you will encounter when learning about DDD. Think about it like this: - Do I need to track this object throughout the application's lifetime If the answer is yes you need a way to identify this Entity at any point. This is why an Entity is defined by its ID. Another key aspect of Entities is that they also contain behavior. Entities encapsulate and protect the most important business rules and invariants. You implement this by exposing methods that allow you to manipulate state and trigger side effects. I hope this post demystified this" [X Link](https://x.com/mjovanovictech/status/1708729459342180531) 2023-10-02T06:23Z 28K followers, 56.6K engagements "is one of the most powerful in .NET. And in [--] minutes I'll teach you all the basics so you can start using it. FluentValidation uses a fluent interface and lambda expressions for building strongly-typed validation rules. You start by inheriting from the AbstractValidatorT base class. To specify a validation rule for a particular property call the RuleFor method. From there you can write rules ensuring properties are: - Not null - Not empty - Have a min/max length - Are equal/not equal to some value - Define your completely custom rule It also supports complex properties and collections. It's" [X Link](https://x.com/mjovanovictech/status/1709090907788607918) 2023-10-03T06:20Z 24.2K followers, 21.4K engagements "How do you migrate from Monolith to Microservices architecture Bad way: - Start building a monolith without a plan - End up writing a tightly coupled mess - Realize you have a problem - Save face by moving to microservices - End up with a distributed monolith π© Smart way: - Start building a Modular Monolith - Define module boundaries well - Make modules loosely coupled - Isolate database dependencies - Migrate to Microservices by extracting modules Modular design Tightly coupled mess" [X Link](https://x.com/mjovanovictech/status/1709165614273569132) 2023-10-03T11:16Z 28.2K followers, 16.4K engagements "Did you ever use the client for calling APIs Refit is a type-safe wrapper for interacting with - . It's an alternative to the built-in HttpClient in .NET. Refit requires writing less code to achieve the same result. Here are a few excellent Refit features: - All HTTP verbs - Route parameters - Request/response serialization - Dependency injection configuration A Refit client is a simple interface where each method represents an API endpoint call. You decorate the method with an HTTP attribute like Get or Post. In the attribute you define the API route and any route parameters. Refit has been" [X Link](https://x.com/mjovanovictech/status/1709452731151274177) 2023-10-04T06:17Z 28.3K followers, 28.3K engagements "Why is - considered The main arguments against DDD come from these two reasons: - Misunderstanding - Misapplication Everyone wants to jump on the latest trend and DDD is one of the current trends. What is the biggest symptom of poor understanding of DDD Misalignment with project complexity. You don't need DDD with a simple or well-defined domain. DDD is best suited for complex business domains where ambiguity and intricacies require a structured approach. One more symptom of poor DDD is excessive use of abstractions. DDD encourages creating domain entities aggregates and value objects. This" [X Link](https://x.com/mjovanovictech/status/1709527932140437819) 2023-10-04T11:16Z 28K followers, 27.5K engagements "@hermoter Did you run into any implementations of Onion/Clean that made you think they were significantly different" [X Link](https://x.com/mjovanovictech/status/1709824897868816845) 2023-10-05T06:56Z 28.3K followers, [----] engagements "@ProgressiveCod2 Do you think this only adds to the confusion" [X Link](https://x.com/mjovanovictech/status/1709824964356948074) 2023-10-05T06:56Z 28.4K followers, [---] engagements "@thejustinwelsh Why not try split testing yourself I see you already have tracking in place. Run experiments every week and in 6-12 months you will drastically improve. I'm using @posthog for my A/B testing and their experiments feature is π₯" [X Link](https://x.com/mjovanovictech/status/1709874769074532488) 2023-10-05T10:14Z 28.3K followers, [---] engagements "Do you want to win amazing prizes by writing code Join the edition for a chance to win $6660 in cash and $3000 in swag prizes. What do you need to build You will be building an SDK for the Treblle platform. Your SDK can use any language or framework of your choosing. After submitting your SDK the judges will go through your code and here's what they will be looking for: - Masking - Load Balancing - JSON Schema (80% covered at least) - Securing API Keys - Example project using your SDK - Use our SDK template - Updated README with complete instructions on how to set up said SDK - Setup SDK" [X Link](https://x.com/mjovanovictech/status/1709890275705782320) 2023-10-05T11:16Z 28.3K followers, [----] engagements "Do you build complex could help you build even faster. NServiceBus is a messaging framework that simplifies the development of distributed scalable and maintainable .NET applications. Here's what you get with NServiceBus: - Publish/Subscribe messaging - Automatic retries and error handling - Sagas - Outbox pattern And it's effortless to get started in .NET - configure an endpoint and start sending messages. Tomorrow I'll show 29237+ engineers how to get started with NServiceBus. Find out why NServiceBus is one of the most powerful messaging frameworks in .NET. If you want to join us" [X Link](https://x.com/mjovanovictech/status/1710182203424907626) 2023-10-06T06:36Z 37K followers, 26.8K engagements "How can you JSON in .NET I use the Options pattern to create strongly typed configuration values. The values can come from: - JSON files - Application secrets - Environment variables - Azure App configuration However setting up configuration values is error-prone. Here are just a few things that can go wrong: - Passing an incorrect section name to IConfiguration.GetSection - Forgetting to add the settings values in appsettings.json - Typo in a property name in the class or the configuration - Data type mismatch resulting in incompatible values - Unbindale properties without a setter The" [X Link](https://x.com/mjovanovictech/status/1710264291918590199) 2023-10-06T12:02Z 28.2K followers, 46.7K engagements "@nthonymiller Would need to do some digging on Wolverine as I'm the least familiar with it. I have only seen some articles that Jeremy and Oskar have been sharing" [X Link](https://x.com/mjovanovictech/status/1710545026315342200) 2023-10-07T06:38Z 23.9K followers, [--] engagements "is a centralized approach to microservices communication. One of the services takes on the role of the orchestrator and coordinates the communication between services. Orchestration uses command-driven communication. The command communicates the intent of the action. The sender wants something to happen and the recipient doesn't need to know who sent the command. It has some excellent benefits: - Simple - Centralized - Ease of troubleshooting - Monitoring is straightforward But the drawbacks of orchestration are: - Tight coupling - Single point of failure - Difficulty adding removing or" [X Link](https://x.com/mjovanovictech/status/1710626728291254767) 2023-10-07T12:02Z 28.2K followers, 66.7K engagements "Are you building using the cloud If you're a .NET developer there's a high likelihood that you're using Azure. You'll need a messaging system sooner or later. Azure Service Bus is a fully managed enterprise message broker with message queues and publish-subscribe topics. But do you want to manage the infrastructure and broker topology Probably not. And you won't have to if you use NServiceBus. NServiceBus is a messaging framework that simplifies building reliable scalable and maintainable distributed systems. Yesterday 29297+ engineers learned how to start using NServiceBus. Miss the issue" [X Link](https://x.com/mjovanovictech/status/1710913257790157262) 2023-10-08T07:01Z 28.2K followers, 27.8K engagements "A simple way to start with Domain-Driven Design: - Identify business logic that could live in your entity - Push the logic down to the domain layer - Repeat this process again Refactoring one step at a time. Business logic ends up in the domain. And it's easily testable" [X Link](https://x.com/mjovanovictech/status/1710986123172778366) 2023-10-08T11:50Z 28.1K followers, 18.5K engagements "What is and why you should be using it for in .NET. Serilog comes with structured logging out of the box. What is structured logging It's a practice where you apply the same message format to all your application logs. All your logs will have a similar structure allowing them to be easily searched and analyzed. Serilog is unique because it also supports sinks. Sinks can write log events to storage in various formats. Here are a few examples of Serilog sinks: - File - Console - Amazon S3 - Application Insights - DataDog - Seq Integrating any sink is straightforward because they're abstracted" [X Link](https://x.com/mjovanovictech/status/1711036946519142683) 2023-10-08T15:12Z 37K followers, 42.3K engagements "P.S. I write about software engineering & architecture every Saturday. 29000+ people read it for practical guidance to accelerate their skills. Join free here π https://milanjovanovic.tech/ https://milanjovanovic.tech/" [X Link](https://x.com/mjovanovictech/status/1711271872594153504) 2023-10-09T06:46Z 36.9K followers, [----] engagements "Do you know how the MediatR works It can be a game-changer for your application. Each request sent using MediatR goes through a custom request pipeline. This gives you the power to define custom behavior before or after each request. This is similar to how ASP .NET Core middleware works. You create a class implementing the IPipelineBehavior interface and register it with MediatR. A few things I used pipeline behaviors for: - Logging - Validation - Transactions - Exception handling - Performance measurements So you can implement any cross-cutting concern using this approach. It's essential to" [X Link](https://x.com/mjovanovictech/status/1711274829263847484) 2023-10-09T06:58Z 28.3K followers, 32.8K engagements "π Bonus tip Here's how you can use MediatR pipelines to implement validation:" [X Link](https://x.com/mjovanovictech/status/1711301113503248423) 2023-10-09T08:42Z 28.3K followers, [----] engagements "Feature flags in .NET allow you to wrap application features in a conditional statement. You can then toggle the feature on or off in runtime to control which features are enabled. Feature flags are useful for: - Trunk-based development - Phased rollouts - A/B testing" [X Link](https://x.com/mjovanovictech/status/1711358395289076140) 2023-10-09T12:30Z 28K followers, 15.4K engagements "How I would build a application: - No error handling - No tests whatsoever - Inefficient database queries - Scalability as an afterthought - Make components tightly coupled - Definitely skip the dependency injection - Don't follow the single responsibility principle And if you want to build a good application Just do the opposite of everything above" [X Link](https://x.com/mjovanovictech/status/1711410405019463908) 2023-10-09T15:56Z 28.1K followers, 75.7K engagements "@davidpine7 Refit π" [X Link](https://x.com/mjovanovictech/status/1711629184928219526) 2023-10-10T06:26Z 28.2K followers, [---] engagements "C# has been getting many new features in recent versions. And one that stands out is . What is it Pattern matching lets you check if an object has specific characteristics: - Is null or is not null - Is of a particular type - Property has a specific value I enjoy using it for type checks and I particularly like switch expressions. However the more complex the pattern is the more I dislike it. Sure it can be concise and you usually write less code. But you also need to think about readability and maintainability. Take a look at the example from the code snippet. Which version do you find more" [X Link](https://x.com/mjovanovictech/status/1711638682703179848) 2023-10-10T07:03Z 28.1K followers, 49.8K engagements "Do you want to horizontally scale your API You'll need a Load Balancer. And in the .NET world - you can use YARP. It's a reverse proxy built with .NET. You can set up YARP with [--] lines of code and some JSON configuration. And you're ready to start serving requests" [X Link](https://x.com/mjovanovictech/status/1711695576834744454) 2023-10-10T10:50Z 22.3K followers, 29K engagements "@uvukasinovic Which language does it differently" [X Link](https://x.com/mjovanovictech/status/1711772191878967643) 2023-10-10T15:54Z 37K followers, [---] engagements "What is a in Domain-Driven Design Value Objects are immutable types that express some concepts of the domain. There are types in the domain that only make sense in the context of an entity - without an identity of their own. Another aspect of Value Objects is that they are defined by their values - hence the name. Two Value Objects are equal if their values are the same. Here are a few examples of Value Objects: - Temperature - Date Range - Address - Money So the two core concepts of Value Objects are immutability and structural equality. How would you define a Value Object in C# You can" [X Link](https://x.com/mjovanovictech/status/1712001679393014089) 2023-10-11T07:06Z 28.2K followers, 29.6K engagements "@GregOnNet Implicit operator on ResultT π" [X Link](https://x.com/mjovanovictech/status/1712054296211071251) 2023-10-11T10:35Z 28K followers, [---] engagements "You aren't paid to write code. You're paid to be a problem solver. Code is your tool. I don't spend my time only thinking about the code I will write or which design patterns I want to use. Those are all important but. Understanding the problem you are solving and focusing on that is what gets you results. P.S. If you know that code is just a tool repost this β» so others can find out" [X Link](https://x.com/mjovanovictech/status/1712078692220834012) 2023-10-11T12:12Z 28.1K followers, 36.6K engagements "@ProgressiveCod2 Aren't printers obsolete already" [X Link](https://x.com/mjovanovictech/status/1712080602906739089) 2023-10-11T12:19Z 28.1K followers, [---] engagements "@slow_developer Seems like it Haider. π" [X Link](https://x.com/mjovanovictech/status/1712082214656123386) 2023-10-11T12:26Z 28.3K followers, [---] engagements "@rana_cse_seu Yes it targets .NET [--] also" [X Link](https://x.com/mjovanovictech/status/1712082333019349221) 2023-10-11T12:26Z 22.8K followers, [--] engagements "@RaulJuncoV Good negotiation skills help π" [X Link](https://x.com/mjovanovictech/status/1712086361723818236) 2023-10-11T12:42Z 25K followers, [---] engagements "Here are [--] use cases for background tasks: - Sending email - Database backups - Data synchronization - Temporary file cleanup - Scheduled notifications - Clearing stale cache items The idea is to offload some work to the background and perform it asynchronously" [X Link](https://x.com/mjovanovictech/status/1712350984263827797) 2023-10-12T06:14Z 28.1K followers, 36.2K engagements "Sometimes you need a more robust job scheduler. And Quartz is an excellent job scheduling system that has served me well in the past. Here's how to get started with Quartz https://www.milanjovanovic.tech/blog/scheduling-background-jobs-with-quartz-net https://www.milanjovanovic.tech/blog/scheduling-background-jobs-with-quartz-net" [X Link](https://x.com/mjovanovictech/status/1712350988848251169) 2023-10-12T06:14Z 42.7K followers, [----] engagements "Modular monoliths make working on challenging systems fun. It gives you the logical architecture of microservices without the operational complexity. You can safely determine the boundaries between modules. And refactoring is less risky" [X Link](https://x.com/mjovanovictech/status/1712441826869743823) 2023-10-12T12:15Z 28.3K followers, [----] engagements "P.S. I write about software engineering & architecture every Saturday. 29000+ people read it for practical guidance to accelerate their skills. Join free here" [X Link](https://x.com/mjovanovictech/status/1712725796928774381) 2023-10-13T07:03Z 22.5K followers, [---] engagements "P.S. I write about software engineering & architecture every Saturday. 29000+ people read it for practical guidance to accelerate their skills. Join us here" [X Link](https://x.com/mjovanovictech/status/1712725833205309519) 2023-10-13T07:03Z 22.8K followers, [---] engagements "What is and how does it work in ASP .NET Core Dependency Injection is a software design pattern used in ASP .NET Core to achieve the Inversion of Control (IOC) principle. This promotes loose coupling and makes your code more testable maintainable and extensible. DI allows you to inject dependencies into your classes rather than create them within the class. ASP .NET Core provides three main service lifetimes: - Singleton - Scoped - Transient However ASP .NET Core's built-in DI system sometimes needs a little help to achieve more advanced scenarios. So I want to introduce you to a powerful" [X Link](https://x.com/mjovanovictech/status/1712726081541648882) 2023-10-13T07:04Z 28.1K followers, 41.4K engagements "@fori920 It uses reflection: once. At the startup of the application when registering services. How will an extra few microseconds spent scanning assemblies crush your application's performance" [X Link](https://x.com/mjovanovictech/status/1712739921859956881) 2023-10-13T07:59Z 28.1K followers, [---] engagements "Here's a nice example of implementing the decorator pattern using DI:" [X Link](https://x.com/mjovanovictech/status/1712740172486381868) 2023-10-13T08:00Z 28.3K followers, [----] engagements "@bradwellsb Sweet thanks for sharing it Bradley. π Which approach do you use when writing tests" [X Link](https://x.com/mjovanovictech/status/1712740715317395475) 2023-10-13T08:03Z 23.9K followers, [--] engagements "What is the simplest way to improve . Caching can significantly improve the performance and scalability of your application. You can introduce a memory cache for frequently requested data. It reduces the work required to generate content. But what type of data should you cache Caching works best with data that changes infrequently and is expensive to generate. Think of any heavy query you have running on the database. ASP .NET Core supports several different caches. The simplest cache is based on the IMemoryCache. But it only makes sense if you have a single web server. IMemoryCache" [X Link](https://x.com/mjovanovictech/status/1713087988593213950) 2023-10-14T07:02Z 22.2K followers, 42.9K engagements "How to combine FluentValidation with the Options pattern The Options pattern lets you create strongly typed settings classes in ASP .NET Core. But it's important to validate these settings at startup. Here's how to do it π" [X Link](https://x.com/mjovanovictech/status/1713134060145352752) 2023-10-14T10:06Z 28K followers, 14.6K engagements "EF [--] filled the gap for executing . You can now run a proper SQL UPDATE statement using LINQ. I could've used this years ago but it's better late than never. ExecuteUpdate allows you to write a query and run a bulk update operation on the entities matching that query. If you want to update a collection of entities before EF [--] you need to load the entities into memory and update them using the DbContext. One big caveat with this new feature π¨ ExecuteUpdate runs directly on the database without loading any entities into memory. Any updates (or deletes) aren't reflected in the change tracker." [X Link](https://x.com/mjovanovictech/status/1713450923022761993) 2023-10-15T07:05Z 28.3K followers, 39.7K engagements "Bulk updates are just part of the new features. You can also use bulk deletes. Here's how: https://www.milanjovanovic.tech/blog/how-to-use-the-new-bulk-update-feature-in-ef-core-7 https://www.milanjovanovic.tech/blog/how-to-use-the-new-bulk-update-feature-in-ef-core-7" [X Link](https://x.com/mjovanovictech/status/1713462028646359431) 2023-10-15T07:49Z 36.9K followers, [----] engagements "Here are [--] ways you can use the HttpClient in .NET: - Create an instance every time (bad) - Use the IHttpClientFactory (better) - Use a named HttpClient - Use a typed HttpClient So what is the best approach" [X Link](https://x.com/mjovanovictech/status/1713509488492163298) 2023-10-15T10:57Z 23.3K followers, 35.8K engagements "Do you know all [--] ways to define in . Middleware allows you to introduce additional logic before or after executing an HTTP request. You are already using many of the built-in middleware available in the framework. But I'm going to show you three approaches to define custom middleware. Request Delegates Convention based Factory based You can see each approach in the slides below. What is your preferred way to create middleware in ASP .NET Core REPOST = teach your audience about .NET middleware β» P.S. π If you liked this consider joining The .NET Weekly - my newsletter with 29000+ engineers." [X Link](https://x.com/mjovanovictech/status/1713813163328545261) 2023-10-16T07:04Z 28.2K followers, 30.5K engagements "I optimized a poorly performing API endpoint. From β‘β‘β‘ . This was my high-level process: - Focus on bottlenecks first (biggest payoff) - Reduce the number of round trips - Caching as a last resort (complexity) - Parallelize external calls" [X Link](https://x.com/mjovanovictech/status/1713842285836747155) 2023-10-16T09:00Z 22.8K followers, 26.9K engagements "Here are [--] tips for being a better software engineer in 2023: - Keep learning and acquiring new skills - Invest in code quality - Work on complex systems - Be comfortable in the cloud - Take care of yourself Actually this will always work - not just in 2023" [X Link](https://x.com/mjovanovictech/status/1713887603928313902) 2023-10-16T12:00Z 22.2K followers, 11.6K engagements "Are "blueprint" architectures bad No I don't think so. And here's why. I think a blueprint architecture can be excellent for some teams. One example of a prescriptive architecture is Clean Architecture. - Domain layer at the core - Application layer with use cases - External concerns on the outskirts - Dependencies should point inwards You can have more (or fewer) layers if you want to. It's not set in stone. Clean architecture isn't revolutionary. But it's prescriptive about how you should structure the code. And for some teams this can be all they need. You have to understand this - not all" [X Link](https://x.com/mjovanovictech/status/1714175730957906128) 2023-10-17T07:05Z 37K followers, 25.6K engagements "Here's an easy way to improve API performance - Response compression. Network bandwidth is a limited resource. So you should at least consider the benefits of response compression. You trade off CPU and memory for less network bandwidth" [X Link](https://x.com/mjovanovictech/status/1714204704727503203) 2023-10-17T09:00Z 28.2K followers, [----] engagements "Here are [--] tips for writing clean code: - Early return principle - Merge if statements - Use LINQ for conciseness - Bool expression - Method Writing clean code is subjective. But these are a few principles I follow diligently. Small changes big impact" [X Link](https://x.com/mjovanovictech/status/1714250074241290381) 2023-10-17T12:00Z 37K followers, 14.5K engagements "But how do you actually write clean code I'll walk you through a concrete example of how to refactor to clean code. Start with bad code. End up with clean code. Here's how to get started:" [X Link](https://x.com/mjovanovictech/status/1714251252068975099) 2023-10-17T12:05Z 22.5K followers, [----] engagements "You should never return null collections in C#. There are better solutions. What problem do null collections cause You will typically iterate over a collection in a loop. But if your method returns null collections this can lead to potential errors. Your code must handle the null case and check for null before accessing any collection elements. Adding a null check every time can make the code harder to read. It's even worse if the calling code doesn't handle the null case. Things will blow up at runtime which isn't easy to diagnose. You could argue that a null value expresses some intent. But" [X Link](https://x.com/mjovanovictech/status/1714541291764105639) 2023-10-18T07:17Z 28.2K followers, 46.8K engagements "How do you extend a class without changing it You can use the Decorator (Proxy) pattern. A common requirement I had was adding caching to a repository. Here's how you can achieve this with some simple code:" [X Link](https://x.com/mjovanovictech/status/1714567100218343811) 2023-10-18T09:00Z 25.9K followers, 11.4K engagements "Many things can fail in distributed systems (and they will). Your goal should be to reduce the surface area for things to go wrong. How can you do this Implementing reliable messaging is a good starting point. The Outbox pattern can help you achieve this" [X Link](https://x.com/mjovanovictech/status/1714612395694346745) 2023-10-18T12:00Z 25.5K followers, 17K engagements "@HassanRezkHabib I'm not a believer in TDD but I've nothing against the approach. I simply find it easier to write my code first and then cover it with tests" [X Link](https://x.com/mjovanovictech/status/1714902034350997884) 2023-10-19T07:11Z 22.3K followers, [----] engagements "How many ways can you think to check if a collection contains duplicates The algorithm should be as fast as possible and consume the least amount of memory. Here are a few that come to mind: - Foreach + HashSet - Distinct + Count - GroupBy + Count - ToHashSet + Count" [X Link](https://x.com/mjovanovictech/status/1714974806007775316) 2023-10-19T12:00Z 25.4K followers, 29.5K engagements "I'm sure you can come up with a few more ideas. Did you think about all the edge cases in your solution: - Duplicate element is in the middle - Duplicate element is in the end - No duplicate This solution comes out on top:" [X Link](https://x.com/mjovanovictech/status/1714974808432169160) 2023-10-19T12:00Z 28.2K followers, [----] engagements "When would you want to use multiple EF DbContexts Here are [--] use cases I've seen: - Multiple (physical) databases - Separating concerns - Modular monolith - Read replicas In a modular monolith application each module has a database. And EF solves this problem nicely" [X Link](https://x.com/mjovanovictech/status/1715291869700047006) 2023-10-20T09:00Z 22.2K followers, 10.6K engagements "How can you visualize your software architecture The majority of software architecture diagrams I've seen are a total mess. But you can use the C4 model to standardize your diagrams. It's a lightweight approach to describing your software architecture" [X Link](https://x.com/mjovanovictech/status/1715337215641882939) 2023-10-20T12:00Z 22.2K followers, 38.5K engagements "@streetsofboston This idea is hard to grasp for many people" [X Link](https://x.com/mjovanovictech/status/1715356471846658086) 2023-10-20T13:17Z 28.2K followers, [---] engagements "Let's start with the obvious - those are all cloud technologies π So first of all I think this is practical in non-cloud deployments. It's on par (or better) than Nginx in performance so you could consider it a replacement. It integrates nicely with the .NET ecosystem: auth rate limiting middleware" [X Link](https://x.com/mjovanovictech/status/1715630913868960244) 2023-10-21T07:27Z 22.6K followers, [----] engagements "What is a It's a simple technique to implement the fail-fast principle. A guard clause throws an exception if the input is not valid. It's a staple in defensive programming for C#. Here's how it can make your code better:" [X Link](https://x.com/mjovanovictech/status/1715654231548412122) 2023-10-21T09:00Z 22.2K followers, 12.1K engagements "What is a developer's worst nightmare You get an alert on Friday that the feature you just released crashed the system. Now you have to scramble for hours to fix the issue. But it doesn't have to be like this. You can use feature flags to control which features are enabled" [X Link](https://x.com/mjovanovictech/status/1715699595039199244) 2023-10-21T12:00Z 22.6K followers, 31.3K engagements "Feature flags allow you to turn features on or off conditionally. And you do this without redeploying the code. Here's how:" [X Link](https://x.com/mjovanovictech/status/1715699600462336396) 2023-10-21T12:00Z 22.2K followers, [----] engagements "I write about software engineering & architecture every Saturday. 29000+ engineers read it for practical tips and guidance to accelerate their .NET skills. Join free here:" [X Link](https://x.com/mjovanovictech/status/1715753289155764248) 2023-10-21T15:33Z 22.2K followers, [---] engagements "I write about software engineering & architecture every Saturday. 29000+ engineers read it for practical tips and guidance to accelerate their .NET skills. Join free here:" [X Link](https://x.com/mjovanovictech/status/1715753398446776825) 2023-10-21T15:34Z 22.2K followers, [----] engagements "@RaulJuncoV But difficult to accomplish" [X Link](https://x.com/mjovanovictech/status/1715753624117113172) 2023-10-21T15:35Z 28.4K followers, [---] engagements "@antotoki That is true. Ideally you'd keep the old infrastructure in place until the feature is fully rolled out. If it means duplicating data in the DB is that a big price to pay" [X Link](https://x.com/anyuser/status/1715754034592661779) 2023-10-21T15:36Z [--] followers, [---] engagements "@twitsinfiltro @Vojvoda_Boki Yes Will post the benchmarks when I'm back home" [X Link](https://x.com/mjovanovictech/status/1715754216667431075) 2023-10-21T15:37Z 28.2K followers, [--] engagements "How do you create modules in a Modular monolith A good starting point is separating by bounded contexts. Bounded contexts define the explicit boundaries between modules. Then you need to solve coupling: - Database dependencies - Communication" [X Link](https://x.com/mjovanovictech/status/1715986490893725965) 2023-10-22T07:00Z 22.2K followers, 28.2K engagements "Each module contains a cohesive set of functionalities and is isolated from other modules in the system. A few rules for modules: - Communicate only through a public API - Can't share database tables - Can't query from other modules Learn more here:" [X Link](https://x.com/mjovanovictech/status/1715986498397319588) 2023-10-22T07:00Z 22.2K followers, [----] engagements "Rate limiting can make your APIs more robust and secure. It's a technique to limit the number of requests to a server or an API. There are four popular rate limit algorithms: - Fixed window - Sliding window - Token bucket - Concurrency" [X Link](https://x.com/mjovanovictech/status/1716016623918665728) 2023-10-22T09:00Z 22.6K followers, 44.7K engagements "This C# feature can help you in code for free. I'm talking about file scoped namespaces. It's available since C# [--] and is incredibly easy to use. You can finally drop the unnecessary block statement around a namespace declaration. Simple and effective. It's a standard on all my projects. And there's even a code cleanup available in Visual Studio. Did you start using this feature REPOST = Teach your audience about file-scoped namespaces β»" [X Link](https://x.com/mjovanovictech/status/1716347836239950175) 2023-10-23T06:56Z 25.1K followers, 21.7K engagements "Here are [--] tips to improve API performance: - Caching - Pagination - Connection pooling - Response compression - Use asynchronous calls" [X Link](https://x.com/mjovanovictech/status/1716379015970250921) 2023-10-23T09:00Z 22.3K followers, 28.4K engagements "My website has the simplest tech stack ever: - Next.js - TailwindCSS - GitHub Actions - Hosting: Netlify It gets 80k views monthly and costs less than $20/year to run. Since the early days I added: - Blogging engine with MDX (Markdown) - A/B testing Start simple ship fast" [X Link](https://x.com/mjovanovictech/status/1716424367750480318) 2023-10-23T12:00Z 22.7K followers, 51.1K engagements Limited data mode. Full metrics available with subscription: lunarcrush.com/pricing
@mjovanovictech Milan JovanoviΔMilan JovanoviΔ posts on X about milan, azure, core, events the most. They currently have [------] followers and [----] posts still getting attention that total [------] engagements in the last [--] hours.
Social category influence travel destinations #5356 technology brands stocks finance social networks countries cryptocurrencies celebrities currencies gaming
Social topic influence milan #201, azure, core #1205, events, if you, what is, api, how can, clean, project
Top accounts mentioned or mentioned by @progressivecod2 @petarivanovv9 @devleaderca @antonmartyniuk @davedotnet @danpdc @davidfowl @michel1973 @vojvodaboki @thecodeman @nonlinearjames @florinpop1705 @mcclellandruss @catalinmpit @franc0fernand0 @runbikebbq @mmctrueengineer @thearchitect452 @milanmilanovic @rauljuncov
Top assets mentioned Microsoft Corp. (MSFT) Alphabet Inc Class A (GOOGL) Fetch (FET) Monolith (TKN) Merge (MERGE)
Top posts by engagements in the last [--] hours
"You should never return null collections in C#. There are better solutions. What problem does returning null collections cause Collections are typically iterated over in a loop. If your method returns null collections this can lead to potential errors. The calling code must handle the null case and check for null before accessing any collection elements. You need to add a null-check every time that can clutter the calling code and make it harder to read. It's even worse if the calling code doesn't handle the null case. Things will blow up at runtime which isn't easy to diagnose. I think it's"
X Link 2023-04-03T06:33Z 44K followers, 42.6K engagements
"How can you find a minimum element with LINQ Before .NET [--] you had to sort the collection in ascending order and take the first element. But .NET [--] introduced the MinBy method which does precisely this. Don't try to use this with EF Core as it's still unsupported. #dotnet"
X Link 2023-05-08T06:04Z 40.2K followers, 11.8K engagements
"Where does the Unit of Work pattern belong in your code If you're using MediatR you can introduce a TransactionScope in your pipeline to create an ambient transaction. Never heard of TransactionScope I'll show you how to use it in this video π"
X Link 2023-06-30T01:06Z 28.1K followers, 14.8K engagements
"Most people think Redis is just used for caching. But it can do so much more Here are a few not-so-common use cases for Redis:"
X Link 2023-06-20T06:04Z 45K followers, 36.8K engagements
"C# Tip π‘ How do you create your DTOs We can use to represent DTOs starting from C# [--]. The example from the picture uses a primary constructor so that the record definition can become a one-liner. It's a nice and concise way to define types"
X Link 2023-06-29T06:04Z [--] followers, [---] engagements
"Twitter is rate-limiting its users - us. And this is an excellent time to talk about rate limiting in .NET [--]. Here are the numbers: - [------] posts/day (Twitter Blue) - [-----] posts/day (unverified) - [---] posts/day (new unverified) Why are they doing it"
X Link 2023-07-13T00:47Z 28.2K followers, 19.5K engagements
"How can you build a reverse proxy in .NET A reverse proxy is an intermediary between clients and servers routing client requests to the appropriate Microservice. [--] common use cases: - Load balancing - Monitoring - Caching - Security One more use case for a reverse proxy π"
X Link 2023-07-10T20:52Z 28.1K followers, 43.2K engagements
"@WestDiscGolf Biased π Just kidding I've worked with both before and I enjoy them"
X Link 2023-07-11T06:50Z 36.9K followers, [----] engagements
"What are some common Domain-centric architectures - Hexagonal architecture - Clean architecture - Onion architecture They all revolve around the same idea"
X Link 2023-07-12T06:04Z 28.1K followers, [----] engagements
"1. Domain layer This is where your core domain entities and business logic lives. You will also see events and (entity) repository interfaces (not to be confused with query-side repositories)"
X Link 2023-07-12T06:04Z 25.9K followers, [----] engagements
"4. Presentation layer This is the entry point into your application. It could be a SPA application or a GRPC service. But most commonly this will be a set of API endpoints delegating the request to the inner layers. The presentation layer should be as thin as possible"
X Link 2023-07-12T06:04Z 28.1K followers, [----] engagements
"@Pool I built this a while back: It doesn't apply everything I know now but I think it's a decent enough implementation of CA. Let me know what you think if you end up reviewing it. CA/Onion are almost one and the same. And most .NET CA implementations are"
X Link 2023-07-12T12:19Z 28K followers, [---] engagements
"The biggest mistake I made as a beginner engineer: Not mastering SQL ORMs can obscure how databases really work. Instead focus on the following: - SQL fundamentals - Data modeling - Transactions - Indexing Master relational databases Use SQL daily. You'll grow 10x faster"
X Link 2023-07-19T23:27Z 24.9K followers, 34.6K engagements
"Did you try out the new Rate Limiting in .NET [--] It's a technique to limit the number of requests to a server or an API. There are [--] popular rate limit algorithms: - Fixed window - Sliding window - Token bucket - Concurrency Here's how to use them π"
X Link 2023-07-20T00:47Z 28.1K followers, 23.3K engagements
"It took me [--] years to get promoted to Senior Software Engineer. Here's what I did to get there: Became damn good at .NET Continuous learning Communication skills Leadership Mentoring I got my first job in [----]. I was still a university student at the time"
X Link 2023-08-02T19:50Z 28.2K followers, 11.4K engagements
"I implemented API Key authentication for a .NET [--] project. Here's what I learned. API key authentication is a method of identifying and granting access to specific users or systems that need to consume an API. The client passes an API Key that is used to authenticate it"
X Link 2023-08-02T11:06Z 28.2K followers, 14.8K engagements
"What are Modular monoliths π₯ Modular monoliths are becoming more popular in the software engineering community. They give you the logical architecture of Microservices without the operational complexity. You can safely determine the boundaries between modules"
X Link 2023-08-04T06:04Z 23.3K followers, 17.8K engagements
"Where do you place validation in Clean Architecture I split my validation into two concerns: - Input validation - Business validation Input validation only deals with incoming requests or commands. A bad command is not allowed to reach the handler"
X Link 2023-08-05T06:04Z 22.2K followers, 10.6K engagements
"What Is a Modular Monolith π§±π§±π§± Here's one definition: - A monolith designed with an emphasis on interchangeable modules The problem with most monolith systems is that they become tightly coupled over time. Components are deeply intertwined"
X Link 2023-08-06T06:04Z 28.2K followers, [----] engagements
"I'm launching my first course called Pragmatic Clean Architecture. And I'm giving an exclusive 30% OFF discount to the quickest [---] of you. It's a comprehensive course teaching you how to ship well-architected production-ready apps using Clean Architecture confidently"
X Link 2023-08-08T06:04Z 36.9K followers, 23.7K engagements
"Did you know you can use the Range syntax with LINQ Range syntax support is supported from C# 8+. It's a concise way to represent a range using the . operator. For example take the range x.y: - x is the start of the range - y is the end of the range"
X Link 2023-08-09T06:04Z 37K followers, 12.1K engagements
"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"
X Link 2023-08-09T11:06Z 28K followers, 24K engagements
"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"
X Link 2023-08-10T06:04Z 28K followers, 11.4K engagements
"My life then vs. now: 2020: 9-5 job Software engineer Steady career growth [--] social media followers 2023: Quit my job Solopreneur Microsoft MVP Software architect [--] very cool lava lamp π 150.000+ followers across networks Bet on yourself"
X Link 2023-08-10T11:06Z 28.1K followers, 26.2K engagements
"Mapping a SQL query to an object can be hard. But Dapper makes it easy. Here are [--] common scenarios: [--]. Simple mapping [--]. One-to-one mapping [--]. One-to-many mapping"
X Link 2023-08-11T06:04Z 28K followers, [----] engagements
"Here are [--] tips for managing exceptions in C# π₯"
X Link 2023-08-11T11:06Z 28K followers, 20.6K engagements
"2. Use the catch-when expression Many engineers don't know about this. You can use the catch-when expression to filter on the exception instance. It's helpful if there's a specific value on the exception you are interested in. The alternative is if-else in the catch block"
X Link 2023-08-11T11:06Z 37K followers, [----] engagements
"3. Prefer using specific exceptions I'm not saying you should use exceptions for business logic. But if you are at least do it right. π And prefer using specific exceptions. Otherwise consider using a result object if you have "expected exceptions.""
X Link 2023-08-11T11:06Z 28.2K followers, [----] engagements
"What is a load balancer Load balancers distribute incoming requests between multiple instances of your API. They're used when you need to scale out your application. I'll show you how to implement a load balancer in .NET using the YARP reverse proxy"
X Link 2023-08-12T06:04Z 28.3K followers, 12.9K engagements
"Monoliths can be loosely coupled. Microservices can be tightly coupled. It's up to who is building it"
X Link 2023-08-12T11:06Z 28K followers, 12.6K engagements
"Do you want your SQL query to be blazing fast There are two things you need; - Write the optimal SQL query - A way to map the result into an object This is where object-relational mappers come in. They are also known as ORMs. Dapper is a lightweight .NET mapper"
X Link 2023-08-13T06:04Z 28K followers, 11.4K engagements
"Here are [--] quick tips to be a better software engineer π‘ [--]. Always improve your technical skills by: - Learning new technologies - Staying up-to-date with industry developments [--]. Focus on your tasks and focus on the most important and impactful ones"
X Link 2023-08-13T11:06Z 28.2K followers, 13K engagements
"C# Tip π‘ Did you try out the when working with records You can create a new record instance with modified values using the . This is also known as non-destructive mutation: - The original record is left unchanged - The new record contains the updated value I use this feature frequently when working with records. Here's something you may not have known. You can also use the on anonymous types. P.S. If you enjoyed this post you will love my weekly .NET newsletter. More than 25000+ engineers already read it. Subscribe here: What do you think about non-destructive mutation"
X Link 2023-08-14T06:49Z 22.3K followers, 24K engagements
"Two EF Core methods I use to get blazing performance: [--]. AsNoTracking [--]. AsSplitQuery Here's what you should know π"
X Link 2023-08-14T11:06Z 28K followers, 22.7K engagements
"I worked on a system with [--] API instances running in parallel and handling millions of requests daily. And just like you I wondered for the longest time: - What makes an API horizontally scalable So I want to share my thoughts on this since I had a chance to work on such a system. Horizontal scalability is crucial for building distributed systems that can handle high loads. In simple terms it means running more instances of the same application. You will also hear the term "scaling out." Here are a few characteristics of a horizontally scalable API: Stateless Load balanced Fault-tolerant All"
X Link 2023-08-15T06:59Z 28.1K followers, 26.8K engagements
"My website gets 50k views monthly and it costs me ZERO $ to run it. It also brings in 14k clicks from Google search traffic each month (and growing). I built it in one afternoon with Next.js - I had never used Next.js before. Here's my tech stack: Next.js TypeScript TailwindCSS GitHub Actions (CI/CD) MDX (markdown - blog) It took me [--] more days to build the blog parsing engine. I found a few YT tutorials about it and made it work. I write my content using Markdown - which gets compiled into HTML. Markdown helps with the code snippets. It's deployed to Netlify as a completely static website."
X Link 2023-08-15T11:09Z 23K followers, 24.6K engagements
"Unlocking Clean Architecture is a career changer. That's why I love killer testimonials like this. I'll never get tired of seeing people ship production-ready applications. It's easy to get lost in the complexity of Clean Architecture and DDD. That's why I created the Pragmatic Clean Architecture course. It's short clocking in at [---] hours. But extremely practical. Imagine taking a complex business domain and transforming it into a well-architected application. That's what this course will teach you. I promise there's [--] fluff inside. Join Celso and 730+ other customers here: It's on you to"
X Link 2023-08-16T06:05Z 28.2K followers, 21K engagements
"The dreaded switch statement got an upgrade in C# [--]. You can now write . A few benefits of using switch expressions: Concise code Pattern matching Improved type inference Better performance (sometimes)"
X Link 2023-08-16T11:06Z 25.7K followers, 10.9K engagements
"What is a Modular Monolith and why should you care I see some confusion around this topic and want to clear it up. I've held a few public talks so far talking about Modular monoliths. How I define a Modular Monolith in simple terms is: - Monolith designed in a Modular way"
X Link 2023-08-17T06:04Z 22.2K followers, 37.7K engagements
"@euboid Can we have one where the profile pic + name are on top stars are below and then the testimonial"
X Link 2023-08-17T19:39Z 23.1K followers, [---] engagements
"Want to build a large-scale system You will need rate limiting sooner or later. It's a technique to limit the number of requests hitting your API: - Improves security - Prevents overloading - Reduces resource usage .NET [--] has built-in rate-limiting support"
X Link 2023-08-18T06:04Z 28.2K followers, 16.2K engagements
"Want to build a system that scales to millions of requests You need to learn about messaging. Offloading work to the background is critical for scalability. But if you don't have a distributed system what can you do You can implement Domain events"
X Link 2023-08-18T11:06Z 28.2K followers, 10.6K engagements
"Integration tests using Docker The Testcontainers library can spin up a Docker container inside your test. I use it to create a PostgreSQL instance so my test can now run using a real database. Go from [--] to Hero by watching my Testconatiners video π"
X Link 2023-08-19T06:04Z 28.1K followers, 23K engagements
"One thing I learned about : - They're always wrong. Here's why: - Lack of time for the estimation - Incomplete/unclear information - Constantly changing requirements - Dependencies on existing features - Developers tend to be optimistic"
X Link 2023-08-19T11:06Z 28.4K followers, 33.7K engagements
"How do you stop malicious users And how do you implement usage-based APIs You can solve both problems with rate limiting. If you're using .NET [--] it's your lucky day. You don't need to install any new libraries. The tools you need are already there"
X Link 2023-08-20T07:10Z 24.2K followers, 17.9K engagements
"What's your biggest struggle with Modular Monoliths A few I've seen: - Lack of knowledge - Module isolation - Determining boundaries I'm gathering pain points for my next Modular monolith course. It will be the best one in the market. And you can help me build it"
X Link 2023-08-20T11:06Z 28.1K followers, 14.7K engagements
"@thearchitect452 "The lot art of Monoliths" - could make for a nice subheading π"
X Link 2023-08-21T06:24Z 28.3K followers, [---] engagements
"Bulletproof your C# properties using this new feature. It's called the keyword. And it's available since C# [--]. How does it work - You decorate a property as - It must be initialized when creating a new instance - The compiler will give you an error if the property isn't set I combine this with nullable reference types to create a robust class design. Want to use a constructor You have to decorate the constructor with SetsRequiredMembers to tell the compiler all required members will be set. This is useful for positional records and primary constructors. Required members allow you to use an"
X Link 2023-08-21T06:40Z 22.8K followers, 26K engagements
"Do you need a Reverse Proxy or an API Gateway A reverse proxy acts as an intermediary between clients and servers. Clients can only call the backend servers through the reverse proxy which forwards the request to the appropriate server. But what's the point"
X Link 2023-08-21T11:16Z 28.1K followers, 55.8K engagements
"DDD will help you build better software. For example here are [--] coding rules: [--]. Methods Property setters [--]. Value types Primitive types [--]. Factory methods Constructors DDD helps you build a software representation of the business domain that is coherent with the business language. This also means that strategic design comes first. You need to understand the business before you can model it in your code. Blindly following design patterns won't get you anywhere. P.S. If you liked this consider joining my weekly newsletter (with 26k+ other engineers) that teaches you how to improve at .NET &"
X Link 2023-08-22T11:19Z 28.1K followers, 29.2K engagements
"What is the most valuable resource you have Time. That's why I get excited when I see a testimonial like this. I want you to get results FAST. And my course is the shortcut you need to go from [--] to shipping production-ready applications. Here's what you'll learn inside Pragmatic Clean Architecture: - Clean Architecture - Domain-Driven Design - Domain modeling - Authentication - Testing And I even added a few bonus chapters at the end. Join John and 790+ other customers here: It will save you 20x your time. See you inside"
X Link 2023-08-23T06:12Z 23.8K followers, [----] engagements
"Persistence ignorance doesn't mean what you think it means. Let me explain. The domain model should be agnostic of the persistence layer - the database. It sounds nice in theory. But in practice no application is disconnected and agnostic from the database. Do you want blazing query speed Good so do I. And you need to understand your database to squeeze out the most performance. I'm not suggesting mixing persistence and business logic. A clear boundary between the two is a requirement. But you need to be aware that your beautiful domain model needs to be persisted at some point. This is a"
X Link 2023-08-23T11:23Z 28K followers, 14.4K engagements
"I failed an interview because I didn't know this. So I'm making this post to make sure it never happens to you. Locking allows us to control how many threads can access some section in the code. Why would you want to do this Because you want to protect access to expensive resources. And you need the concurrency control that locking enables. Since I rarely work with low-level code I tried to achieve this using the lock statement. And that's where it all went to π© The lock statement doesn't work inside async code. And it makes sense because you can't guarantee which thread will complete your"
X Link 2023-08-24T06:15Z 37K followers, 55.6K engagements
"@MrPeterLMorris Live coding. I was adding a lock to a piece of code and I started with lock. Figured out it didn't work with async and reverted to Semaphore. But they still failed me because of it"
X Link 2023-08-24T10:05Z 28K followers, [----] engagements
"One change improved page load speed by 1137% β‘ Here's what I did. I was a junior engineer at the time working on an ASP .NET MVC app. You know the thing returning HTML views from the backend Ancient tech in today's world of SPAs. I got a task to improve the loading speed of one page. It took 10-20 seconds to fetch all the data render the view and return it to the user. Would you wait that long I wouldn't. So I thought I'd improve the database query but that didn't get me far. It shaved off a second or two but not enough. I needed a different approach. The page was rendering 4-5 different"
X Link 2023-08-24T11:16Z 28K followers, 23.4K engagements
"When should you use Orchestration in Microservices Orchestration is the centralized approach to communication. One of the services takes on the role of the orchestrator. And coordinates the communication between services. It uses command-driven communication. Here are the benefits: [--]. Simple [--]. Centralized [--]. Ease of troubleshooting [--]. Monitoring is straightforward Orchestration is typically simpler to implement and maintain than choreography. Because there is a central coordinator you can manage and monitor service interactions. What about the drawbacks You'll have to catch tomorrow's"
X Link 2023-08-25T06:17Z 28.1K followers, 34.4K engagements
"EF [--] finally added its long LOST feature. I'm talking about bulk updates (and deletes). EF7 adds two new methods: - ExecuteUpdate - ExecuteDelete Of course there are async overloads of each. ExecuteUpdate allows you to write a query and run a bulk update operation on the entities matching that query. Similarly ExecuteDelete allows you to write a query and delete the entities matching that query. Why should you care Performance. You can write an optimal UPDATE and DELETE query now. Which translates to just one SQL statement sent to the database. There's gotta be a catch right Well there is one"
X Link 2023-08-25T11:18Z [--] followers, 33.1K engagements
"You can add Firebase Authentication to your app in [--] quick steps. Firebase is Google's cloud platform with many services for building applications. One of those services is Firebase Authentication. - Drop-in auth solution - Email & password based auth - Social login providers - Multi-factor authentication How can you use it in .NET In your project you can install the Firebase Admin SDK as a NuGet package. Connect it to your Firebase project and you're good to go. Don't want to waste time figuring things out on your own Great I've got the solution. Watch my JWT auth with Firebase video here π"
X Link 2023-08-26T06:18Z 22.9K followers, [----] engagements
"Modularity is the lost art of software engineering. But what does it mean Modular means to consist of separate parts that when combined form a complete whole. In our world it refers to breaking down complex systems into smaller independent parts - modules. Each module encapsulates a specific functionality that can be independently: - Developed - Tested - Maintained How do you make a system Modular If you follow the Separation of Concerns you end up with smaller components that implement specific functionalities. And you can apply this on the level of a method class or module. Loose coupling"
X Link 2023-08-26T11:17Z 28.1K followers, [----] engagements
"When should you use Choreography for Microservices Yesterday I showed [-----] engineers in my newsletter the pros and cons of Orchestration and Choreography for microservices. Choreography uses event-driven communication - as opposed to orchestration which uses commands. An event is something that has happened in the past and is a fact. The sender does not know who will handle the event or what will happen after processing it. The most important benefits of choreography are: - Loose coupling - Ease of maintenance - Decentralized control - Asynchronous communication Choreography allows"
X Link 2023-08-27T06:17Z 37K followers, 67.6K engagements
"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 another form of layered architecture. Except you need to follow one important principle: - Dependency inversion The core of Clean Architecture is the Domain. Another way to think about it is that it's a Domain-centric architecture. The Domain is treated as the most important component. The other components of the system are there to support the Domain. What are some common Domain-centric"
X Link 2023-08-28T06:22Z 28K followers, 17.3K engagements
"@RaulFerrerDev Thanks for sharing it Ral much appreciated :)"
X Link 2023-08-28T06:47Z 36.9K followers, [---] engagements
"The biggest myths in software engineering: - Refactoring later - Estimations are accurate - Writing tests slows you down - Computer Science degree doesn't matter - Juniors can't have good input on design What's another myth you heard"
X Link 2023-08-29T11:16Z 28.3K followers, 25.7K engagements
"How do you build multi-tenant apps with EF Core Multi-tenancy is present in most applications we build today. One application serves multiple users while keeping their data isolated. You can approach multi-tenancy in two ways: [--]. Logical - Single database - Logical isolation of tenants [--]. Physical - Multiple databases - Physical isolation of tenants Which option you decide to use will depend mostly on your requirements. Some industries require a high degree of data isolation and using a database per tenant is a must. So how can you implement multi-tenancy with EF Core You can use Query"
X Link 2023-08-31T11:17Z 28K followers, 16.8K engagements
"How do you write integration tests using Docker Integration testing is considered "difficult". But the Testcontainers library makes it a breeze. Let's be honest with each other. Using mocks or fake in-memory databases sucks. You want to use production services for integration testing. Testcontainers allow you to write tests with throwaway Docker containers. Do you see how this is powerful - Real services for integration testing - Easy cleanup before test runs - Works in CI/CD pipelines Tomorrow I'll show [-----] subscribers how to write integration tests using Docker. I'm also including the"
X Link 2023-09-01T06:16Z 28.3K followers, 13K engagements
"How do you build a URL Shortener This is a common system design interview question. There are two simple requirements: [--]. Shorten - pass in a long URL and return a unique short URL [--]. Redirect - access the short URL and get redirected to the matching long URL There are many nuances in these two features. - Unique code generation - Determine short URLs length - How to optimize performance - How to make the system scalable If you want to see how to build a URL shortener in .NET I've got you covered. Watch this video π"
X Link 2023-09-02T06:17Z 28.1K followers, 52.6K engagements
"Are you writing integration tests Integration tests verify your system works correctly with actual external services. - Databases - Message brokers - Identity providers - 3rd party services You can't be fully confident in your application without integration tests. Yesterday 27356+ readers learned how to use Testcontainers to write integration tests using Docker. Here's what you'll learn: - What is Testcontainers - Benefits of Docker containers - Using Testcontainers in ASP .NET Core - Integration testing with Docker containers Grab the issue below π P.S. It works in CI/CD pipelines - if"
X Link 2023-09-03T06:16Z 37K followers, 33.7K engagements
"Here are [--] proven tips to improve SQL query performance: - Use the correct index - Reduce network hops - SELECT fewer columns - Use EXISTS instead of IN - Avoid scanning operations - Check execution plans on realistic dataset - Avoid non-sargable queries (can't use index)"
X Link 2023-09-03T11:16Z 24.7K followers, 14.8K engagements
"Do you want to horizontally scale your API You'll need a Load Balancer. Here's how to build one in [--] simple steps: [--]. Install Yarp.ReverseProxy [--]. Configure YARP with the application [--]. Add the paths to your downstream services This is the most basic setup. But YARP is extensible and you can add many more things. It's primarily a .NET reverse proxy. But you can use it as a load balancer. YARP comes with the following load balance policies: - FirstAlphabetical - Random - RoundRobin - LeastRequests - PowerOfTwoChoices (default) Using the default policy is likely enough for most applications."
X Link 2023-09-04T06:24Z 28.1K followers, 30.9K engagements
"I spent [--] days optimizing a poorly performing API endpoint. From β‘β‘β‘ . Here's what I learned: - Focus on bottlenecks first (biggest payoff) - Reduce the number of round trips - Caching as a last resort (complexity) - Parallelize external calls if they don't depend on each other How do you approach performance optimization"
X Link 2023-09-04T11:15Z 28.3K followers, 69K engagements
"My favorite approach for writing tests with xUnit: Theory + ClassData = π¦(complete package) Here's what I get with this approach: - Strongly typed test parameters - Generate test cases at runtime - Reusability of test cases How does TheoryData work It's a generic class that allows you to specify the types for the parameterized test. And introducing more test cases is trivial. What's your approach for writing parameterized tests P.S. If you liked this consider joining The .NET Weekly - my newsletter with 27000+ engineers that teaches you how to improve at .NET & software architecture."
X Link 2023-09-05T06:16Z 22.2K followers, 15.7K engagements
"Here's my approach for the Clean Architecture folder structure. π I focus on features not types. Let's use the Application layer for the example: π Application __ π FeatureFolder1 _____ π Feature1A _____ π Feature1B __ π FeatureFolder2 _____ π Feature2A _____ π Feature2B _____ . What's the idea here I'm grouping the files based on the feature they belong to. A use case will be a command/query and a respective handler. And often there's a command validator there. Instead of grouping by type Commands/Queries I group everything related to a single command (feature) in one folder. Here's"
X Link 2023-09-05T11:16Z 28.3K followers, 74.7K engagements
"@MrCamaraderie Don't mention it. Which approach do you use"
X Link 2023-09-05T11:29Z 28.3K followers, [---] engagements
"@ProgressiveCod2 Thanks a lot appreciate it :) What was a course you watched that left a big impact on you"
X Link 2023-09-06T06:34Z 28.1K followers, [---] engagements
"@ProgressiveCod2 The funny part is sometimes I turn out the be the "alien" whose code I'm reading and scratching my head. π"
X Link 2023-09-06T06:35Z 26K followers, [---] engagements
"@ProgressiveCod2 That's awesome. I need a course on migrating to Next.js [--] I think π₯ Currently stuck on v12. I'm not sure the next one will be short because it needs to explain a lot more concepts"
X Link 2023-09-06T06:43Z 28K followers, [--] engagements
"When writing LINQ try to not wide. Here's what I mean. Instead of writing a LINQ expression like this: .( = .).( = .).( = (. .)).(); Try to follow the " ": .( = .) .( = .) .( = (. .)) .(); Going tall with your LINQ will improve readability and make it easier to understand. Readability makes a HUGE difference in a team environment How do you write LINQ This also works with SQL queries. Don't be lazy. P.S. If you got to the end here's a small bonus. π Here are [--] more tips for writing Clean Code:"
X Link 2023-09-07T06:19Z 28.4K followers, 31.7K engagements
"Why is Clean Architecture great for complex projects I've been using Clean Architecture for 6+ years on large-scale applications. Clean architecture isn't revolutionary. But it's prescriptive about how you should structure the code. Here are some promises of Clean Architecture: - Maintainability - Testability - Loose coupling - Separation of concerns So when do I use it I use the Clean Architecture when I want to: - Apply Domain-Driven Design - Solve complex business logic - Build highly testable projects - Enforce design policies via the architecture If the above is true for your project"
X Link 2023-09-07T11:15Z 28K followers, 56.7K engagements
"@milan_milanovic This is so nicely explained and good job for going the extra mile for the visuals. What's the database underneath it all with the persistent storage"
X Link 2023-09-07T11:17Z 28.3K followers, [----] engagements
"There's a race condition hiding somewhere in this code snippet. Can you see it This happens more often than you think. You write the code for a new feature confirm that it works and call it a day. But one week later you find out you introduced a nasty bug because you didn't think about concurrency. The most common issue is race conditions with two competing threads executing the same function. If you don't consider this during development you introduce the risk of leaving the system in a corrupted state. So how can you fix this By controlling concurrency with: - Pessimistic locking -"
X Link 2023-09-08T06:17Z 24.7K followers, 27.9K engagements
"Why do we need background tasks Sometimes I want to offload some work in my application to the background. It will run outside the normal application flow. Here are a few examples: - Sending an email after completing a sale - Processing messages from a queue - Clearing stale cache items Background tasks can also improve performance and here's why. Let's take the example of sending an email after a sale. I don't want to slow down the API response by waiting for the email. Instead I can queue an email and process it in the background. You can set up a background task in .NET within minutes. The"
X Link 2023-09-08T11:18Z 28.2K followers, 28.7K engagements
"You can build amazing systems with Vertical Slice Architecture. Do you know how to implement it It's an architectural approach that groups related files together. - Better cohesion - Adding new features is simple - Easier navigation through code Compared to the Clean Architecture layers VSA takes a different path. Let's say we have a use case made of: - Command - Command handler - Validator - Request/response objects In VSA you will group these files as close to each other as possible. You start thinking in terms of features and separate yourself from technical concerns. Here's how to"
X Link 2023-09-09T06:18Z 22.2K followers, 38.6K engagements
"My team isn't afraid of deploying to Production on Fridays. π Here's our secret: - We deploy to Production 10x per day every day For some teams deploying changes is scary. And rightly so. - Things can break - Subtle bugs can creep in - Databases can become corrupted For my team deploying changes is something we (usually) don't have to think about. Because I implemented a very good process. Here's how I did it: - Trunk-based development - Many (many) tests - Feature flagging There is only one main branch that everyone pushes changes to. Short-lived feature branches are also okay. When a"
X Link 2023-09-09T11:16Z 23.1K followers, 46.7K engagements
"@Galaxxius Tickets. Which gets turned to change logs by the scrum master. So we have documentation for each release"
X Link 2023-09-09T11:31Z 28.1K followers, [---] engagements
"How do you solve race conditions with EF Core There are a few things you can try. One of them is using optimistic concurrency with row versioning. - No locks required - Scales well as the app grows - Doesn't block other transactions - Great when there aren't many conflicts Yesterday 28354+ engineers learned how to use optimistic locking with EF Core. If you missed the issue fear not. It's available on my blog for FREE. Read it here"
X Link 2023-09-10T06:16Z 28K followers, 26.9K engagements
"Here's a quick way to implement the Decorator pattern. You can use the ASP .NET Core dependency injection support. - Register your service using the interface - Use the overload with a service provider - Resolve the required services - Create the decorator Hope that's helpful"
X Link 2023-09-10T11:15Z 28.3K followers, 11.9K engagements
"Here's a quick way to implement the Decorator pattern. You can leverage the ASP .NET Core dependency injection support. - Register your service using the interface - Use the overload with a service provider - Resolve the required services - Create the decorator instance Hope that's helpful"
X Link 2023-09-10T11:16Z 28.1K followers, 28.6K engagements
"How can you enforce your software architecture rules Architecture tests. These are automated tests that verify the structure and design of your code. You can use them to enforce design rules expressed with C# code. - Enforce the direction of project dependencies - Define naming conventions for classes - Force classes to be sealed Imagine reducing the cost of enforcing your software architecture to zero. This is what architecture tests can give you. Simply awesome. P.S. If you liked this consider joining The .NET Weekly - my newsletter with 28000+ engineers that teaches you how to improve at"
X Link 2023-09-11T06:16Z 28K followers, 54.6K engagements
"Here are [--] things I set up on every new .NET project: [--]. Logging - Serilog App Insights [--]. Coding conventions - .editorconfig [--]. Static code analysis - SonarAnalyzer [--]. Docker-compose - for local development [--]. CI/CD pipeline for build & tests (bare minimum) Everything is easier after that. And I make sure the team has a consistent development experience"
X Link 2023-09-11T11:15Z 28.3K followers, 35.7K engagements
"@BarzolaGabriel Beautiful thank you so much for sharing this Whenever someone mentions I can use Roslyn analyzers for architecture tests - they can never back up their claim with an example. Because I don't have any experience with them. Now I have what to study so thanks again :)"
X Link 2023-09-11T21:54Z 23.1K followers, [--] engagements
"Controllers vs. Minimal APIs Minimal APIs are the new way of building API applications in .NET. They were introduced in .NET [--] and are now my preferred approach for new projects. Watch this video to learn how to migrate controllers to Minimal APIs π"
X Link 2023-09-12T08:02Z 28.3K followers, 14.6K engagements
"To quote Martin Fowler: "You shouldn't start a new project with microservices even if you're sure your application will be big enough to make it worthwhile." The main reason for this is the complexity of microservice-based systems. I don't want to dive deeper into this. But I do want to bring something else to your attention. There's a way to combine: - Physical architecture of Monoliths - Logical architecture of Microservices And get the benefits of both. It's called a Modular Monolith. Did you ever build one"
X Link 2023-09-12T11:17Z 28K followers, 45.3K engagements
"If you want to learn more about Modular Monoliths start here"
X Link 2023-09-12T11:31Z 28.3K followers, [----] engagements
"How do you publish messages in parallel with MediatR You couldn't do that until recently. MediatR version [--] was released a few months ago. And it brings some exciting changes - the INotificationPublisher. Before v12.0 each handler would run individually when you publish a message. But now you can use the strategy with a concurrent execution strategy. All you need to do is configure the TaskWhenAllPublisher. It will give you a performance boost. But could introduce concurrency issues. You can't win every time. Here are two more use cases for a custom publishing strategy: - Ordering handlers -"
X Link 2023-09-14T06:16Z 28.2K followers, 19.4K engagements
"The biggest lie about CQRS: - You need separate read/write databases The truth is you can have one database and still be doing CQRS. You also don't need event sourcing. Here's what CQRS is: - Logical separation of reads & writes - Commands change state return void - Queries don't change state return data CQRS is simple. Don't make it complicated"
X Link 2023-09-14T11:17Z 37K followers, 60.2K engagements
"@ProgressiveCod2 How do you achieve these properties in your codebase"
X Link 2023-09-15T06:51Z 28.1K followers, [--] engagements
"How do you use feature flags in .NET Feature flags allow .NET applications to turn features on or off dynamically. You can use them for: - A/B testing - Feature toggles - Trunk-based development I cover this and more in my latest videoπ #dotnet"
X Link 2023-09-15T09:50Z 28.1K followers, 14K engagements
"How do you build loosely coupled Microservices In my new video I'll show you how to implement this using: - MassTransit - RabbitMQ Watch the video here π #dotnet"
X Link 2023-09-16T06:18Z 28K followers, [---] engagements
"What is the cleanest way to get configuration values in .NET I use the Options pattern and here's why you. App configuration lives in environment variables or JSON files. You can get individual values using the IConfiguration interface. But this is error-prone and"
X Link 2023-09-16T11:00Z 25.6K followers, [---] engagements
"How can you use Feature Flags in .NET It's only a few lines of code. Here's how. π Feature flags are used to turn features on or off in your application without redeploying the code. Here are [--] simple steps to get started: - Install Microsoft.FeatureManagment - Register feature management services - Define your feature flags in appsettings.json - Check the feature flag state using IFeatureManager Sounds simple Great but we only scratched the surface of what's possible. Now you need to learn about feature filters phased rollouts and A/B testing. Yesterday [-----] engineers learned to work with"
X Link 2023-09-17T06:10Z 28.3K followers, 45.9K engagements
"This YouTube comment made my day. :) Give away massive amounts of value for free. You can change lives for the better. And you'll get rewarded for it"
X Link 2023-09-17T11:16Z 24.2K followers, 11.5K engagements
"If you are trying to be a senior engineer stop procrastinating. You must work on these [--] skills: - Communication skills - Understanding tradeoffs - Willingness to help juniors - Know how to simplify problems - Understanding of software architecture Top-noth Tech skills + Excellent soft skills = Senior engineer"
X Link 2023-09-17T16:10Z 22.6K followers, 33.7K engagements
"@ProgressiveCod2 I usually have the requirements before starting the project so I know what we need to build. From there we can figure out which use cases are simple CRUD (great for anemic model) and which use cases have complex business logic that we want to model inside our domain"
X Link 2023-09-18T06:32Z 28.2K followers, [---] engagements
"I helped a team save $100k in Azure cloud costs by "flipping a switch". Here are the details at the start of the project: - $10000/month cloud spend - Extensive use of logging via App Insights - A few people tried to solve the issue without success - That's where I come in to solve the problem for good Azure has a helpful cost breakdown view to track spending. But it wasn't giving me much information. I spent a solid week researching potential issues. - Volume of logging - Different log levels - Configuration settings The end solution was funny. Someone left on Azure SQL query logging. And"
X Link 2023-09-19T13:18Z 28.3K followers, 36.1K engagements
"@simped Nobody figured it out for months. Can't do a complete writeup of all the details but it's not as simple as I made it sound"
X Link 2023-09-19T21:34Z 36.6K followers, [----] engagements
"How do you connect your Blazor client app with SignalR In my latest video I covered the following: - Strongly-typed Hubs - Authorize-ing a Hub - Authenticating SignalR connections - Sending messages to users based on the user ID Watch it here π"
X Link 2023-09-20T09:17Z 22.8K followers, 11.9K engagements
"How do you design fault-tolerant applications By accepting that failure is unavoidable and preparing for when it happens. Polly is a .NET resilience and fault-handling library. It allows you to express policies like: - Retry - Timeout - Circuit Breaker - Fallback And defining the fault-handling policies is easy. Let's unwrap the example from the image: - Policy class is the access point to define policies - Then you define which exception to handle - CircuitBreaker is one of the available policies - You can configure the circuit breaker further When is the circuit breaker policy useful When a"
X Link 2023-09-22T11:14Z 28.4K followers, [----] engagements
"Transactions are one of the most amazing SQL database features. But do you know how to use transactions with EF Core EF Core has built-in support for database transactions. You use the DbContext to create a transaction and commit the transaction when you're done. However"
X Link 2023-09-23T11:19Z 23.2K followers, [---] engagements
"Do you want to improve your software architecture skills You should know what a Modular monolith is. It's a versatile architectural approach. Each module contains a cohesive set of functionalities. Each module is also isolated from other modules in the system. The isolation refers to: - Database dependencies - Inter-module communication You can think of a module as a distinct application within the monolith. The degree of coupling depends on the communication approach you put in place. It can be either: - Synchronous (method calls) - Asynchronous (messaging) My preferred approach is"
X Link 2023-09-24T06:14Z 25.5K followers, 46.7K engagements
"EF [--] is adding support for raw SQL queries for unmapped types. Why is this big news Until now you could only return entity types with raw SQL queries. You could also configure views as keyless entities. But this is clunky. This new feature fixes everything. You don't have to worry about SQL injection attacks. This isn't an interpolated string at all. The SqlQuery method will capture interpolated parameters and convert them to SQL parameters. You can also execute raw SQL queries and return results from: - Views - Functions - Stored procedures It also supports composing raw SQL queries with"
X Link 2023-09-24T14:58Z 28.2K followers, 39K engagements
"@CodeNotFound Implementations of repositories would go into the Infrastructure layer"
X Link 2023-09-25T07:01Z 37K followers, [----] engagements
"Here are some concepts that will make you a better engineer: β
Event-driven Architectures β
Functional programming β
Domain-Driven Design β
Clean Architecture β
SQL Databases Here's what won't help: β Hating on any of these and discouraging people because you think it sucks. There's more than one way to write good software. Have an open mind"
X Link 2023-09-25T11:17Z 28K followers, 33.5K engagements
"Do you want the secret to being a better software engineer I'll share what I did to improve my skills. Side projects made me a better software engineer. I tried to spend 30-45 minutes daily hacking away at my side project. I focused on a few specific things: - Software architecture - Cloud services - New libraries Sometimes I would try to do everything wrong on purpose. - Software architecture I didn't need - New libraries I will never use - Unnecessary complexity - Overengineering This wasn't a waste of time because I was on a mission. I learned valuable lessons and built an instinct of what"
X Link 2023-09-26T11:22Z 22.5K followers, 20.9K engagements
"What is in Domain-Driven Design Here's a practical explanation so you can easily understand. A bounded context is a logical boundary in which a domain model applies. When you try to model a large domain it isn't easy to use a single model. Different system parts will use a subtly different representation of the same model. Looking at the and bounded contexts notice how we have: - Unrelated concepts (Booking Review) - Shared concepts (Customer Apartment) In this case both the and have a concept of customers and apartments. But different contexts can have very different representations of"
X Link 2023-09-27T11:17Z 28K followers, 48K engagements
". And it makes the whole process incredibly simple. It's a .NET library that gives you all the tools you need to build modern distributed systems. The core concept of any messaging library is messages. A message can be a record class or interface. It should only contain data properties. The publisher and consumer need to know the message format so you need to be able to share it. You can do this with a shared library or a NuGet package. After that pick one of the supported transport mechanisms for messages. You can use several different transports: - Azure Service Bus - Amazon SQS - RabbitMQ"
X Link 2023-09-28T06:19Z 37.5K followers, 55K engagements
"is a fantastic validation library for .NET and you can use it to solve cross-cutting concerns. It's a mainstay in the applications I build. FluentValidation helps by allowing me to : - Write strongly typed validators - Create reusable business rules - Write async validation rules But which type of validation is it best for I make a difference between input and business validation. Input validation only checks that the request is processable. Business validation checks the system state for preconditions. I prefer using FluentValidation for input validation only. Tomorrow I'll show 29127+"
X Link 2023-09-29T06:15Z 36.6K followers, 31.6K engagements
"There's no looking back after . It's an architectural approach where you group your files into "vertical slices". As opposed to layers like in the Onion or Clean Architecture. Thinking in terms of vertical slices allows you to treat each request separately. If you're building an API the system already breaks down into commands (POST/PUT/DELETE) and queries (GET). And it makes sense to treat each request as a distinct use case. All the files for a single use case are in one folder. So the cohesion for one use case is very high - the files are all related to that use case. As Jimmy Bogard"
X Link 2023-09-29T11:17Z 28.3K followers, 48.8K engagements
"EF Core [--] finally fixes Value Objects. There's a new feature coming in EF8 called Complex Types. It allows you to map objects as part of the domain model and it's a better solution for Value Objects than Owned types. Check out what's possible here π"
X Link 2023-09-30T06:47Z 28.1K followers, 13K engagements
"@graefoster I think you'd still need a Domain since an entity can be part of many use cases"
X Link 2023-09-30T06:47Z 28.3K followers, [---] engagements
"Do you want to build robust and reliable applications that can scale indefinitely and handle any number of requests A critical aspect of achieving this is reliable monitoring of the application's health. You want a short feedback loop when something goes wrong. That's where come in. Health checks provide a way to monitor and verify the health of various components of an application including: - APIs - Caches - Databases - External services And ASP .NET Core has built-in support for implementing health checks. Do you want to learn more about health checks Start here"
X Link 2023-09-30T11:15Z 28K followers, 39.9K engagements
"If you want to accelerate your .NET and software architecture skills check out The .NET Weekly - my newsletter with 29000+ engineers. Join us here"
X Link 2023-09-30T12:15Z 28.1K followers, [----] engagements
"How can you solve as a cross-cutting concern I'll show you an elegant solution using the middleware approach. You need to have two things before you can start. A way to separate validation from your use case. And a way to wrap each request with middleware. I'm using two fantastic libraries to achieve this: - MediatR - FluentValidation With MediatR you can use the IPipelineBehavior to run code before and after each request in the pipeline. And FluentValidation allows you to define strongly-typed validation rules. In yesterday's newsletter 29237+ engineers learned how to implement validation"
X Link 2023-10-01T06:51Z 28.1K followers, 18.6K engagements
"I appreciate the of a monolith system. Especially when it comes to database handling . - Open a transaction - Do some work - Commit the changes Walk in the park. Right But this doesn't work in distributed systems because you can have many different databases involved. So you have to use a distributed transaction. You can choose between: - Two-Phase Commit (2PC) - Saga (eventual consistency) A two-phase commit gives you an atomic transaction. But it can be a performance bottleneck. So I prefer to use the Saga pattern with messaging. It enables an application to maintain data consistency across"
X Link 2023-10-01T11:22Z 22.6K followers, 66.9K engagements
"What is an in - This is one of the first concepts you will encounter when learning about DDD. Think about it like this: - Do I need to track this object throughout the application's lifetime If the answer is yes you need a way to identify this Entity at any point. This is why an Entity is defined by its ID. Another key aspect of Entities is that they also contain behavior. Entities encapsulate and protect the most important business rules and invariants. You implement this by exposing methods that allow you to manipulate state and trigger side effects. I hope this post demystified this"
X Link 2023-10-02T06:23Z 28K followers, 56.6K engagements
"is one of the most powerful in .NET. And in [--] minutes I'll teach you all the basics so you can start using it. FluentValidation uses a fluent interface and lambda expressions for building strongly-typed validation rules. You start by inheriting from the AbstractValidatorT base class. To specify a validation rule for a particular property call the RuleFor method. From there you can write rules ensuring properties are: - Not null - Not empty - Have a min/max length - Are equal/not equal to some value - Define your completely custom rule It also supports complex properties and collections. It's"
X Link 2023-10-03T06:20Z 24.2K followers, 21.4K engagements
"How do you migrate from Monolith to Microservices architecture Bad way: - Start building a monolith without a plan - End up writing a tightly coupled mess - Realize you have a problem - Save face by moving to microservices - End up with a distributed monolith π© Smart way: - Start building a Modular Monolith - Define module boundaries well - Make modules loosely coupled - Isolate database dependencies - Migrate to Microservices by extracting modules Modular design Tightly coupled mess"
X Link 2023-10-03T11:16Z 28.2K followers, 16.4K engagements
"Did you ever use the client for calling APIs Refit is a type-safe wrapper for interacting with - . It's an alternative to the built-in HttpClient in .NET. Refit requires writing less code to achieve the same result. Here are a few excellent Refit features: - All HTTP verbs - Route parameters - Request/response serialization - Dependency injection configuration A Refit client is a simple interface where each method represents an API endpoint call. You decorate the method with an HTTP attribute like Get or Post. In the attribute you define the API route and any route parameters. Refit has been"
X Link 2023-10-04T06:17Z 28.3K followers, 28.3K engagements
"Why is - considered The main arguments against DDD come from these two reasons: - Misunderstanding - Misapplication Everyone wants to jump on the latest trend and DDD is one of the current trends. What is the biggest symptom of poor understanding of DDD Misalignment with project complexity. You don't need DDD with a simple or well-defined domain. DDD is best suited for complex business domains where ambiguity and intricacies require a structured approach. One more symptom of poor DDD is excessive use of abstractions. DDD encourages creating domain entities aggregates and value objects. This"
X Link 2023-10-04T11:16Z 28K followers, 27.5K engagements
"@hermoter Did you run into any implementations of Onion/Clean that made you think they were significantly different"
X Link 2023-10-05T06:56Z 28.3K followers, [----] engagements
"@ProgressiveCod2 Do you think this only adds to the confusion"
X Link 2023-10-05T06:56Z 28.4K followers, [---] engagements
"@thejustinwelsh Why not try split testing yourself I see you already have tracking in place. Run experiments every week and in 6-12 months you will drastically improve. I'm using @posthog for my A/B testing and their experiments feature is π₯"
X Link 2023-10-05T10:14Z 28.3K followers, [---] engagements
"Do you want to win amazing prizes by writing code Join the edition for a chance to win $6660 in cash and $3000 in swag prizes. What do you need to build You will be building an SDK for the Treblle platform. Your SDK can use any language or framework of your choosing. After submitting your SDK the judges will go through your code and here's what they will be looking for: - Masking - Load Balancing - JSON Schema (80% covered at least) - Securing API Keys - Example project using your SDK - Use our SDK template - Updated README with complete instructions on how to set up said SDK - Setup SDK"
X Link 2023-10-05T11:16Z 28.3K followers, [----] engagements
"Do you build complex could help you build even faster. NServiceBus is a messaging framework that simplifies the development of distributed scalable and maintainable .NET applications. Here's what you get with NServiceBus: - Publish/Subscribe messaging - Automatic retries and error handling - Sagas - Outbox pattern And it's effortless to get started in .NET - configure an endpoint and start sending messages. Tomorrow I'll show 29237+ engineers how to get started with NServiceBus. Find out why NServiceBus is one of the most powerful messaging frameworks in .NET. If you want to join us"
X Link 2023-10-06T06:36Z 37K followers, 26.8K engagements
"How can you JSON in .NET I use the Options pattern to create strongly typed configuration values. The values can come from: - JSON files - Application secrets - Environment variables - Azure App configuration However setting up configuration values is error-prone. Here are just a few things that can go wrong: - Passing an incorrect section name to IConfiguration.GetSection - Forgetting to add the settings values in appsettings.json - Typo in a property name in the class or the configuration - Data type mismatch resulting in incompatible values - Unbindale properties without a setter The"
X Link 2023-10-06T12:02Z 28.2K followers, 46.7K engagements
"@nthonymiller Would need to do some digging on Wolverine as I'm the least familiar with it. I have only seen some articles that Jeremy and Oskar have been sharing"
X Link 2023-10-07T06:38Z 23.9K followers, [--] engagements
"is a centralized approach to microservices communication. One of the services takes on the role of the orchestrator and coordinates the communication between services. Orchestration uses command-driven communication. The command communicates the intent of the action. The sender wants something to happen and the recipient doesn't need to know who sent the command. It has some excellent benefits: - Simple - Centralized - Ease of troubleshooting - Monitoring is straightforward But the drawbacks of orchestration are: - Tight coupling - Single point of failure - Difficulty adding removing or"
X Link 2023-10-07T12:02Z 28.2K followers, 66.7K engagements
"Are you building using the cloud If you're a .NET developer there's a high likelihood that you're using Azure. You'll need a messaging system sooner or later. Azure Service Bus is a fully managed enterprise message broker with message queues and publish-subscribe topics. But do you want to manage the infrastructure and broker topology Probably not. And you won't have to if you use NServiceBus. NServiceBus is a messaging framework that simplifies building reliable scalable and maintainable distributed systems. Yesterday 29297+ engineers learned how to start using NServiceBus. Miss the issue"
X Link 2023-10-08T07:01Z 28.2K followers, 27.8K engagements
"A simple way to start with Domain-Driven Design: - Identify business logic that could live in your entity - Push the logic down to the domain layer - Repeat this process again Refactoring one step at a time. Business logic ends up in the domain. And it's easily testable"
X Link 2023-10-08T11:50Z 28.1K followers, 18.5K engagements
"What is and why you should be using it for in .NET. Serilog comes with structured logging out of the box. What is structured logging It's a practice where you apply the same message format to all your application logs. All your logs will have a similar structure allowing them to be easily searched and analyzed. Serilog is unique because it also supports sinks. Sinks can write log events to storage in various formats. Here are a few examples of Serilog sinks: - File - Console - Amazon S3 - Application Insights - DataDog - Seq Integrating any sink is straightforward because they're abstracted"
X Link 2023-10-08T15:12Z 37K followers, 42.3K engagements
"P.S. I write about software engineering & architecture every Saturday. 29000+ people read it for practical guidance to accelerate their skills. Join free here π https://milanjovanovic.tech/ https://milanjovanovic.tech/"
X Link 2023-10-09T06:46Z 36.9K followers, [----] engagements
"Do you know how the MediatR works It can be a game-changer for your application. Each request sent using MediatR goes through a custom request pipeline. This gives you the power to define custom behavior before or after each request. This is similar to how ASP .NET Core middleware works. You create a class implementing the IPipelineBehavior interface and register it with MediatR. A few things I used pipeline behaviors for: - Logging - Validation - Transactions - Exception handling - Performance measurements So you can implement any cross-cutting concern using this approach. It's essential to"
X Link 2023-10-09T06:58Z 28.3K followers, 32.8K engagements
"π Bonus tip Here's how you can use MediatR pipelines to implement validation:"
X Link 2023-10-09T08:42Z 28.3K followers, [----] engagements
"Feature flags in .NET allow you to wrap application features in a conditional statement. You can then toggle the feature on or off in runtime to control which features are enabled. Feature flags are useful for: - Trunk-based development - Phased rollouts - A/B testing"
X Link 2023-10-09T12:30Z 28K followers, 15.4K engagements
"How I would build a application: - No error handling - No tests whatsoever - Inefficient database queries - Scalability as an afterthought - Make components tightly coupled - Definitely skip the dependency injection - Don't follow the single responsibility principle And if you want to build a good application Just do the opposite of everything above"
X Link 2023-10-09T15:56Z 28.1K followers, 75.7K engagements
"@davidpine7 Refit π"
X Link 2023-10-10T06:26Z 28.2K followers, [---] engagements
"C# has been getting many new features in recent versions. And one that stands out is . What is it Pattern matching lets you check if an object has specific characteristics: - Is null or is not null - Is of a particular type - Property has a specific value I enjoy using it for type checks and I particularly like switch expressions. However the more complex the pattern is the more I dislike it. Sure it can be concise and you usually write less code. But you also need to think about readability and maintainability. Take a look at the example from the code snippet. Which version do you find more"
X Link 2023-10-10T07:03Z 28.1K followers, 49.8K engagements
"Do you want to horizontally scale your API You'll need a Load Balancer. And in the .NET world - you can use YARP. It's a reverse proxy built with .NET. You can set up YARP with [--] lines of code and some JSON configuration. And you're ready to start serving requests"
X Link 2023-10-10T10:50Z 22.3K followers, 29K engagements
"@uvukasinovic Which language does it differently"
X Link 2023-10-10T15:54Z 37K followers, [---] engagements
"What is a in Domain-Driven Design Value Objects are immutable types that express some concepts of the domain. There are types in the domain that only make sense in the context of an entity - without an identity of their own. Another aspect of Value Objects is that they are defined by their values - hence the name. Two Value Objects are equal if their values are the same. Here are a few examples of Value Objects: - Temperature - Date Range - Address - Money So the two core concepts of Value Objects are immutability and structural equality. How would you define a Value Object in C# You can"
X Link 2023-10-11T07:06Z 28.2K followers, 29.6K engagements
"@GregOnNet Implicit operator on ResultT π"
X Link 2023-10-11T10:35Z 28K followers, [---] engagements
"You aren't paid to write code. You're paid to be a problem solver. Code is your tool. I don't spend my time only thinking about the code I will write or which design patterns I want to use. Those are all important but. Understanding the problem you are solving and focusing on that is what gets you results. P.S. If you know that code is just a tool repost this β» so others can find out"
X Link 2023-10-11T12:12Z 28.1K followers, 36.6K engagements
"@ProgressiveCod2 Aren't printers obsolete already"
X Link 2023-10-11T12:19Z 28.1K followers, [---] engagements
"@slow_developer Seems like it Haider. π"
X Link 2023-10-11T12:26Z 28.3K followers, [---] engagements
"@rana_cse_seu Yes it targets .NET [--] also"
X Link 2023-10-11T12:26Z 22.8K followers, [--] engagements
"@RaulJuncoV Good negotiation skills help π"
X Link 2023-10-11T12:42Z 25K followers, [---] engagements
"Here are [--] use cases for background tasks: - Sending email - Database backups - Data synchronization - Temporary file cleanup - Scheduled notifications - Clearing stale cache items The idea is to offload some work to the background and perform it asynchronously"
X Link 2023-10-12T06:14Z 28.1K followers, 36.2K engagements
"Sometimes you need a more robust job scheduler. And Quartz is an excellent job scheduling system that has served me well in the past. Here's how to get started with Quartz https://www.milanjovanovic.tech/blog/scheduling-background-jobs-with-quartz-net https://www.milanjovanovic.tech/blog/scheduling-background-jobs-with-quartz-net"
X Link 2023-10-12T06:14Z 42.7K followers, [----] engagements
"Modular monoliths make working on challenging systems fun. It gives you the logical architecture of microservices without the operational complexity. You can safely determine the boundaries between modules. And refactoring is less risky"
X Link 2023-10-12T12:15Z 28.3K followers, [----] engagements
"P.S. I write about software engineering & architecture every Saturday. 29000+ people read it for practical guidance to accelerate their skills. Join free here"
X Link 2023-10-13T07:03Z 22.5K followers, [---] engagements
"P.S. I write about software engineering & architecture every Saturday. 29000+ people read it for practical guidance to accelerate their skills. Join us here"
X Link 2023-10-13T07:03Z 22.8K followers, [---] engagements
"What is and how does it work in ASP .NET Core Dependency Injection is a software design pattern used in ASP .NET Core to achieve the Inversion of Control (IOC) principle. This promotes loose coupling and makes your code more testable maintainable and extensible. DI allows you to inject dependencies into your classes rather than create them within the class. ASP .NET Core provides three main service lifetimes: - Singleton - Scoped - Transient However ASP .NET Core's built-in DI system sometimes needs a little help to achieve more advanced scenarios. So I want to introduce you to a powerful"
X Link 2023-10-13T07:04Z 28.1K followers, 41.4K engagements
"@fori920 It uses reflection: once. At the startup of the application when registering services. How will an extra few microseconds spent scanning assemblies crush your application's performance"
X Link 2023-10-13T07:59Z 28.1K followers, [---] engagements
"Here's a nice example of implementing the decorator pattern using DI:"
X Link 2023-10-13T08:00Z 28.3K followers, [----] engagements
"@bradwellsb Sweet thanks for sharing it Bradley. π Which approach do you use when writing tests"
X Link 2023-10-13T08:03Z 23.9K followers, [--] engagements
"What is the simplest way to improve . Caching can significantly improve the performance and scalability of your application. You can introduce a memory cache for frequently requested data. It reduces the work required to generate content. But what type of data should you cache Caching works best with data that changes infrequently and is expensive to generate. Think of any heavy query you have running on the database. ASP .NET Core supports several different caches. The simplest cache is based on the IMemoryCache. But it only makes sense if you have a single web server. IMemoryCache"
X Link 2023-10-14T07:02Z 22.2K followers, 42.9K engagements
"How to combine FluentValidation with the Options pattern The Options pattern lets you create strongly typed settings classes in ASP .NET Core. But it's important to validate these settings at startup. Here's how to do it π"
X Link 2023-10-14T10:06Z 28K followers, 14.6K engagements
"EF [--] filled the gap for executing . You can now run a proper SQL UPDATE statement using LINQ. I could've used this years ago but it's better late than never. ExecuteUpdate allows you to write a query and run a bulk update operation on the entities matching that query. If you want to update a collection of entities before EF [--] you need to load the entities into memory and update them using the DbContext. One big caveat with this new feature π¨ ExecuteUpdate runs directly on the database without loading any entities into memory. Any updates (or deletes) aren't reflected in the change tracker."
X Link 2023-10-15T07:05Z 28.3K followers, 39.7K engagements
"Bulk updates are just part of the new features. You can also use bulk deletes. Here's how: https://www.milanjovanovic.tech/blog/how-to-use-the-new-bulk-update-feature-in-ef-core-7 https://www.milanjovanovic.tech/blog/how-to-use-the-new-bulk-update-feature-in-ef-core-7"
X Link 2023-10-15T07:49Z 36.9K followers, [----] engagements
"Here are [--] ways you can use the HttpClient in .NET: - Create an instance every time (bad) - Use the IHttpClientFactory (better) - Use a named HttpClient - Use a typed HttpClient So what is the best approach"
X Link 2023-10-15T10:57Z 23.3K followers, 35.8K engagements
"Do you know all [--] ways to define in . Middleware allows you to introduce additional logic before or after executing an HTTP request. You are already using many of the built-in middleware available in the framework. But I'm going to show you three approaches to define custom middleware. Request Delegates Convention based Factory based You can see each approach in the slides below. What is your preferred way to create middleware in ASP .NET Core REPOST = teach your audience about .NET middleware β» P.S. π If you liked this consider joining The .NET Weekly - my newsletter with 29000+ engineers."
X Link 2023-10-16T07:04Z 28.2K followers, 30.5K engagements
"I optimized a poorly performing API endpoint. From β‘β‘β‘ . This was my high-level process: - Focus on bottlenecks first (biggest payoff) - Reduce the number of round trips - Caching as a last resort (complexity) - Parallelize external calls"
X Link 2023-10-16T09:00Z 22.8K followers, 26.9K engagements
"Here are [--] tips for being a better software engineer in 2023: - Keep learning and acquiring new skills - Invest in code quality - Work on complex systems - Be comfortable in the cloud - Take care of yourself Actually this will always work - not just in 2023"
X Link 2023-10-16T12:00Z 22.2K followers, 11.6K engagements
"Are "blueprint" architectures bad No I don't think so. And here's why. I think a blueprint architecture can be excellent for some teams. One example of a prescriptive architecture is Clean Architecture. - Domain layer at the core - Application layer with use cases - External concerns on the outskirts - Dependencies should point inwards You can have more (or fewer) layers if you want to. It's not set in stone. Clean architecture isn't revolutionary. But it's prescriptive about how you should structure the code. And for some teams this can be all they need. You have to understand this - not all"
X Link 2023-10-17T07:05Z 37K followers, 25.6K engagements
"Here's an easy way to improve API performance - Response compression. Network bandwidth is a limited resource. So you should at least consider the benefits of response compression. You trade off CPU and memory for less network bandwidth"
X Link 2023-10-17T09:00Z 28.2K followers, [----] engagements
"Here are [--] tips for writing clean code: - Early return principle - Merge if statements - Use LINQ for conciseness - Bool expression - Method Writing clean code is subjective. But these are a few principles I follow diligently. Small changes big impact"
X Link 2023-10-17T12:00Z 37K followers, 14.5K engagements
"But how do you actually write clean code I'll walk you through a concrete example of how to refactor to clean code. Start with bad code. End up with clean code. Here's how to get started:"
X Link 2023-10-17T12:05Z 22.5K followers, [----] engagements
"You should never return null collections in C#. There are better solutions. What problem do null collections cause You will typically iterate over a collection in a loop. But if your method returns null collections this can lead to potential errors. Your code must handle the null case and check for null before accessing any collection elements. Adding a null check every time can make the code harder to read. It's even worse if the calling code doesn't handle the null case. Things will blow up at runtime which isn't easy to diagnose. You could argue that a null value expresses some intent. But"
X Link 2023-10-18T07:17Z 28.2K followers, 46.8K engagements
"How do you extend a class without changing it You can use the Decorator (Proxy) pattern. A common requirement I had was adding caching to a repository. Here's how you can achieve this with some simple code:"
X Link 2023-10-18T09:00Z 25.9K followers, 11.4K engagements
"Many things can fail in distributed systems (and they will). Your goal should be to reduce the surface area for things to go wrong. How can you do this Implementing reliable messaging is a good starting point. The Outbox pattern can help you achieve this"
X Link 2023-10-18T12:00Z 25.5K followers, 17K engagements
"@HassanRezkHabib I'm not a believer in TDD but I've nothing against the approach. I simply find it easier to write my code first and then cover it with tests"
X Link 2023-10-19T07:11Z 22.3K followers, [----] engagements
"How many ways can you think to check if a collection contains duplicates The algorithm should be as fast as possible and consume the least amount of memory. Here are a few that come to mind: - Foreach + HashSet - Distinct + Count - GroupBy + Count - ToHashSet + Count"
X Link 2023-10-19T12:00Z 25.4K followers, 29.5K engagements
"I'm sure you can come up with a few more ideas. Did you think about all the edge cases in your solution: - Duplicate element is in the middle - Duplicate element is in the end - No duplicate This solution comes out on top:"
X Link 2023-10-19T12:00Z 28.2K followers, [----] engagements
"When would you want to use multiple EF DbContexts Here are [--] use cases I've seen: - Multiple (physical) databases - Separating concerns - Modular monolith - Read replicas In a modular monolith application each module has a database. And EF solves this problem nicely"
X Link 2023-10-20T09:00Z 22.2K followers, 10.6K engagements
"How can you visualize your software architecture The majority of software architecture diagrams I've seen are a total mess. But you can use the C4 model to standardize your diagrams. It's a lightweight approach to describing your software architecture"
X Link 2023-10-20T12:00Z 22.2K followers, 38.5K engagements
"@streetsofboston This idea is hard to grasp for many people"
X Link 2023-10-20T13:17Z 28.2K followers, [---] engagements
"Let's start with the obvious - those are all cloud technologies π So first of all I think this is practical in non-cloud deployments. It's on par (or better) than Nginx in performance so you could consider it a replacement. It integrates nicely with the .NET ecosystem: auth rate limiting middleware"
X Link 2023-10-21T07:27Z 22.6K followers, [----] engagements
"What is a It's a simple technique to implement the fail-fast principle. A guard clause throws an exception if the input is not valid. It's a staple in defensive programming for C#. Here's how it can make your code better:"
X Link 2023-10-21T09:00Z 22.2K followers, 12.1K engagements
"What is a developer's worst nightmare You get an alert on Friday that the feature you just released crashed the system. Now you have to scramble for hours to fix the issue. But it doesn't have to be like this. You can use feature flags to control which features are enabled"
X Link 2023-10-21T12:00Z 22.6K followers, 31.3K engagements
"Feature flags allow you to turn features on or off conditionally. And you do this without redeploying the code. Here's how:"
X Link 2023-10-21T12:00Z 22.2K followers, [----] engagements
"I write about software engineering & architecture every Saturday. 29000+ engineers read it for practical tips and guidance to accelerate their .NET skills. Join free here:"
X Link 2023-10-21T15:33Z 22.2K followers, [---] engagements
"I write about software engineering & architecture every Saturday. 29000+ engineers read it for practical tips and guidance to accelerate their .NET skills. Join free here:"
X Link 2023-10-21T15:34Z 22.2K followers, [----] engagements
"@RaulJuncoV But difficult to accomplish"
X Link 2023-10-21T15:35Z 28.4K followers, [---] engagements
"@antotoki That is true. Ideally you'd keep the old infrastructure in place until the feature is fully rolled out. If it means duplicating data in the DB is that a big price to pay"
X Link 2023-10-21T15:36Z [--] followers, [---] engagements
"@twitsinfiltro @Vojvoda_Boki Yes Will post the benchmarks when I'm back home"
X Link 2023-10-21T15:37Z 28.2K followers, [--] engagements
"How do you create modules in a Modular monolith A good starting point is separating by bounded contexts. Bounded contexts define the explicit boundaries between modules. Then you need to solve coupling: - Database dependencies - Communication"
X Link 2023-10-22T07:00Z 22.2K followers, 28.2K engagements
"Each module contains a cohesive set of functionalities and is isolated from other modules in the system. A few rules for modules: - Communicate only through a public API - Can't share database tables - Can't query from other modules Learn more here:"
X Link 2023-10-22T07:00Z 22.2K followers, [----] engagements
"Rate limiting can make your APIs more robust and secure. It's a technique to limit the number of requests to a server or an API. There are four popular rate limit algorithms: - Fixed window - Sliding window - Token bucket - Concurrency"
X Link 2023-10-22T09:00Z 22.6K followers, 44.7K engagements
"This C# feature can help you in code for free. I'm talking about file scoped namespaces. It's available since C# [--] and is incredibly easy to use. You can finally drop the unnecessary block statement around a namespace declaration. Simple and effective. It's a standard on all my projects. And there's even a code cleanup available in Visual Studio. Did you start using this feature REPOST = Teach your audience about file-scoped namespaces β»"
X Link 2023-10-23T06:56Z 25.1K followers, 21.7K engagements
"Here are [--] tips to improve API performance: - Caching - Pagination - Connection pooling - Response compression - Use asynchronous calls"
X Link 2023-10-23T09:00Z 22.3K followers, 28.4K engagements
"My website has the simplest tech stack ever: - Next.js - TailwindCSS - GitHub Actions - Hosting: Netlify It gets 80k views monthly and costs less than $20/year to run. Since the early days I added: - Blogging engine with MDX (Markdown) - A/B testing Start simple ship fast"
X Link 2023-10-23T12:00Z 22.7K followers, 51.1K engagements
Limited data mode. Full metrics available with subscription: lunarcrush.com/pricing
/creator/twitter::mjovanovictech