The difference between the portal template and the ASPX template in Kentico

What is the difference between the portal template and the ASPX template in Kentico?

Which is preferable?

+4
source share
3 answers

As a hardcore developer and Kentico certified trainer, I always use and always recommend using the Portal Engine over ASPX templates.

I say that since the Portal Engine provides a rich interface for creating and customizing templates . Right inside the CMS Desk, you can create templates and add web parts to them. You also get a dialog with a good property editor with custom selectors for each type of field, as well as a macro editor for each field. This means that if the field expects a list of document types, the Portal Properties dialog box will show you a list of document types with checkboxes. It could not be easier.

Another significant difference is that (at least at this time) the ASPX template development method does NOT support widgets . I'm not sure if this will change in version 6.0, which is due to debut this year.

Another huge benefit is that properly trained content administrators have the ability to make changes to templates . Again, if they have been trained, they can edit the template on the design tab in the CMS Desk. This can facilitate a lot of work, which is usually superfluous for the developer. Think: β€œHey David, can you change the static text on this template?” or "Hey Dev, can you move this web part to another column?"

To play devil's advocate, here are the benefits of ASPX templates. Templates are mostly master pages, so they are file-based and can be easily used in conjunction with source control. This may be better for a site with a heavy code (application) where the configuration of the templates is important.

With ASPX templates, it might be easier to write more complex code. For example, if one Web Part (User Control) is directly dependent on the state of another Web Part, then this would be easier to do with ASPX templates. But you can also argue that your code should be more decoupled and not rely on other web parts that exist in the template: P

+14
source

Portal templates can be embedded in the web interface; they have a complex but reliable inheritance structure; There are many ways to combine and show data, but there are many places where you need to manage / manipulate data to make it work as best as possible.

ASPX-template allows more complex code and edit through Visual Studio or a similar editor directly.

Both models can be used together. You can achieve the most. Thus, it really comes down to your own developmental preferences, skill sets and / or solution needs in each case.

Personally, I use a combination of the two on more complex sites. Simple sites that I get using portal templates, as this allows you to make simple changes remotely without a full publish / release cycle.

Follow the link for the long version, but the "short version" from Kentico DevNet "ASPX versus Kentico CMS Blog Portal Development" is:

If you do not know the development model, or if you are not an experienced developer, and if you want to quickly develop your website, select the Portal Engine. If you do not like the design modes and visual programming, but, like the code itself, select the ASPX model (ASPX page templates).

+6
source

One big advantage that I found when using ASPX templates was that they were file-based, so source code management was very simple, and I could easily deploy it from the local development process to the production environment when I made changes. Using portal templates, if you make changes, they are all stored in the database, and it is more difficult to deploy them in different environments (unless you have source database control installed). You will need to make changes to the portal templates and then restore the database or something in other environments!

0
source

All Articles