ASP.NET Core 1.0 And Why There Has Been So Many Changes

Why is there so much change in the new ASP.NET? It's now called ASP.NET Core 1.0. What changed? What does Microsoft desire with this version? What will this version facilitate in our job? These are some of the questions that I answer in this article, beyond explaining what the internal changes inside of the new development platform are. This is my first article about the matter. So, let’s get started!

In the 10 years that I worked with ASP.NET many things changed. When I started to develop in the Microsoft platform, in 2006 to 2007, I knew little about it. I had liked Oracle and C++ at the beginning when I worked with the web. I remember that I did not like Visual Studio 2005. I had a big job to understand web programming for desktop programming. But a thing that I liked very much between the two worlds was Web Form Control. I liked it and for a long time I did not need to know anything about JS; of course, I was a Junior in the enterprise where I was working. And I kept thinking about the beautiful product Microsoft had created and how others companies have not had created an equal product.

After the start a mega project and the need of high performance, I was obliged to learn JS and jQuery. When I saw the client with the server, I noted that doing things just with Web Form Control was not as nice as I had imagined. In this period I had to decrease the use of ViewState so that the pages were loaded with more speed and after this, I began to love JS.

The time passed and the framework and ASP.NET was growing up. Now, I could see companies starting to use the Microsoft development platform. A time after, I saw MVC and I thought it was nice, however, I knew that it still had many things that were of Web Form. Of course, ASP.NET was built for Web Form.

In this period others platforms were appearing and gained space, such as Ruby and Node; these platforms arrived with a different philosophy, things that Microsoft until then did not think to do. The first thing was that now you could work side by side with the engineers of platform, with a community that loves what it does. The second thing is that they created a format of projects so that any operational system and any tool of code could read and execute your project.

The Microsoft market is big, global, and many private companies invest in the Microsoft platform because of the security and experience of product. Why then does Microsoft want to change your development core? To do so much work? Simple, to conquer a territory that it still does not have, other operational systems and make a better, faster, and lighter product. Otherwise, the tendency would be to lose market share to Ruby and Node.
The ASP.NET platform is more used and known, but for the developer that loves Linux, he or she does not go to ASP.NET to study and work with technologies that do not work in their environment. Thinking that, Microsoft created a new platform of development that works in the main operational systems: Windows, Linux, and Mac. Also a new tool of source code was created called Visual Studio Code, which is being used by the Google Team, because it does not just run “things of Microsoft” it runs other platforms in Windows, Linux and Mac. Just with these two products created, Microsoft now is going to to find new developers and new companies that before they could not because the systems were not Windows.
There is a problem! To Microsoft doing these two things is necessary to change many things in your core of development, that currently only work on Windows, and because of this, Microsoft is doing so many changes these two years.

So, what were the changes?

Before of answer, bellow I inform you what the new ASP.NET is according to the documentation done by Microsoft:

“ASP.NET 5 is a new open-source and cross-platform framework for building modern cloud-based Web applications using .NET. We built it from the ground up to provide an optimized development framework for apps that are either deployed to the cloud or run on-premises. It consists of modular components with minimal overhead, so you retain flexibility while constructing your solutions. You can develop and run your ASP.NET 5 applications cross-platform on Windows, Mac and Linux. ASP.NET 5 is fully open source on GitHub.”

As I said above and answering the question, the new ASP.NET has as features: It works in many operational systems, is open source and was developed from the ground up. To do all this, first it was necessary to break the System.Web.Dll into many parts, because it has a strong coupling with the .Net Framework that works only in Windows. Whoever understands Web Forms, knows and remembers Windows Forms. Thus did the Microsoft Team develop special classes in the .Net Framework for Web Forms to work that way. That is a reason for which updates are so slow in ASP.NET, the .Net Framework too needs updates. Already with Web API, SignalR and Identity are products that do not depend on System.Web, and with this, do not work with IIS only, and by this reason do not share the same core. For instance, Web API and MVC are very similar, but we know that internally they are different.

Is System.Web.ddl bad? Yes and no. If you think of the facilities that this package brought in the past, we cannot see it as bad. But thinking of the current scenario, where Ruby and Node are competitors and are gaining new developers, we can say that System.Web.Dll is bad because it is coupled with .Net Framework and by its performance. For the same reason that you do not use Session, Cookie, Membership and others, all is processed in the IIS, bringing delays for the systems. Whoever has already developed in Node knows it is fast and light. Do you remember in the beginning of this article when I said that I loved Web Forms by remembering desktop programming? This always was the problem, doing specific things that only work in Windows.

The new ASP.NET is very similar to Node. What we need (Session, Cookie, static files, EF) has been set up to be placed in the application. If you do not configure, your system will stay without that recourse. This is nice, because you have the option of consuming only what you need and so we have a pipeline that's more light and clean.

To build the new ASP.NET it was necessary to create the .Net Core. Following is an explanation that is in the Microsoft documentation:
“.NET Core 5 is a modular runtime and library implementation that includes a subset of the .NET Framework. Currently it is feature complete on Windows, and exist for both Linux and OS X. .NET Core consists of a set of libraries, called “CoreFX”, and a small, optimized runtime, called “CoreCLR”. .NET Core is open-source, so you can follow progress on the project and contribute to it on GitHub”.

Now we have the .Net Framework 4.6, in case you want to continue with the experience that already is there. This framework is not cross-platform. And also we have a new framework called .Net Core 1.0. Following is an image that shows the two frameworks.



In the past, in order for a version of application to run, for instance, in the .Net Framework 4.5, it was necessary to update the server for a version desired, and for this reason, some applications that are running that server could suffer some problem, because this update was not allowed. Now, all applications can be packaged with the CoreCLR and this does not need an installer of the .Net Framework in the server. Every application can have a different version of CoreCLR and updates it individually, without affecting other applications. Other big changes that we have in this new .Net Core is the fact of the compilation can be dynamic, which means that we do not need to stop the application to change the source code.

When the .Net was built in 2002, it was only a framework. After it was built another framework called .Net Compact Framework, providing a small version of the original framework, but done to mobile. Because of that, Microsoft began to have many frameworks for every development platform. The reason behind the construction of .NET Core is it can be portable, unique, modulate and cross-platform. ASP.NET, Mobile and others will use the same core.

The new .Net Core too is executed above .Net Framework 4.6. Then, in case your server already has the last version, you can use the new ASP.NET. But the new ASP.NET still is in RC and the production version is foreseen in April.

Since the start of development of the new ASP.NET much confusion was generated in relation to the name. First was vNext. After some months it was renamed to ASP.NET 5 and recently it was changed to ASP.NET Core 1.0, because conceptually it is a new development platform. As an example, in this version, MVC and Web API are together and inherit the same object.

Conclusion

Microsoft is making an important step to continue with your development platform. It shows that to update and study other platforms is important. Now we have an ASP.NET that's more light, unique, and modulated, and that runs above many operational systems. We cannot forget that now we have all the source code available in Github and this is great in order for the community to work and improve the product. If you still program in Web Forms it is good you study it, because the tendency is that new projects are geared to the new version. But if you still program in ASP Classic and the like … you could think in and do other things
 
Read more articles on ASP.NET Core:

Up Next
    Ebook Download
    View all
    Learn
    View all