I just noticed there are now 2 Asset classes.
http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/dam/api/Asset.html
https://dev.day.com/docs/en/cq/current/javadoc/com/adobe/granite/asset/api/Asset.html
Neither is marked deprecated, and it seems you could accomplish the same tasks using either API, granted in different ways. Is there any reason to use one over the other? Will the com.day version eventually be deprecated?
Solved! Go to Solution.
Views
Replies
Total Likes
Sean Steimer wrote...
"... might be deprecated in the future"
Not to be difficult, but couldn't you say that about any class, in any api, anywhere?
Excellent point!
I guess what I'm getting at is why add the new class that accomplishes the same thing, but not mark the old one deprected? Is this simply an oversight where Adobe engineering forgot to mark it deprecated? Or are there specific use cases twhere the old day Asset classes is better to use?
No one forgot to deprecate anything . The interfaces are in fact not the same. The Granite Asset interface is a subset of the DAM Asset interface.
Without getting into too many details, the reason there are two interfaces is that Granite is a shared platform between different Adobe products and services and those products/services need to (or want to) have a common base definition of what an "asset" is. For a variety of reasons, the existing DAM Asset interface is too broad for this level of interoperability.
In applications built on top of CQ/AEM, you are safe to use either interface. My guess is that you are going to be more likely to use the DAM Asset interface as it provides (easy) access to the asset metadata as well as provides the concept of an "original" rendition. NOTE - both of these are accessible through the Granite Asset interface, the DAM Asset interface is just a bit cleaner for these operations.
HTH,
Justin
Views
Replies
Total Likes
http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/dam/api/Asset.html might be deprecated in future.
Yogesh
Views
Replies
Total Likes
"... might be deprecated in the future"
Not to be difficult, but couldn't you say that about any class, in any api, anywhere?
I guess what I'm getting at is why add the new class that accomplishes the same thing, but not mark the old one deprected? Is this simply an oversight where Adobe engineering forgot to mark it deprecated? Or are there specific use cases twhere the old day Asset classes is better to use?
Views
Replies
Total Likes
Sean Steimer wrote...
"... might be deprecated in the future"
Not to be difficult, but couldn't you say that about any class, in any api, anywhere?
Excellent point!
I guess what I'm getting at is why add the new class that accomplishes the same thing, but not mark the old one deprected? Is this simply an oversight where Adobe engineering forgot to mark it deprecated? Or are there specific use cases twhere the old day Asset classes is better to use?
No one forgot to deprecate anything . The interfaces are in fact not the same. The Granite Asset interface is a subset of the DAM Asset interface.
Without getting into too many details, the reason there are two interfaces is that Granite is a shared platform between different Adobe products and services and those products/services need to (or want to) have a common base definition of what an "asset" is. For a variety of reasons, the existing DAM Asset interface is too broad for this level of interoperability.
In applications built on top of CQ/AEM, you are safe to use either interface. My guess is that you are going to be more likely to use the DAM Asset interface as it provides (easy) access to the asset metadata as well as provides the concept of an "original" rendition. NOTE - both of these are accessible through the Granite Asset interface, the DAM Asset interface is just a bit cleaner for these operations.
HTH,
Justin
Views
Replies
Total Likes
Views
Likes
Replies