Wednesday, 18 April 2012

Figuring out what methods to implement when extending the Storage Layer

If you want to do something around Storage Layer extensions, we already have some nice examples in Tridion World. One example explains how to extend the file system storage factory for a CDN use case. Another example shows how to implement storage for a new item type.

I would like to add some extra information that may clarify a couple of concepts around the methods that have to be implemented depending on the storage extension need.

Creating a new Item Type

When creating a new Item Type, new DAO, you can define any method you want. Our framework has no restrictions there.

Extending an existing Item Type

When extending an existing Item Type, the methods to implement need to conform to a contract, that means the DAO interface.

This information is very relevant for customers who want to upgrade a Deployer extension in SDL Tridion 2009 to a Storage Layer extension in SDL Tridion 2011

With 2011, R&D created the new DAO interfaces and they tried to make them resemble the old Home classes as much as possible.

There are exceptions to this though, for instance, ItemDAO. For the ItemDAO, they tried to unify four old home classes (the meta ones) into one DAO. As an effect of that, while in 2009 we would be implementing update and insert methods, in 2011 those two actions are gathered into one method, store.

To be sure, check doc doc doc

As a final note, when you need to work on extending the storage layer, do not forget, as a first step, to check the SDL Tridion 2011 Content Delivery JSP API documentation. There you will be able to see the methods to implement, etc.

No comments:

Post a Comment