When coding web applications we sometimes come to the point when we need to perform some action during user’s navigation. One of the most common examples would be authorization and checking whether the user has appropriate roles. Fortunately, Aurelia provides an access to route pipeline so it’s super easy to add some extra steps Let’s get to work! Inspecting RouterConfiguration In order to add our custom pipeline steps, we need to create some routing for the application. I won’t describe the whole pr...
Strona głównaUżytkownik
dpawlukiewicz | użytkownik
A few days ago I was playing with Entity Framework when suddenly an Exception popped out on the screen: Additional information: LINQ to Entities does not recognize the method ‚System.String GetFullName(User)’ method and this method cannot be translated into a store expression. That was because accidently I treated Expression
Sztuka programowania 2956 dni, 23 godziny, 31 minut temu 273 źrodło rozwiń
In the previous post, I presented to you the Aurelia – new, great JavaScript framework created by Rob Eisenberg. We also used its Command Line Interface (CLI) to create new Aurelia project with all its dependencies, unit tests, and HTTP server. As I announced back then, we’re going to play with CLI to generate some code inside our project. So, let’s get started!Aurelia CLI generator Okay, before our implementation, let’s find out what kind of code we can generate using Aurelia’s CLI. To do that, just ty...
As we all know, JavaScript world is one of the fastest growing. New frameworks appear and soon after die because of capabilities or outdated solutions. The example here is knockout.js (which I really loved by the way) – an excellent MVVM framework with dependency injection, two-way data binding e.t.c which was eaten by Google’s child called Angular. In the meantime React JS happened and all these great frameworks like Ember or Polymer. In early 2016, all frontend geeks waited for the new awesome framewor...
Architektura 2984 dni, 19 godzin, 46 minut temu 733 źrodło rozwiń
To be honest, I thought that my previous post would be the last in the CQRS/ES series, but I forgot to discuss one more thing related to that topic. Many developers don’t know how we should handle the following scenario in our systems: „During the creation of user’s new account I would like to verify rather a username is unique in the whole database. Should I use Event Store or Read Database for a query? Where should I check that?” Seriously, that question is one of the most popular topics connected ...
Sztuka programowania 2981 dni, 17 godzin, 54 minuty temu 156 źrodło rozwiń
As I announced in the last part, our CQRS/ES journey is almost finished! But before it happens we need to take care of read side of our application. However, before we move forward to the implementation, it’s worthwhile to explain why do we need a read side? After all, we have an excellent data source called Event Store which allows us to reconstruct every domain object in our system. What’s, even more awesome is the fact that we can „time travel” in our domain by not applying all events in our domain ob...
Architektura 2990 dni, 21 godzin, 34 minuty temu 154 źrodło rozwiń
The letter „U” in CRUD means Update. Is that something hard to do in our applications? Of course not! We simply get some data, change the value of selected columns and save our changes. That’s it. However, sometimes thing may not go so smooth, especially when we (as programmers) wouldn’t predict some edge-case scenarios. One of this is updating same data by many users at the same time. That’s why today’s post will be dedicated to the concept of optimistic concurrency and implementing that using Entity Fr...
All right, after a few short breaks, I’m finally ready to continue our journey, during which we discover Command Query Responsibility Segregation pattern along with Event Sourcing. In a previous part, we discovered the role of events and ES in our application and to be honest we’re almost done! But before that, we need to focus a little bit on transporting our commands and events. That’s why today’s post will be dedicated the buses. Okay, let’s start! RabbitMQ and EasyNetQ To accomplish our task, we n...
Architektura 3002 dni, 16 godzin, 31 minut temu 280 źrodło rozwiń
Dzień dobry bardzo! Kolejny poniedziałek, kolejny odcinek podcastu! Dziś będzie grubo, ponieważ gościem ósmego odcinka był Maciej Aniserowicz (ktoś nie zna?)! Maciek jest programistą, który od ponad pół roku nie pracuje bo może, prowadzi bloga devstyle.pl, jest hostem pierwszego Polskiego podcastu technicznego DevTalk, prowadzi szkolenia i jeździ po naszym pieknym kraju głosząc dev-słowa na przeróżnych konferencjach. Tematem dzisiejszego odcinka są testy. Jak i co powinniśmy testować w naszych systemach...
One of the cool feature in ASP.NET 5 (before renaming to ASP.NET Core) or more precisely in dnx was tracking all code changes without recompiling whole project (Microsoft used to call that In-Memory compilation). Why is that so cool? Well simply, it’s way more comfortable than it used to be, and it makes our development faster. Now the good news is that it’s not gone. I mean, if you run your .NET Core application (with Ctrl+F5, not F5) using IIS Express, you can change your code in Visual Studio, then sa...
W końcu udało się dotrzymać słowa i nowy odcinek podcastu pojawia się równo po dwóch tygodniach (huraaa!). Gościem tego epizodu był Michał Franc – programista/team leader, speaker, blogger oraz współorganizator wirtualnej konferencji dotnetConf PL. Razem z Michałem porozmawialiśmy o karierze programisty. Kiedy i od czego rozpocząć naukę? Czy studia są niezbędne do osiągnięcia sukcesu? Czy karierę zaczynać w małych firmach czy w korpo? Jakie są najczęstsze błędy popełniane przez młodych adeptów programowa...
Do you remember your first steps as a junior developer? Do you remember how you felt when you talked with experienced engineers? Do you remember what you said what you realized that commercial projects are way more complicated than those made in school? I do. It was more or less like „God, I suck… all these folks are just great. I hope someday I’ll be half as good as they. No… I WILL BE BETTER! And no one will have doubts about that.” Yes, I was sure that after reaching a certain level I would be master ...
Najprawdopodobniej spotkałeś się z tym problemem: Kod zastany, napisany przez nas lub nie, na pewno nie perfekcyjny i ostatecznie bez testów jednostkowych (ang. legacy code). Co teraz? Wstrzymać dotychczasowe prace nad projektem i pisać testy jednostkowe? A może całkowicie zaniechać pisania testów, bo skoro nigdy nie było testów, to po co pisać je teraz? Do tej pory omawialiśmy TDD z perspektywy pisania...
Sztuka programowania 3034 dni, 5 godzin, 9 minut temu 224 źrodło rozwiń
Dziś będzie bardzo nietypowo jak na mnie, bo o tym co jest ważne w życiu. My Informatycy, tak wiem że to takie ogólne sformułowanie, lubimy zwięzłość. Kod zero-jedynkowy to to co do nas najlepiej przemawia. Czasami jednak stajemy przed problemem gdzie cała nasza wiedza technologiczna czy umiejętność zarządzania projektami (itp) stają się bezużyteczne…
Dzień dobry bardzo! Trochę czasu minęło od publikacji ostatniego odcinka podcastu, ale mam nadzieję, że dzisiejsza rozmowa odkupi me grzechy 😉 Moim gościem był Paweł Łukasik – programista, blogger, lider Wrocławskiej grupy .NET oraz założyciel znanego i lubianego agreagtu treści – dotnetomaniak.pl. Dzisiejszy odcinek jest dość szczególny, ponieważ w końcu tematyka jest ściśle powiązana z .NET-tem. Paweł opowiedział o Intermediate Language. Czym jest IL? Co możemy dzięki niemu osiągnąć? Jakie narzędzia...
Sztuka programowania 3035 dni, 16 godzin, 51 minut temu 152 źrodło rozwiń
It’s been a while since I wrote a JavaScript article, so here it is! Today we are going to reveal one of the biggest front-end mystery. How does async work in JavaScript? The question might seem quite obvious, but believe me that many developers think that it’s because of multi-threading. Well, here is the thing. Async does not require more than one thread. If you don’t believe me click here to confirm that. Ok, fine, let’s say that we need multi-threading to do async. But here comes the thing that confu...
So far we learned about the whole concept of Command Query Responsibility Segregation (CQRS) and Event Sourcing. We also implemented domain objects which Aggregate consists of, and we expressed user’s intentions using Commands executed by Command Handlers. Today we’ll discover the role of events, and more importantly, we’ll introduce Event Sourcing to our Awesome Calendar project. One more thing. As I mentioned in one of the previous parts, I’m currently working on this project wich means that some code ...
Architektura 3044 dni, 5 godzin, 3 minuty temu 147 źrodło rozwiń
Today we are going to have a little break from our CQRS/ES journey, but I hope you’ll like that article anyway. Meet Aspect-Oriented Programming! An approach that’s going to change the way of writing our code and more importantly will help us to keep it clean and simple (in most cases). The idea Writing the code we can often observe that the certain group of the non-business functionalities is copied in many areas, and moreover, it affects other parts of our system. Here we can include: creating datab...
Sztuka programowania 3054 dni, 4 godziny, 17 minut temu 168 źrodło rozwiń
So far we got acquired with a theorythat stands behind the CQRS and Event Sourcing. Moreover, we implementeda (business) heart of our calendar application consisting of a domain objects. Today we are going to reveal next two pieces of our puzzle – Commands and Command Handlers. Once again, I encourage you to share your opinions and suggestions in the comments (if you have any). Commands So, what exactly the commands are? In short, these objects represent intentions of a user. They are in fact imperati...
Architektura 3061 dni, 6 godzin, 22 minuty temu 101 źrodło rozwiń