Portal Engine or ASPX Template: Choosing the right kind of development models in Kentico

by Mercedes Amoros, Web Developer @ClearPeople

09/04/2015 

This blog post aims to describe the advantages and disadvantages of the types of development models available in developing your Kentico websites. 

The Portal Engine Model

With the portal model your templates can be built within the web interface and you can define your templates and document types easily.  

Advantages: 

  • Visual representation of your zones (placeholders) and webparts (controls)
  • You can create a placeholder easily without writing any code
  • To remove/create a webpart you only need to go to the design tab
  • You don’t need to deploy if you want to change a webpart or placeholder

Disadvantages: 

  • It is not possible to manipulate the file directly and it can be difficult to develop complex Webparts; in this case I’d advise using a combination of Portal with ASPX. 
See below an example of the Portal Engine Model: 

Portal Engine

ASPX Template Model

The ASPX model in Kentico allows you to implement all your templates from scratch on the physical file. You should define your Zones (placeholders) and webparts (controls) programmatically in your ASPX file.  
To use the ASPX model you need to create a new template and specify which file (.aspx) your template is, like a standard ASPX page for example. To do this you need to create the ASPX files on Visual Studio and inherit these from Kentico classes like: TemplateMasterPage or TemplatePage.

Advantages: 

For some webparts which require complex functionality it is easier for the developer to create the code on an ASPX file. Because it is file-based you can use source control. 

Disadvantages: 

  • You will need to write all the code to create templates (which can be done in Portal quicker)
  • You need to deploy every time you need to change a template
  • It is not possible to change your template from the Kentico panel 
See below an example of the ASPX Template Model:
 
ASPX model

Portal Engine and ASPX Template Model

It is possible to combine Portal and ASPX models across your site. You can create some templates on Portal and some on ASPX depending on the complexity. 
  You can also combine the two on the same template. The template can be created on Portal Model and your webparts can use the ASPX model, using ASCX files. 
To create Webparts on Kentico with an ASCX file you should create a control on Visual Studio and inherit from CMSAbstractWebPart. 

Portal Engine is recommended by Kentico 

Kentico recommend you use this model to develop because you can define your page easily with a powerful visual UI. It provides an intuitive way to create Zones (placeholders) and add Webparts (controls). 

Personal opinion

Choosing your development model will depend on the complexity of your project. Personally, I think the best option is a combination of both. Portal can give you a quick way to create your templates and document types, and give you a vision of what your pages will look like. Using the ASPX model makes it possible to create more complex functionality for your site. 

I find a good combination is to use the Portal Model for your templates and layouts (the visual part of your project) and the ASPX Model for some complex webparts which will give you the flexibility to create your own code. 

For this combo of Portal Engine and ASPX Templates, you will certainly need programming knowledge to develop your Kentico site. 

We recently developed the Get Me Everywhere website in Kentico. You can read the case study here.