SDL Web 8.5 (formerly known as SDL Tridion) is just around the corner. This release introduces a number of new features in Content Manager and functional changes in Content Manager Explorer, Content Delivery, Audience Manager and Translation Manager. Experience Optimization, formerly called SmartTarget, is part of SDL Web as of this release.
One of the unwritten rules in MVC is that ViewModel classes should be kept very simple. They should basically represent data to be displayed in your views. Then, depending on the concrete implementation and the requirements, the whole mapping and connecting it all together part does not always stay simple.
The usage of ViewModels in DD4T 2.0 can actually be very simple, as the example code will try to show. Anything with a simple basis should be also extendable in an easy way and that is the main goal of the framework.
If you’re using SDL Tridion 2011 GA and you want to use DD4T, here’s how to do it!
In the previous article in this series, we had an in-depth look into how the ViewModels mechanism works in DD4T 2 for Java. This part covers the practical aspects and the basics on how to create your own ViewModels as well as having a look at how Tridion field types map to Java Object types.