|Number of votes:||1|
Joel Abrahamsson put some light on some issues with the newly added generic overloads GetPage and GetChildren on DataFactory as well as the generic overload of ShallowCopy on PageData. These APIs were added mainly to give developers a way to hook in their own PageData implementation in a simple way which was used by the PageTypeTool and was mentioned by Daniel Rodin in his blog post Working with your own PageData types in CMS5 R2 SP2. However, as the use of these methods have been somewhat outdated by the introduction of PageTypeBuilder and as we agree with Joel’s feedback, we are now considering a removal of these APIs by the release of CMS 6.
Our only remaining concern is backward compatibility which is something we struggle to maintain as much as possible (even if we are shipping a new major version). However our qualified guess (after all we can only guess) is that the adoption of these methods are not that widely spread. If we also take into account that we can create extension methods that replaces all but one of the APIs planned to be cut we think it should be rather safe to get rid of the methods in CMS 6. If you disagree, continue reading.
The signatures that are at stake:
public IEnumerable<T> GetChildren<T>(PageReference pageLink)
public IEnumerable<T> GetChildren<T>(PageReference pageLink, ILanguageSelector selector)
public T GetPage<T>(PageReference pageLink)
public T GetPage<T>(PageReference pageLink, ILanguageSelector selector)
|public static T ShallowCopy<T>(PageData copy) |
where T: PageData, new();
We are now interested to hear if there are anyone that strongly disagrees with the suggested change.
Is there anyone out there that uses the APIs listed above?
If yes, would it be sufficient for you to replace the DataFactory changes with equivalent extension methods with the same signature and same semantics?
Please, post a comment here or drop me a mail (fredrik [dot] tjarnberg [at] episerver [dot] com).