Why ASP.NET Core

Why ASP.NET Core

In a few weeks, our team is going to release a completely renewed version of nopCommerce - nopCommerce 4.00.
We have been working a lot over the last months and now we are proud to announce that nopCommerce is finally moved to ASP.NET Core.
ASP.NET Core is not a continuation of ASP.NET 4.6. It is a redesigned ASP.NET, brand new, cross-platform, high-performance and open-source framework.

So why we decided to move nopCommerce to ASP.NET Core?

We always try to keep nopCommerce running on the latest technologies to offer the best experience possible to our users.
ASP.NET Core is a new framework but it is already matured enough to be used as a basis for building modern, well-structured and extendable web applications such as nopCommerce. ASP.NET Core is the fully featured framework of course but let me highlight several ones making ASP.NET Core a preferable for nopCommerce particularly:

New concept

The concept of ASP.NET Core is very close to us. ASP.NET Core is open source and community-focused. The whole source code of the framework is available on GitHub.

Cross-platform

ASP.NET Core is cross-platform which means an application can be run on Windows, Mac, and Linux. Though nopCommerce still uses .NET Framework as a core, and this feature is not available for us yet. But in next versions when we finally move nopCommerce to .NET Core, developers will be able to use all the opportunities of cross-platform development.

Modular framework

ASP.NET Core ships entirely as NuGet packages. This allows us to optimize nopCommerce including selected, needed packages, which improves security and performance of the solution and reduces servicing. This also means that the framework upgrading process goes easier in general: when the new version of a package is released there is no need the whole framework to be upgraded. It gives sort of independency for a developer who can get the latest changes just by updating the packages. This is a very important feature allowing us to keep nopCommerce up-to-date constantly.

Performance

Performance is crucial for nopCommerce and ASP.NET Core suits our needs. One of the main points in performance optimization is caching. The framework supports several built-in caches.

  • The first one which is used in nopCommerce is based on the IMemoryCache which represents a cache stored in the memory of the web server.
  • The second one is distributed cache. nopCommerce uses Redis cache but doesn't use the ASP.NET Core approach yet. This will be implemented in the next nopCommerce versions.

ASP.NET Core uses Middleware

Middleware is a new lightweight high-performance and modular pipeline for requests in an application. Each part of middleware processes an HTTP request, and then either choose to return the result or pass to the next part of middleware. This approach gives a developer total control over the HTTP pipeline and encourages the development of simple modules for an application which is important for growing open source project.

ASP.NET Core MVC

ASP.NET Core MVC provides features simplifying web development. nopCommerce already uses such features as Model-View-Controller (MVC) pattern, Razor syntax, model binding and validation but the following tools are new for us:

  • Tag helpers. It's server-side code to participate in creating and rendering HTML elements in Razor files. What are tag helpers needed for? What features will be available?
    1. They give us HTML-friendly development experience. Which means Razor markup using Tag Helpers looks like standard HTML. It's important for front-end designers which are not familiar with C# Razor syntax.
    2. Now developers can use rich IntelliSense environment for creating HTML and Razor markup for the more productive development process.
    3. ASP.NET Core provides lots of built-in tag helpers for common tasks, such as creating forms, links, loading assets etc. But besides using them, it is possible to create our own tag helpers.
  • View components. This is a new tool similar to partial views, but much more powerful. nopCommerce uses view components when reusable rendering logic is required and when the task is too complex for a partial view.
  • Dependency injection into views. Although the most of the data which views display is passed in from the controller nopCommerce has views where dependency injection is more usable.

Conclusion

Moving to ASP.NET Core is a big step forward for nopCommerce community. We have changed a lot in the nopCommerce source code, there are new approaches which are worth learning about but in the same time, it should be noted that the core concepts and business logic stay the same. As well as the controller and routing logic.
This means that despite the big changes we made, nopCommerce users familiar with previous versions of the platform can easily manage dealing with new one, based on ASP.NET Core, it shouldn’t take long. To ease an upgrading process from 3.90 to 4.00 we are going to prepare a tutorial describing it step-by-step.
We are also going to talk about the moving nopCommerce to ASP.NET Core on the nopCommerce Days conference which will be held in New York in November 2017.

New technologies are crucial for us as for the eCommerce platform. We are certain that ASP.NET Core is the future of web development in .NET and moving to ASP.NET Core will bring our community lot more opportunities for growing their business.

 

Author: Marianna Koroleva, nopCommerce team

Category: Community
Comments
Only registered users can leave comments.
Comment text:  
Created on: 9/18/2017 5:12 AM
Great!!!!
Created on: 9/18/2017 7:25 AM
Great! Good to here. Waiting to see performance of nopCommerce in ASP.NET Core
Created on: 9/18/2017 8:33 AM
Great Information for all users. Thanks
Created on: 9/18/2017 8:39 AM
Sounds great :)

I sure am happy about EF core.
Created on: 9/18/2017 1:16 PM
the best team ever!
Created on: 9/18/2017 8:59 PM
One of the best thing I found while looking at nopCommerce 4.0 code wad new implementation of widgets. It will just kill old performance issue that we were actually facing while using widgets and this is why we used to use some other methods.

Moreover, thanks to nopCommerce team that they actually managed to keep same architecture while moving to asp.net core and this is why we are again powerful as a nopCommerce solution provider to say "Yes, we can easily migrate your website to nopCommerce 4.0"..

Thanks Mariana for sharing this post
Created on: 9/19/2017 12:03 AM
What about upgrading from 3.8 to 4.0?  Will I first need to upgrade from 3.8 to 3.9 and then from 3.9 to 4.0?
Created on: 9/19/2017 2:33 AM
Looking forward to the 4.00 ASP.net Core version. Nice work team!
uco
Avatar
Created on: 9/26/2017 10:38 AM
It will be also better move to Dapper + Stored procedures and stop using Entity framework.
If you emotionally attached to Entity framework at least use Command Query parent and not repository's.
https://app.pluralsight.com/library/courses/clean-architecture-patterns-practices-principles
Moving to .net core will not increase performance.
Created on: 9/26/2017 10:51 AM
Superb!!
Created on: 9/26/2017 11:58 AM
Nice work!
Created on: 9/26/2017 12:10 PM
Awesome news, can't wait to work with the new version...great job as always!
Created on: 9/26/2017 12:45 PM
Great article.  I'm glad nopCommerce did this article.  Now, I know what I need to learn to catch up to the latest technology.

I'm very happy to be associated with such an advanced thinking company.
Created on: 9/26/2017 12:46 PM
Great article.  I'm glad nopCommerce did this article.  Now, I know what I need to learn to catch up to the latest technology.

I'm very happy to be associated with such an advanced thinking company.
Created on: 9/26/2017 12:59 PM
I have a build on going with the current iteration of 4.0 - I must say it is absolutely fabulous. Performance is off the scale! I'm staging on a $4 AWS instance and i'm actually STAGGERED at the performance.

Well done guys!
Created on: 9/26/2017 8:22 PM
期待很久的ASP.NET Core版本,很棒!
Created on: 9/27/2017 12:10 AM
Looking forward to it and how plug-ins will work!! Good tutorial needed for that ;)
Created on: 9/27/2017 1:48 AM
Great news, but what will happen with all plugins available, or ones we have wrote for our projects, that also may use other APIs and 3rd parties not available in Core?

Also i have a suggestion that you alter injected private members in services, to protected, so we don't have to re-declare them in derived classes when we inherit :-).
Created on: 9/27/2017 2:37 AM
Sounds good but I hope this means everything async or at least providing async versions of all the service interfaces that use remote resources (database, blob storage, redis etc).
Created on: 9/27/2017 9:55 AM
I'd simply like to say Thank you NopCommerce Team!
Created on: 9/27/2017 11:45 PM
Great news for all. Waiting for see Nop in asp.NET core
Created on: 9/28/2017 12:20 PM
Excellent blog with very valuable an concise information. Thank you very much!!
Created on: 10/8/2017 6:46 AM
Looking forward to 4.0
at Tmotions we already have upgraded some of our .Net projects and .Net Core and the team is now well trained on the new framework. We look forward to upgrading our customer's nopCommerce platforms to 4.0 soon
Created on: 10/9/2017 7:59 AM
Developer Documentation is messing
eCommerce CONFERENCE 2017
Learn more