Recently I got a chance to upgrade a big enterprise level neat implementation with SDL Tridion 2013 SP1 and DD4T 1.31 to DD4T 2.0. A big thanks to Harald Hoffelink for helping in a big way to achieve this. Ahh BTW, this was a .NET based implementation.
Why you should upgrade to DD4T 2.0 from an earlier version:
Following are few benefits that you should be considering for upgrade to DD4T 2.0 –
- DD4T 2.0 now renders in JSON format instead of XML and also omits rarely used data elements – this means a smaller transport package size thereby decreasing the overall publishing time due to reduced transport time
- Compression of published data – means further smaller size of data in the transport package as well as in the broker DB which further means a faster publishing and a faster website
- Resolves binaries and publish them by default – means no need to add “Publish binaries for components” TBB
- Support for SDL Media Manager
- Support for ECL
- A number of Bug Fixes – bugs related to linking of multimedia in RTF field, bugs related to keywords (e.g. a binary linked in a multimedia field in the keyword’s metadata does not get publish OOTB in earlier versions) etc.
Steps involved in a typical DD4T 2.0 upgrade:
On a high level, you would be doing following:
- Download and install the DD4T TBB setup on your CM server following the instructions provided on http://www.dd4t.org – Do Not try to overwrite the existing TBBs of older DD4T version
- Changes the reference in all your CTs and PTs for using these updated TBBs
- Try Publishing the content (page and component) using these new TBBs and ensure it is publishing successfully.
NOTE: DD4T 2.0 does not (at the time of writing this) support to XML and only renders the JSON output – This means if you have any customization in TBBs or if you are using a custom TBB along with DD4T TBBs to make a compound template – Well you may need to rewrite all those TBBs
- Remove references to older DD4T dlls
- Download and Install the DD4T 2.0 packages using NuGet Manager
- Ensure your project is using references to these new dlls
- Compile the project – You would be presented with few hundreds of compile errors due to various changes in the framework – work on to resolve these compile errors
- Once compiled try to run your project – you may come across few run time error – this depends on your existing code and mostly due to new dependencies introduced which you may need to define in your DI framework
- DD4T 2.0 is known to be backward compatible and should be working with your previously published items in XML format but this is something you should test
- Publish your new items in JSON format and test your code
NOTE: The number and resolution of compile time errors and run time errors depends on a variety of factors including how much customization of DD4T classes have been done