Enterprise Collaboration, Social Media and Custom Development
(888) 932-3375
info@ariesnet.com
Typically, in a regular ASP.Net business application, a form has events that fire from buttons, dropdown lists and other controls. The View becomes convoluted and a lot of maintenance has to be performed on these View objects and lots of events have to be mapped and passed to the Presenter object.
This is usually more than the average developer wants to handle and it can create long development processes – turning the project expensive.
But the typical Sitecore website is more presentational than it is functional. This means there are a lot of repeated patterns from page to page and those patterns tend to be “read-only” in nature – not much “eventing” going back and forth.
This makes the MVP model very well suited for a Sitecore project. With a fistful of View objects you can satisfy most of the project’s needs, as these tend to be very reusable.
private void Page_Load(object sender, EventArgs e)
{
Item item = Sitecore.Context.Item;
if (item != null)
RelatedProductsPresenter presenter = new RelatedProductsPresenter(item);
adapter.Adapt();
this.repeaterCarousel.DataSource = adapter.RelatedProducts;
this.repeaterCarousel.DataBind();
}
|
Subscribe by Email