It’s been a while since I did a full Tridion implementation, and mostly I review/advise on other people’s implementations nowadays, but there’s something that I have always failed to see in other people’s implementation and I wonder why: the use of Domain Specific classes.
Let’s look at some examples, by taking some simple content types. Assume a schema with:
Name – Article Author – Component Link to “Person” Component PublishedDate – DateTime field Summary – RTF, 5 line summary Content – RTF, full content ContentClassification – multi-value keyword field
In a “normal” implementation you will then proceed to see loads of code like this:
If you would have just been a bit lazier you could have created a class like this:
And now your code would be a much more readable and friendly to use:
And you don’t need to explain so much about Tridion to any of the untrained newbies that got assigned to your project.
So – why don’t we see this being used more often? Discuss.