Declarative Approach vs Programmatic Approach for Content Types Development?

1.4k Views Asked by At

For custom development of Content Types, which approach should be followed, Declarative Approach (via element.xml) vs Programmatic Approach (via code)? What are the pros and cons of each approach?

2

There are 2 best solutions below

0
Rob Windsor On BEST ANSWER
0
Madhur Ahuja On

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.