What's the difference between C# Code Fragments and Assembly TBBs?

后端 未结 5 728
死守一世寂寞
死守一世寂寞 2021-02-13 03:07

I understand C# Code Fragments and .NET Assemblies offer the same functionality for modular template development. We manage the code fragments in the CME and assembly code in Vi

5条回答
  •  鱼传尺愫
    2021-02-13 03:46

    Frank has explained the difference between the two approaches, but that still leaves the question of how to choose between the two. My personal advise is to never use C# fragments for anything, with only one exception*. As you have found out, there is some dark magic going on in them that I personally do not like. Also, there is so much you cannot do in them that a .NET programmer is quite fond of, such as creating classes.

    Putting my personal taste aside, I see only one reason why you would ever resort to C# fragments: if you do not have access to Visual Studio or another tool that builds DLLs. And that is not a very strong argument either: if you want a job done, you should get the proper tools!

    *The exception being the C# fragments that Tridion automatically creates for each ITemplate in your assembly, of course.

提交回复
热议问题