ASP.NET Core has every chance to replace ASP.NET in its current form. Should I switch to ASP.NET Core now? Let's talk about it with experts:
Dino Esposito (Dino Esposito) - writer, consultant, trainer and technical evangelist, a recognized expert and popularizer of the concepts of DDD and CQRS
Maurice de Beijer - Independent Consultant, MVP and Author of The React Tutorial Online Course
Andrey Terekhov is a full-stack EPAM developer, server pre-rending specialist.
All three will perform a week later in St. Petersburg at the DotNext conference with reports on ASP.NET Core. ')
Dino and Maurice answered in English, below we publish a translation of their answers.
- Dino, your report is addressed primarily to those involved in managing the development: software architects and CTO.What exactly are we talking about?
- ASP.NET Core is not just a new version. This is a completely new platform, a change of epochs. The transition can bring companies many advantages: a more compact code, better performance and scalability. But what price will you have to pay in return, how much code will you have to rewrite? I'll tell you what steps to take to migrate to ASP.NET Core, which subsystems will have to be rewritten from scratch, and what the transition strategies might be.
- You promise to answer, who should already think about switching to ASP.NET Core, and who should wait.Who do you advise to go with the release of RC2?
- No one. ASP.NET Core is still too raw. Many basic things such as Data Access are not 100% designed yet. There is no guarantee that the code you are using now will work in the release version. Now I think that finally ASP.NET Core will settle down in two years. To really follow the .NET Core is now needed by companies engaged in the development of tools for programmers. Companies like JetBrains. They make money from tools, and tools should support any new platforms from the day they launch. I advise the corporate sector developers to wait. - What transition strategies are available to application developers?
- Many mechanisms, invariable for the whole life of ASP.NET, suddenly changed in ASP.NET Core. For example, authorization, security, application interaction with the server infrastructure. We will consider all these changes and figure out how to implement familiar things in a new way. For well-designed applications, the transition will be easier and can be accomplished by a dedicated development team in a reasonable amount of time. For many other applications in the corporate sector, especially banking software that uses platform-specific components, the transition is likely to become completely impossible.
- Could the use of CQRS as an architectural pattern soften the transition?
- CQRS is a very general concept, dictating a certain division of the entire application code into two subsystems: read and write. The approach can help due to the possibility of parallel work on porting both subsystems by independent teams. Regardless of whether CQRS is used or not, the better the application layers are separated and the better your application is abstracted from the details of the ASP.NET implementation, the easier it is to localize and rewrite the code. Large applications do not have to be transferred to the new platform entirely, you can do it gradually in parts.
- The ASP.NET platform is over 15 years old. In addition, at the time of its creation, System.Web contained a large amount of code to maintain backward compatibility with classic ASP. During this time, the platform has accumulated a sufficient amount of code, which is simply no longer needed and outdated. Microsoft faced a difficult choice: to abandon backward compatibility or to announce a new platform. They chose the second option. At the same time, they had to abandon the existing runtime. Microsoft has always been a company focused on building and running everything and everyone on Windows. Existing ASP.NET was no exception. Now the situation has changed a lot: Azure and Linux began to occupy a significant place in the company's strategy.
ASP.NET Core is a work on the mistakes of classic ASP.NET MVC, the ability to start from scratch. In addition, Microsoft is also seeking to become as popular as Ruby and NodeJS among the younger developers.
- What does transition to a new platform mean for us?
- .NET Core does not contain many of the components we are used to. Forget System.Web, Web Forms, Transaction Scope, WPF, Win Forms. They are no more. For simple ASP.NET MVC applications change a bit and the transition is likely to be easy. For more complex, using a large number of classes. NET Framework and ASP.NET pipeline the situation is more complicated. Something can work, but something not. Some part of the code will have to be rewritten from scratch. Additional problems can cause WebApi, because the ASP.NET MVC and WebApi subsystems are now merged. Many libraries and nuget packages are not yet ready. So some applications simply will not be able to switch until new versions of libraries appear.
- What are the perspectives of the ASP.NET Framework 5 and ASP.NET Core? Will the community be divided into adherents of each implementation?
I think that we are waiting for a situation similar to the transition from Web Forms to ASP.NET MVC. ASP.NET Framework will be supported for a long time. At first, only a small part of applications will be developed on ASP.NET Core. Their number will increase, but sooner or later everyone will want to switch to ASP.NET Core. We still have a lot of working Web Forms applications. Why, there still is code in COBOL working in production. No one is going to rewrite it, because it just works. However, it would not occur to anyone to develop a new application on Web Forms now, everyone will choose MVC. Sooner or later, the same process will occur with the ASP.NET Framework and ASP.NET Core. The latter offers more features that meet modern development standards.
- For example, the ability to use Docker?This is the topic of your second report .
- Absolutely right. Docker is positioned as a solution to the problem "it works on my machine." Until recently, we were very platform dependent: ASP.NET meant 99% of the time Windows. Yes, we had Mono, but they did not have official support from Microsoft, which for many developers meant that they would not even try to consider this option. Now Mono is owned by Microsoft, the corporation officially supports Linux and Mac OS. We can run Docker containers with Windows or Linux. During the talk, I will explain the basic Docker concepts and demonstrate how you can run an ASP.NET Core application in a Docker container. This means that we will be able to deliver not binary files, but already configured applications that can be run in the cloud infrastructure, for example, Azure.
- In its advertising campaign, Microsoft relies on positions unusual for it: high performance, scalability, cross-platform.Do you think that ASP.NET “climbs” into the territory of NodeJS?
- In a sense, NodeJS and ASP.NET have always been competitors: both are backend platforms. But in fact between them, of course, there was no struggle. The new generation of developers, the so-called hipster developers, prefer Ruby and Node. An older generation, people from the corporate environment, on the side of .NET and Java. .NET Core clearly seeks to be more youthful, fashionable and popular. So yes, in the future we can expect a real confrontation between .NET Core and NodeJS.
- About new features for modern SPA-applications in ASP.NET Core both at the development stage and in production, in particular, about the use of Isomorphic JS and Web Components.
- And where is ASP.NET?
- It's about JavaScriptServices library. With it, you can configure flexible routing to different backend'am and collect everything under the same roof. This can be useful for those who are tired of administering the zoo of microservices written in different technologies. In addition, the technology makes it possible to speed up the time required to receive the first page at the expense of the server pre-vendor and to ensure the indexability of SPA applications by search engines. At the same time, all the advantages of a modern rich web stack are preserved: collectors, transpiling, hot reload, and more. It is enough to write not the webpack -hrm , but the dnx web .
- Which javascript frameworks are supported?
- React - production ready, Angular 2 - at your own peril and risk: it is still under development.
- I see that the library is officially included in ASP.NET Core.Will she enter RC2 or 1.0?
- Initially, the development began Steve Sanderson, and all development was conducted by community forces. Later it was decided to include in the ASP.NET Core. Now Steve has switched to other tasks - at some point there was a problem in order to accept pull requests.
Therefore, the decision on the official inclusion in the ASP.NET - can be very useful. This means that there will always be someone who will be engaged in it: not a specific person, but someone will. In theory, it should even be released along with the main part of ASP.NET.
- The current version of the library runs on dnx.Is it planned to be translated into cli, if so, when?
- Only recently transferred and debugged. Works like a clock.
- How much time did it take to write the library, and for which part did you answer?
- More than three months. But this is community development. Therefore, for so long. In addition to Steve and I worked another 2-3 people. I was mainly engaged in screwing Angular.
Well, we continue to wait for you on June 3 in St. Petersburg at the DotNext 2016 Piter conference. It is there where you can hear the reports mentioned in the post, ask questions to the speakers, and at the same time test your knowledge of English: