Interview with Dino Esposito, author of Microsoft .NET: Architecting applications for the enterprise
Luxoft Training offers you an interview with Dino Esposito .Net guru, author of many books on .Net programming, technical development evangelist for Android and Kotlin at JetBrains. In the interior, Dino will talk about his workshop “A Fresh Look at Real Software Design: From DDD and CQRS to Event Sourcing,” which will be held on October 25 in Moscow.
DINO ESPOSITO
Trainer with many years of experience and an extra-class consultant. Dino is the author of several popular Microsoft Press books that have contributed to the professional growth of thousands of .NET developers and architects. As CTO of a fast-growing professional sports software and mobile services company, Dino is a technical evangelist for Android and Kotlin development at JetBrains, and a member of the team that runs WURFL, a mobile device information database used by by companies like Google and Facebook.
Good afternoon, Dino. You will conduct a master class on CQRS and Event Sourcing. Could you talk about these approaches?
According to my observations, now CQRS is the most effective design pattern for almost any application. CQRS talks about using finely divided stacks for commands and queries. This means that we have two simpler domain models instead of one complex one covering both of these aspects. The query stack in a CQRS solution is very simple and usually consists of a clean top-level query layer in LINQ or ADO.NET. The stack of commands, in contrast to the usual, but optional approach, displays business logic in tasks and executes them by means of commands, events and their synchronization.
Like icing on a cake, Event Sourcing is based on saving all the events related to the entities of the subject area and using them as a priority data source 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 current state of the entity at a certain point in time. As for the actual implementation, there are quite a few additional details that you will learn at the master class.
For which tasks would you recommend using CQRS, and where is it better to use traditional CRUD?
Honestly, I don’t think there are any specific weaknesses in CQRS. CQRS is a template that offers you to 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 is a model - an object-oriented model, or a library of functions, or a collection of data transfer objects - in general, these are performance details. Based on this statement, CQRS is beneficial for almost any system, and its programming does not require any other approaches than before. Also, this does not mean that you have to learn something new and terrible. In conclusion, CQRS, of its kind, is the best and more flexible way to use CRUD.
For many years, DDD has been regarded as a simple solution for complex business scenarios. What is the relationship between DDD and CQRS?
CQRS can be seen as the next step in the evolution of Domain Driven Design for short DDD. DDD originally promoted the idea of an entire, comprehensive model that can support all aspects and processes of a given subject area. For over a decade, people have been struggling to build systems in accordance with the DDD guidelines. Some projects that used DDD eventually worked, 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 that it can bring. The thing is, it seems to me that for many people, understanding that DDD is beneficial is much less specific than understanding the damage that can result from using DDD and failure. In this context, CQRS breaks the usual approach. One comprehensive model is often too complex and intimidating. What, in the end, do you do in any application? All you do is execute user interface commands and request data. Let us then separate the two levels. Ultimately, this is what CQRS allows us to do - to separate the areas of responsibility associated with executing commands and requesting data.
You are the author of many books on software development. Your latest book on enterprise application architecture is simply a hit on bookshelves. What message do you want to convey to your readers?
As developers, we know the laws of Murphy, and in particular the laws of Murphy for software development. My favorite is: “Nothing has been created yet on schedule or on budget.” And you can do little with this, in addition to studying and learning as much as possible about the subject area that your software displays. Ultimately, we write programs to maximize the reproduction of real-world processes. We must know them; we must fully understand the mechanics of the subject area; we must know 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 for your workshop? Who will benefit most - beginner developers or experienced?
At first glance, I would say that architects and senior developers are ideal listeners 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 discussed at the master class. So I would stop that any .Net developer would 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 bring a lot of useful things from this class. To reinforce this position, let me tell you a joke. This happened at TechEd Europe in 1999 during my first performance in English. I was very excited and, at the same time, scared, and I hoped that the hall will be empty. But when I entered the audience, I found that Don Box - the God of Windows / COM developers of that time - already took a place in the front row. He was waiting for me, then he stood 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 from time to time pops up in my head:“ Dino, that's all about prospects! ”
I am sure that everyone who visits the master class will find something unique and valuable for themselves in the future - whether he is a beginner or an experienced developer.
The next Dino Esposito workshop will be held in Moscow, on the last day of the CEE-SECR conference on October 25, 2014.
DINO ESPOSITO
Trainer with many years of experience and an extra-class consultant. Dino is the author of several popular Microsoft Press books that have contributed to the professional growth of thousands of .NET developers and architects. As CTO of a fast-growing professional sports software and mobile services company, Dino is a technical evangelist for Android and Kotlin development at JetBrains, and a member of the team that runs WURFL, a mobile device information database used by by companies like Google and Facebook.
Good afternoon, Dino. You will conduct a master class on CQRS and Event Sourcing. Could you talk about these approaches?
According to my observations, now CQRS is the most effective design pattern for almost any application. CQRS talks about using finely divided stacks for commands and queries. This means that we have two simpler domain models instead of one complex one covering both of these aspects. The query stack in a CQRS solution is very simple and usually consists of a clean top-level query layer in LINQ or ADO.NET. The stack of commands, in contrast to the usual, but optional approach, displays business logic in tasks and executes them by means of commands, events and their synchronization.
Like icing on a cake, Event Sourcing is based on saving all the events related to the entities of the subject area and using them as a priority data source 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 current state of the entity at a certain point in time. As for the actual implementation, there are quite a few additional details that you will learn at the master class.
For which tasks would you recommend using CQRS, and where is it better to use traditional CRUD?
Honestly, I don’t think there are any specific weaknesses in CQRS. CQRS is a template that offers you to 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 is a model - an object-oriented model, or a library of functions, or a collection of data transfer objects - in general, these are performance details. Based on this statement, CQRS is beneficial for almost any system, and its programming does not require any other approaches than before. Also, this does not mean that you have to learn something new and terrible. In conclusion, CQRS, of its kind, is the best and more flexible way to use CRUD.
For many years, DDD has been regarded as a simple solution for complex business scenarios. What is the relationship between DDD and CQRS?
CQRS can be seen as the next step in the evolution of Domain Driven Design for short DDD. DDD originally promoted the idea of an entire, comprehensive model that can support all aspects and processes of a given subject area. For over a decade, people have been struggling to build systems in accordance with the DDD guidelines. Some projects that used DDD eventually worked, 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 that it can bring. The thing is, it seems to me that for many people, understanding that DDD is beneficial is much less specific than understanding the damage that can result from using DDD and failure. In this context, CQRS breaks the usual approach. One comprehensive model is often too complex and intimidating. What, in the end, do you do in any application? All you do is execute user interface commands and request data. Let us then separate the two levels. Ultimately, this is what CQRS allows us to do - to separate the areas of responsibility associated with executing commands and requesting data.
You are the author of many books on software development. Your latest book on enterprise application architecture is simply a hit on bookshelves. What message do you want to convey to your readers?
As developers, we know the laws of Murphy, and in particular the laws of Murphy for software development. My favorite is: “Nothing has been created yet on schedule or on budget.” And you can do little with this, in addition to studying and learning as much as possible about the subject area that your software displays. Ultimately, we write programs to maximize the reproduction of real-world processes. We must know them; we must fully understand the mechanics of the subject area; we must know 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 for your workshop? Who will benefit most - beginner developers or experienced?
At first glance, I would say that architects and senior developers are ideal listeners 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 discussed at the master class. So I would stop that any .Net developer would 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 bring a lot of useful things from this class. To reinforce this position, let me tell you a joke. This happened at TechEd Europe in 1999 during my first performance in English. I was very excited and, at the same time, scared, and I hoped that the hall will be empty. But when I entered the audience, I found that Don Box - the God of Windows / COM developers of that time - already took a place in the front row. He was waiting for me, then he stood 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 from time to time pops up in my head:“ Dino, that's all about prospects! ”
I am sure that everyone who visits the master class will find something unique and valuable for themselves in the future - whether he is a beginner or an experienced developer.
The next Dino Esposito workshop will be held in Moscow, on the last day of the CEE-SECR conference on October 25, 2014.