Why nopCommerce themes?
The team behind Nop-Templates.com have been following and working with nopCommerce since version 1.5 came out almost two years ago. But it has been only recently, since nopCommerce 2.0 entered the scene, that we decided to concentrate much more effort and energy on nopCommerce. Why you would ask? The answer is quite simple. NopCommerce 2.0 marks a new and a very promising beginning for the project, not because it uses the latest and greatest .NET web technologies, but because nopCommerce 2.x allows for what was not possible before: extensibility and scalability.
NopCommerce themes were extremely difficult, almost impossible, to develop with nopCommerce prior to version 2.0 and by a nopCommerce theme I mean a bunch of files that you deploy to your server, switch a setting on and you have a whole new web site. Not to speak of nopCommerce extensions of any kind. Not having your nopCommerce customizations as a standalone software piece (nopCommerce theme) meant hard work when the time came for upgrades to new versions of nopCommerce. And upgrades are something you cannot ignore, because clients just love moaning for new features and design. And they are right to do so. An e-shop that does not develop new features and new functionality to keep up with the trends in the dynamic e-commerce scene, is just like a shop window that noone decorates anew.
That is why it is very important for nopCommerce businesses and developers to understand how nopCommerce 2.x makes possible what was hard to achieve before, namely the development of nopCommerce themes and extensions.
Unfortunately our experience with web companies using nopCommerce 2.x shows that most of them are completely missing the point and failing to take advantage of the nopCommerce theming and extensibility capabilities. Changes are still being done directly to the nopCommerce source code, the nopCommerce views are being modified, even the nopCommerce controllers and models! This totally defeats the idea behind the new nopCommerce, not to speak that working with MVC is much more time consuming and requires more resources than the well established web forms. In many of these cases nopCommerce 1.9 could be a much better choice.
Why nopCommerce themes?
Customizations to nopCommerce 2.x should in all cases be implemented as a nopCommerce theme. In this way your nopCommerce source code is guaranteed to be:
1. Easy to manage. Your source code is in one place separate from the rest of the system both physically and logically.
2. Easy to upgrade to future versions of nopCommerce. This is extremely important as nopCommerce is evolving fast with new and cutting edge features.
3. Easy to extend with new functionality solely because by having a nopCommerce theme you have achieved a nice sepration of concerns.
4. Easy to interchange with other nopCommerce themes. You might have a different nopCommerce theme for Christmas or even for every season. Or you might want your web site to server one nopCommerce theme to customers from one part of the world and another to customers from somewhere else.
So far I am making nopCommerce themes sound as the ultimate solution. However the nopCommerce savvy reader would immediately spot that you cannot have MVC controllers and models in a theme. You cannot have MVC action filters even. Technically there is nothing to stop you from coding all these in a view but it would not be pretty, not to speak of totally breaking the MVC pattern. So how do we overcome this restriction? The answer again is simple due to the extensible nature of nopCommerce. NopCommerce plugins! Most often a nopCommerce theme, needs to be accompanied by a nopCommerce plugin. Will this complicate matters? Not at all. A nopCommerce plugin is just as separate from the nopCommerce source code as is a nopCommerce theme. In fact all our themes at Nop-Templates.com come bundled with a plugin.
One would probably need a nopCommerce plugin to go alongside a nopCommerce theme for the following reasons:
1. To register new MVC routes or alter existing ones.
2. To implement custom controller actions or custom models, which can be used to enhance existing ones.
3. To change the behavior of existing nopCommerce controller actions by intercepting the action execution somewhere in the MVC pipeline. This is achieved through MVC action filters which constitute one of the most powerful extensibility tools every ASP.NET MVC developer should be aware of.
4. To install custom resource strings or change existing ones.
There isn't a customization to the nopCommerce core that could not be achieved via a nopCommerce plugin and easily integrated into a nopCommerce theme. So you can see how by a nopCommerce theme I don't really mean a bunch of CSS tweaks and images, but rather a full blown e-commerce solution. What could be better than that for a client looking for an e-commerce web site? Just look at the nopCommerce feature set: http://www.nopcommerce.com/featurelist.aspx
These features together with the clean and sound implementation of the nopCommerce core, no doubt beat many paid e-commerce systems, which cost thousands of dollars and which are produced by one the biggest software powerhouses in the .NET world.
Implementing nopCommerce projects via the nopCommerce theming and plugin infrastructure might seem a daunting task at first. And I would totally agree that it is not that easy, mainly due to the fact that the new nopCommerce came out recently and there is still no developer documentation. However nopCommerce themes is the way forward. Companies who manage to master the nopCommerce extensibility features will no doubt be much better positioned and capable to shine in the vast and ever changing world of modern e-commerce.
How to create a nopCommerce themes is next, so stay tuned for the coming blog posts from the Nop-Templates.com development team.