The reason for 1 would be that sometimes the documentTypes in Umbraco serve as data collections rather than content (for example - list of countries). These items don't need to be published, but we would consume them in the razor views, and converting them to pocos would be much more friendly solution.
The reason for 2 would be that sometimes we would want to create content programmatically based on a form submitted by the user. For example blogs / comments etc. It would be much easier to have a ViewModel and then convert it to IContent (not published content as it will most likely need to be moderated)
I don't have any plans for Ditto to support IContent. From my understanding there are fundamental differences from using (read-only) IPublishedContent.
I can see the benefits of being able to map to/from IContent, but it is not something I personally have a need for.
Benjamin Howarth also asked me about this recently, which I think he started to look at adding support for in the nuMapper project.
Mapping IContent and reverse mapping
Hi there,
Thank you for creating this package :-)
Are you by any chance planning to:
The reason for 1 would be that sometimes the documentTypes in Umbraco serve as data collections rather than content (for example - list of countries). These items don't need to be published, but we would consume them in the razor views, and converting them to pocos would be much more friendly solution.
The reason for 2 would be that sometimes we would want to create content programmatically based on a form submitted by the user. For example blogs / comments etc. It would be much easier to have a ViewModel and then convert it to IContent (not published content as it will most likely need to be moderated)
Thanks!
Hi dig_nz,
I don't have any plans for Ditto to support
IContent
. From my understanding there are fundamental differences from using (read-only)IPublishedContent
.I can see the benefits of being able to map to/from
IContent
, but it is not something I personally have a need for.Benjamin Howarth also asked me about this recently, which I think he started to look at adding support for in the nuMapper project.
I've pinged Benjamin via Twitter... to see if he wants to input on this thread.
Cheers,
- Lee
This topic also has a lot more info: http://our.umbraco.org/forum/developers/api-questions/46631-Getting-Umbraco-Content-IPublishedContent-vs-IContent-vs-Node-vs-Document
Jeroen
is working on a reply...