Motivation for managing your Web site code in SDL Tridion
By letting SDL Tridion manage your Web site code, it can ensure that your code is in the right location, works as intended, is versioned, and so on. You can manage your code in two ways: loosely managed, by adding ASP.NET or JSP code to your templates; or tightly managed, by adding TCDL tags to your templates that Content Delivery can transform into actual code at various stages of the delivery process.
If you want to implement dynamic functionality for your Web site, you can do so in a number of different ways.
- Unmanaged code
- Unmanaged code is Web site code stored on your Web site, and not handled by SDL Tridion at all. You can create templating code in SDL Tridion that output calls to your code. The problem with this option is that your code is unmanaged: you are reponsible for ensuring that the code is in the right location, that it works as intended, that it is the latest version, and so on.
- Loosely managed code
- You can insert ASP.NET or JSP statements in your templating code. These statements are rendered 'as is', and are executed at request time. Your code is now versioned and in the right location, but it is difficult to debug. Moreover, if you intend to use the Content Delivery Web service, then third parties calling your Web service get ASP.NET or JSP code in their response, code that they may not be able to run.
- Tightly managed code
-
Finally, you can insert TCDL statements in your templating code. TCDL is a technology-neutral language that you can transform into your Web site's language at publish time or at request time. TCDL tags exist for typical Content Delivery functionality, but you can also create your own TCDL tags.