简体   繁体   English

内容类型开发的声明性方法与程序化方法?

[英]Declarative Approach vs Programmatic Approach for Content Types Development?

For custom development of Content Types, which approach should be followed, Declarative Approach (via element.xml) vs Programmatic Approach (via code)?对于内容类型的自定义开发,应遵循哪种方法,声明性方法(通过 element.xml)与编程方法(通过代码)? What are the pros and cons of each approach?每种方法的优缺点是什么?

Declarative approach is preferred.声明式方法是首选。 However, the major disadvantage of declarative approach is that there is no standard way of upgrading the content types.然而,声明式方法的主要缺点是没有升级内容类型的标准方法。 Up gradation is normally done in this case by writing the feature receiver which makes the necessary corrections through WSS API.在这种情况下,通常通过编写特征接收器来完成升级,该接收器通过 WSS API 进行必要的更正。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM