Article

How Sitecore MVC differs from ASP.NET MVC?

Enterprise application development is a topic that is gaining more prominence as a key area of discussion. Perhaps the most common challenge faced by enterprise developers today is the need to enable seamless communication between business and development for ultimate project success. To achieve this goal, enterprise developers work on architectural frameworks, commonly referred to as technologies. One of the most common architectural formats or industry-standard web development frameworks to create scalable and extensible projects is the MVC (Model-View-Controller) framework. The MVC Framework is built on top of ASP.net and provides a large set of added functionalities relying on component-based development and testing.

Related: Benefits of Publishing Enterprise Content with Sitecore 8.2

To understand the primary differences between Sitecore MVC and ASP.net MVC frameworks, it is first necessary to place it on a common ground and define MVC, since it forms the primary basis of comparison.  This leads one to understand that, on a very basic level, Sitecore MVC is essentially an additional layer of API built on ASP.net. As one of the leading enterprise-level content management systems built on ASP.net, the primary purpose of these technologies or frameworks is to enable web editors and e-marketers to organize their websites in a way that allows them to take complete control over significant aspects of their websites such as social media integration and advanced personalization.

Primary differences

Sitecore MVC is slightly different from the conventional ASP.net MVC, but the basic concept remains the same. Let’s compare the two on specific terms.

  1. Request correspondence: In ASP.net MVC a request always corresponds to an MVC route. This means that there is only one controller and one corresponding action involved. To elaborate, ASP.net has a single controller that is being instantiated to which one action is being invoked. On the other hand, in Sitecore MVC a request usually corresponds to a Sitecore item. Focusing on Sitecore Controller Renderings means that multiple controllers can be used during one request, where multiple actions are invoked.
  2. Asynchronous controllers: While standalone ASP.net MVC supports asynchronous controllers, the same cannot be said of Sitecore MVC.
  3. Layout pages:.Net master pages are not particularly useful as a standalone option but may be used with Sitecore. Sitecore’s layout details are superior to the layout defined in the presentation details of the item.
  4. Implementation: Traditional ASP.net implementation offers techniques such as filters to implement features while Sitecore provides a feature called pipelines to assist development.
  5. Multiple forms: In ASP.net MVC, each form is posted to a specific controller or action. However, on Sitecore MVC, a form is usually posted to the same URL, allowing you to return the same item. As a result of this, every action on each of your controllers is executed, without particularly considering whether it is the form that has been submitted. This can be resolved by opting to use the Sitecore Form handler to post your form to a specific controller.
  6. Access to data: The developer has to manually establish any context to access data in ASP.net MVC. Sitecore invokes specific pipelines to establish a processing context for data, which contains specific layout details of the various presentation components to be invoked. This way, Sitecore provides a data repository that is typically accessed through the context item.
  7. Registering routes: In traditional ASP.net MVC, developers use global.asax or similar methods to register the routes. Sitecore provides a default route to process items that specify layouts or controllers. Developers can implement pipeline processors to register components. Sitecore has a few limitations for multiple data presentations – only one set of design details can be defined on an item.

Specific Sitecore functions

As already mentioned, Sitecore MVC has an additional layer of API that is very powerful. As a result of this, Sitecore items can be queried using several methods/technologies, from standard .NET web forms to using MVC. Besides, Sitecore comes up with its query languages, namely the Sitecore Query and Sitecore Fast Query.

Sitecore MVC provides ample flexibility, scalability, and security. It can scale up to increasing demand and has been the most preferred enterprise solution for tech giants such as Microsoft to financial powerhouses such as American Express.

We’re listening.

Have something to say about this article? Contact us to know more or share it with us on FacebookTwitter, or LinkedIn.

Related Posts:

Facebook
Twitter
LinkedIn
Categories

Select a Child Category
category
67688ccd5f1ba
1
0
226,352,350
Loading....
Recent Posts
Social Links

Related Posts

Want to Learn More?

Milestone experts take the time to listen, understand your needs, and provide the right mix of tools, technology, and resources to help you meet your goals.

Request a complimentary consultation to get started.

Request a Complimentary Consultation

Skip to content