📜 ⬆️ ⬇️

Interview with Dino Esposito, author of Microsoft .NET: Architecting Applications for the Enterprise

Luxoft Training offers you an interview with Dino Esposito .Net-guru, the author of many books on .Net-programming, technical evangelists of development for Android and Kotlin in JetBrains. In the interview, Dino will tell about his master class “A fresh look at the design of real software: from DDD and CQRS to Event Sourcing”, which will be held on October 25 in Moscow.




DINO ESPOZITO
')
A trainer with many years of experience and a top-class consultant. Dino is the author of several popular books from Microsoft Press, which have contributed to the professional growth of thousands of .NET developers and architects. As the technical director of a fast-growing professional software and mobile services company for professional sports, Dino is a technical evangelist for Android and Kotlin development at JetBrains, as well as a member of the team that maintains WURFL, a database of information about mobile devices used by such companies like google and facebook.

Good afternoon, Dino. You will conduct a master class on CQRS and Event Sourcing. Could you tell us about these approaches?

According to my observations, now CQRS is the most effective design pattern for almost any application. CQRS talks about applying finely divided stacks for commands and requests. This means that we have two simpler domain models instead of a single complex that covers both of these aspects. The stack of requests in the CQRS solution is very simple and usually consists of a clean layer of top-level queries in LINQ or ADO.NET. The command stack, unlike the usual, but optional approach, displays business logic in tasks and executes them in terms of commands, events, and their synchronization.
Like the icing on the cake, Event Sourcing is based on saving all the events associated with the entities of the domain, and using them as a priority source of data in applications.
You do not store the relational model, you only register all events that are associated with changes in the system, and reproduce these events sequentially to obtain the actual state of the entity at a specific point in time. As for the actual implementation, there are quite a few additional details that you will learn at the master class.

For what tasks would you recommend using CQRS, and where is it better to use traditional CRUD?

Honestly, I don't think there are any particular weaknesses in the CQRS. CQRS is a template that suggests you use two separate levels: one filled with a model and services for reading, and one with a model and services for executing commands. And what a model is — an object-oriented model, or a library of functions, or a collection of data transfer objects — in general, these are the details of the execution. Based on this statement, the use of CQRS is beneficial for almost any system, and its programming does not require any other approaches than before. It also does not mean that you have to learn something new and terrible. In conclusion, CQRS, in its own way, is the best and more flexible way to use CRUD.

For many years, DDD has been considered as a simple solution for complex business scenarios. What is the relationship between DDD and CQRS?

CQRS can be thought of as the next step in the evolution of Domain Driven Design, abbreviated DDD. DDD initially advanced the idea of ​​a whole, comprehensive model capable of supporting all aspects and processes of a given subject area. For over a decade, people have been struggling to build systems in accordance with DDD directives. Some projects in which DDD was applied, eventually earned, some projects failed. You can also tell success stories, but many still believe that it is difficult to engage in problem-oriented design, despite the significant benefits it can bring. The fact is, as it seems to me that for many people, understanding that DDD is beneficial is much less concrete than understanding the damage that may arise from the use of DDD and failure. In this context, CQRS breaks the familiar approach. An all-encompassing model is often too complex and frightening. What, after all, do you do in any application? All you do is execute user interface commands and request data. Let's then separate these two levels. Ultimately, this is exactly what CQRS allows to do - to divide the areas of responsibility associated with the execution of commands and the request for data.

You are the author of many books on software development. Your latest book on enterprise application architecture is just “hit the bookshelf”. What message do you want to convey to your readers?

As developers, we are well aware of Murphy’s laws and, in particular, Murphy’s laws for software development. My favorite is: “Nothing has been created on schedule or on budget.” And you can do little with this, in addition to study and learn as much as possible about the subject area that your software displays. Ultimately, we write programs to reproduce as much as possible the processes of the real world. We must know them; we must fully understand the mechanics of the domain; we must speak the language of experts; and all this we need in order to get an idea of ​​the requirements of users and to plan and design a software product.

Who is the target audience of your master class? Who will benefit most - novice developers or experienced?

At first glance, I would say that architects and senior developers are ideal students of the master class. But I can also say that nothing in this class will be completely new in the sense that most architects could hear about most of the topics that I considered at the master class. So I would like to point out that any .Net developer will find this class useful for himself. Also, this master class will help anyone who wants to become an architect. Perhaps the benefits for beginners and experienced developers will not be the same, but everyone, I think, will take a lot of useful things from this class. To strengthen this position let me tell you a joke. It happened on TechEd Europe in 1999 during my first speech in English. I was very excited and, at the same time, scared, and I hoped that the hall would be empty. But when I entered the audience, I found that the Don Box –God Windows / COM developers of that time - had already taken a place in the first row. He was waiting for me, then he got up and said: "I am here to learn from you." “Don - I replied - you are like God. What are you going to learn from me? ”And he said a phrase that occasionally pops into my head:“ Dino, that's all about the prospects! ”

I am sure that everyone who visited the master class will find something unique and valuable for themselves in the future - whether it is a beginner or an experienced developer.

The closest Dino Esposito master class will be held in Moscow, on the last day of the CEE-SECR conference on October 25, 2014

Source: https://habr.com/ru/post/231331/


All Articles