Architektura heksagonalna jest znana pod kilkoma nazwami. Na szczęście, niezależnie od nazwy, w każdym opisie cechuje się takimi samymi rzeczami. Po pierwsze – świetnie separuje aspekty biznesowe od technicznych. Po drugie – projektowanie prostych adapterów pozwala na podejmowanie pewnych decyzji na późniejszym etapie projektu. Na koniec, po trzecie – wymienność adapterów ułatwia testowanie, jak i eksperymentowanie.
Architektura 194 dni, 10 godzin, 42 minuty temu 203 źrodło rozwiń
Ostatnio pisałem o tym, co możemy zrobić, gdy nasze metody zwracają rezultat i chcemy go zmapować na odpowiedni kod http (tutaj). W tym poście podam podobne rozwiązanie, gdy nasze metody rzucają wyjątki, zamiast zwracać rezultat.
Tym razem chciałbym się skupić na tym, jak dostarczyć odpowiednie fragmenty kodu klienta API do pozostałych członków zespołu tak, by każdy mógł go używać w odpowiedni sposób.
Sztuka programowania 205 dni, 10 godzin, 59 minut temu 113 źrodło rozwiń
Pierwszy techniczny artykuł w Cesarstwie-Dev, i od razu coś ekstra! Połączenie dwóch tematów, które są bardzo bliskie memu sercu – integracje z zewnętrznymi systemami oraz testy! To co? Zaczynajmy!
Sztuka programowania 208 dni, 10 godzin, 58 minut temu 73 źrodło rozwiń
Jakiś czasem temu pisałem o tym, że nasze metody mogą zwracać rezultat lub zgłaszać wyjątek (tutaj). Zastanówmy się, jak mogłoby wyglądać nasze API, aby status rezultatu był mapowany na odpowiedni kod Http. Mamy dwie możliwości: wspólna metoda w klasie bazowej lub filtr.
In this video, we're going look at struct devirtualization and how this feature works in the runtime today. We're going to look at some ways we can (ab)use this feature and what are the problems with the current implementation.
Sztuka programowania 211 dni, 11 godzin, 29 minut temu 25 źrodło rozwiń
Jakiś czas temu pisałem o testach w kontekście API (tutaj). W tym poście postaram się opisać jak napisać podobne testy, ale gdy nasza aplikacja komunikuje się poprzez kolejkę. Pokaże to z wykorzystaniem biblioteki MassTransit.
This video is the start of a brand-new video series about JIT compilation in C# called: "What the JIT". This time we're going to look at simple integer arithmetic like division and multiplication and how JIT is able to optimize that.
Sztuka programowania 225 dni, 10 godzin, 55 minut temu 25 źrodło rozwiń
This video talks about the "Skip" method, and differences in implementation between dotnet frameworks. Also, we will try to implement a less flexible but faster version of the "Skip" method. Enjoy. 🙂
Sztuka programowania 233 dni, 11 godzin, 2 minuty temu 30 źrodło rozwiń
Sztuka programowania 237 dni, 10 godzin, 50 minut temu 47 źrodło rozwiń
We are already in the second half of 2020 and a lot of books related to .NET technology have been published. I decided to collect these positions in one place for you. I will mention here some of them that get the best reviews and seem worth reading in my opinion.
This video corrects a couple of mistakes that were made in my previous video called "C# LINQ Performance Tips #1". We're talking about structs vs classes in LINQ and why losing concrete type information is bad, there's also a bit of VSD but it's very vague and generic so the more specific video is needed, I just wanted to tell you that it exists :) and it's important. Enjoy.
Sztuka programowania 240 dni, 8 godzin, 57 minut temu 34 źrodło rozwiń
This video will show you some of the performance and allocation problems that you might encounter when writing LINQ expressions we will also see that an expression you see is not necessarily, what you get. LINQ is not all bad and we will show you an example where LINQ absolutely rocks! This video mentions examples found in my previous video: https://youtu.be/ahnaIdQMoYw Enjoy.
Sztuka programowania 244 dni, 11 godzin, 33 minuty temu 95 źrodło rozwiń
C# 9.0 jest już wspierany przez LINQPad. Aplikacja pozwala podejrzeć IL code oraz przetestować nowe funkcjonalności.
Sztuka programowania 246 dni, 11 godzin, 29 minut temu 100 źrodło rozwiń
This video will show you some of the performance and allocation problems that you might encounter when writing LINQ expressions and offer a couple of solutions on how to solve them. LINQ Links: ♦ https://github.com/NetFabric/LinqBenchmarks ♦ https://github.com/NetFabric/NetFabric.Hyperlinq
Sztuka programowania 247 dni, 10 godzin, 31 minut temu 54 źrodło rozwiń
A couple of tricks which simplify database access code while using Dapper library.
Bazy danych i XML 254 dni, 8 godzin, 17 minut temu 127 źrodło rozwiń
Creating music app using azure functions
There’s a certain set of special method signatures in C# which have particular support on the language level. Methods with those signatures allow for using a special syntax which has several benefits. For example, we can use them to simplify our code or create DSL to express a solution to our domain-specific problem in a much cleaner way. I came across those methods in different places, so I decided to create a blog post to summarize all my discoveries on this subject.
Sztuka programowania 287 dni, 10 godzin, 3 minuty temu 202 źrodło rozwiń
Często w naszych aplikacjach mamy do czynienia z datami. Najczęściej używamy ich przy polach takich jak data utworzenia (np. CreatedAt) lub data modyfikacji (np. ModifiedAt), ale są też inne miejsca. Wtedy z reguły stosujemy DateTime.UtcNow. Niestety w testach ciężko jest potem coś z taką datą zrobić. Nie mamy żadnej możliwości ustawienia tej daty na jakąś inną, aby przetestować czy nasza aplikacja działa poprawnie. Sprawa się jeszcze bardziej komplikuje, gdy mamy logikę biznesową uzależnioną od takiej ...
This video is an introduction to bit hacks; we're going to visualize bit hack expressions and learn how to construct and apply them. This video is a direct response to a previous video about bit hacks (https://youtu.be/OPFJUpdCq0I) that was too complicated to an introduction, so this video is here to fill this need. I also have an article about the same topic that goes into more detail about the examples presented here, plus it contains a more bit hacks. https://leveluppp.ghost.io/bit-hacks-in-c/ Enj...
Sztuka programowania 289 dni, 11 godzin, 3 minuty temu 22 źrodło rozwiń