- Artykuły z tagiem design patterns

"The code that a computer can understand can be written by anyone. A good programmer writes code that people can understand."

Dziel się z innymi:
Why I cannot understand this code?

Sztuka programowania 298 dni, 23 godziny, 9 minut temu kw677 168 rozwiń

How often in your code do you see ifs checking whether the object is not null? Often? Very often? What would happen if you didn’t have to check it out? Surely code would be easier to maintain – no ifs = no test cases. This can all be achieved using Null Object pattern.

Null Object pattern - how and when to use it |

Sztuka programowania 467 dni, 1 godzinę, 17 minut temu Mateusz Pustelak 251 rozwiń

Druga część przeglądu źródeł .NET Core. Tym razem poszukujemy wzorców strukturalnych.

Dziel się z innymi:
Wzorce projektowe w źródłach .NET: 2/3 wzorce strukturalne

Architektura 491 dni, 23 godziny, 30 minut temu mickl 203 rozwiń

W źródłach .NET poszukujemy zastosowań wzorców projektowych. Mało tekstu, zero UML, dużo kodu.

Dziel się z innymi:
Wzorce projektowe w źródłach .NET: 1/3 wzorce kreacyjne

Architektura 496 dni, 18 minut temu mickl 408 rozwiń

Today I’ll show you a quite nice example of the Strategy pattern from a real project I was working on some time ago.

Strategy design pattern - real life example -

Sztuka programowania 500 dni, 6 godzin, 11 minut temu AdrianBystrek 190 rozwiń

Design patterns which I would like to present in this post are well described in the book Design Patterns. Elements of Reusable Object-Oriented Software  written by The Gang of Four (Gramma, Helm, Johnson, Vlissides). In my opinion this book is must read for every developer, regardless what programming language you are using. Besides the fact that this book was written more than 20 years ago, it still contains a lot of useful details for developers of all levels. I often revisit this book to keep in touc...

Design Patterns – introduction |

Sztuka programowania 516 dni, 23 godziny, 9 minut temu Mateusz Pustelak 140 rozwiń

Zaczynając swoją przygodę z ASP.NET MVC (oraz w ogóle z programowaniem) miałem sporo problemów z utrzymaniem porządku w moich akcjach na kontrolerach. Bardzo często pojawiało się tam mnóstwo warunków i niepotrzebnej logiki. Ten problem trzeba było sensownie rozwiązać, więc z kolegami wypracowaliśmy sobie pewną konwencję, której twardo się trzymaliśmy...

Dziel się z innymi:
ASP.NET MVC: Method chaining w kontrolerach | Łukasz Marcinek

Web 628 dni, 13 godzin, 29 minut temu Łukasz Marcinek 436 rozwiń

Which one of us doesn’t like to give commands? It’s the natural way to ask (in a polite way) for a specific task that needs to be completed. Therefore, it shouldn’t be surprising that the command pattern can be also easily implemented within our software, which might provide some serious benefits in terms of loose coupling the existing code.

Dziel się z innymi:
I command you (pattern) | Piotr Gankiewicz

Sztuka programowania 631 dni, 9 godzin, 29 minut temu spetz 223 rozwiń

Do you ever feel like (well, you should) these huge switch + case statements or too many ifs seem to be wrong? What if I told you, there’s one simple trick that will change your life, by getting rid of them? Ok, seriously – I have nothing against switch or if as the way of controlling the flow (I use them quite often) however, there are certain occasions at which the things could be done better. And let me show you another way to achieve the same goal which is much cleaner in terms of code readability a...

Dziel się z innymi:
Get rid of switch/case/if | Piotr Gankiewicz

Sztuka programowania 651 dni, 8 godzin, 57 minut temu spetz 355 rozwiń

In this post I will try to introduce the concept of validation using the Chain of Responsibility pattern (CoR), which I use successfull for years

[EN] Chain of Responsibility – an elegant way to handle complex validation

Sztuka programowania 698 dni, 11 godzin, 10 minut temu pluksza 221 rozwiń

Immutability is a quite old concept that is mostly related to the functional programming, however, it’s also (maybe not so widely) used in the object oriented programming. An immutable variable/object can not be mutated, which means that once it’s been initialized it will never change it’s original value/reference (unless it’s deallocated). This approach results in some great benefits such as out of the box thread safety, yet in the OOP world, it does seem to be quite often abused or even not used at al...

[EN] A word about immutability | Piotr Gankiewicz

Sztuka programowania 748 dni, 10 godzin, 26 minut temu spetz 68 rozwiń

Recently I’ve had this idea that came into my mind while working on the Sentry – let the users of my library (if there will be any) to configure not only the set of rules, connection strings, urls etc. but also the underlying providers that do all of the heavy lifting (e.g. the HttpClient responsible for communicating with the API). It means that as long as you’re not satisfied with the default solution, please feel free to provide your own engine that will for example talk to the database and perform a ...

[EN] Mocking the “unmockable” | Piotr Gankiewicz

Sztuka programowania 757 dni, 10 godzin, 44 minuty temu spetz 82 rozwiń

CQS stands for the command query separation. There’s a chance that you may have not heard about it, but on the other hand the CQRS might ring a bell. Even though these 2 patterns have very much in common, there is a significant difference (definitely a bigger one than the additional “R” character within the CQRS acronym) in how do they apply to the architecture of our system. In this post I’ll focus on the CQS – the older brother of the CQRS – that will help you understand how to design the software that...

Dziel się z innymi:
[EN] CQS – an easy, yet powerful pattern | Piotr Gankiewicz

Sztuka programowania 768 dni, 6 godzin, 39 minut temu spetz 152 rozwiń

In one of my previous posts I’ve told about my feelings for the repository pattern. Complaining about something is one thing (please, don’t even try to tell me, that you have never seen some piece of code, that made you cry like a baby), however, if we want to (pretend to) be professionalists, it is very important to come up with some ideas in order to solve the given problem (at least partially). In this post, I’ll present to you one of my solutions to the commonly misused repository pattern.

[EN] Extension methods to the rescue (from repository) | Piotr Gankiewicz

Architektura 775 dni, 21 godzin, 13 minut temu spetz 129 rozwiń

Many of the programmers falls into the trap of creating too many unnecessary abstractions in code, that may introduce even more chaos and maintenance issues, instead of simplifying overall project structure and providing some real benefit. One of such abstractions, that have been discussed countless number of times, is the (one and only) repository pattern.

Dziel się z innymi:
[EN] Repository, so we meet again. | Piotr Gankiewicz

Architektura 777 dni, 19 godzin, 58 minut temu spetz 227 rozwiń

Today I want to introduce a Circuit Breaker – one of the reactive design patterns, especially useful in areas such as web services interop. They main role is to act as a decorator around your code to ensure, that you can quickly respond on any reliability problems.

Dziel się z innymi:
[EN] Design patterns: Circuit Breaker - Simple Solutions

Sztuka programowania 1134 dni, 5 godzin, 18 minut temu Horusiath 143 rozwiń

Today I want to present a different point of view on C# applications design. If you are programming in that language most of the time, it’s probably not what you’re used to see. However I found it interesting, because it allows to achieve a few important goals...

Dziel się z innymi:
[C#] A different look at service design - Simple Solutions

Sztuka programowania 1147 dni, 9 godzin, 48 minut temu Horusiath 297 rozwiń

Agile Principles, Patterns, and Practices in C# by Uncle Bob is the best book about modern Software Development I have ever read. First section (chapters 1-6) is an Overview of Agile, Extreme Programming (XP), and TDD. Very good introduction to modern software development. Chapter 6. shows all these techniques by example, by creating “The Bowling Game” application...

Dziel się z innymi:
[EN] Agile Principles, Patterns, and Practices in C# - Jakub Jedryszek

Sztuka programowania 1176 dni, 5 godzin, 5 minut temu jj09 243 rozwiń

Nieraz zdarza się, że musimy samodzielnie napisać jakąś klasę implementującą interfejs IDisposable. Wszyscy na pewno znają wzorzec implementowania Dispose. Osobiście proponuję inną implementację.

Dziel się z innymi:
Implementowanie IDisposable | Robert Pająk – Blog

Inne 1296 dni, 11 godzin, 26 minut temu Robert Pająk 495 rozwiń

Jednym z częściej opisywanych zagadnień na blogach programistycznych są wzorce projektowe. Często jednak ich opisy są bardzo krótkie, bez przykładów konkretnego zastosowania w prawdziwym kodzie, a czasem nawet niepoprawne. Dzisiaj przedstawię jak wykorzystanie wzorców projektowych może przyczynić się do ograniczenia powtórzeń w kodzie testów. Nie będzie to wprowadzenie do tych wzorców (opisanych setki razy w innych miejscach), ale opis moim zdaniem nietypowego ich zastosowania.

Wzorce projektowe w testach jednostkowych | Piotr Perak

Sztuka programowania 1428 dni, 20 godzin, 53 minuty temu trzyPe 239 rozwiń

1 2 3
Szkolenia SecurITum




Gdańsk, Stary Maneż
Dodaj nowe Zobacz wszystkie



Paweł Łukasik (32 867,57)


macko (32 816,53)


pzielinski (27 178,29)


gordon_shumway (21 178,88)


paduda (20 336,33)


psz750 (13 018,14)


rroszczyk (10 391,37)


Damian (9 515,23)


danielplawgo (7 331,04)


arek (6 807,95)


burczu (6 214,22)


PaSkol (5 393,84)


lukaszgasior (4 097,38)


jj09 (3 798,06)


dpawlukiewicz (3 592)


spetz (3 418,34)


AdrianBystrek (3 340,84)


jedmac (3 318,39)


http://jakub-flor... (3 224,66)


CaMeL (2 954,87)