Master of Datatypes, Umbraco Be Festival
-
Upload
tim-geyssens -
Category
Technology
-
view
19.233 -
download
1
description
Transcript of Master of Datatypes, Umbraco Be Festival
Master of
Datatypes
Master ofDatatypes• Tim Geyssens
• Live in Belgium work for Umbraco• Core Work• Umbraco.tv episodes• Training• Support• Blog at Nibble.be
Master ofDatatypes
Datatypes ?
Master ofDatatypes
• Extendable (create your own)• More diffucult things to extend
Datatypes
Master ofDatatypes
• Session goal• Rich & Configurable• Take advantage of the tools = easy
Datatypes
Master ofDatatypes
• UsercontrolWrapper• Data Editor Settings• Xml Serialization• Razor
Tools
Master ofDatatypes
• These tools make it really, really easy• (so might be a short session)• Altough I’ll be creating 3 datatypes
Warning
Master ofDatatypes
UserControlWrapper
Master ofDatatypes
• Any Usercontrol as datatype• Implement interface• IUsercontrolDataEditor• Single Member• Property Value (type object)
UC Wrapper
Master ofDatatypes
Datatype #1
Master ofDatatypes
Data Editor Settings
Master ofDatatypes
• Add settings to your datatype• More flexibility, reuse options• Super Easy• Mark public properties with data editor
settings attribute
Data Editor Settings
Master ofDatatypes
Datatype #2
Master ofDatatypes
• Not limited to textbox• 21 types out of the box• Extend with your own types
Data Editor Settings
Master ofDatatypes
XML Serialization
Master ofDatatypes
• Store rich data (not a single value)• Xml properties (related links)• UC Wrapper return xml string• Custom to xml code or• Serialize your object
XML Serialization
Master ofDatatypes
• Not familiar with serialization• 2 Helper Methods• SerializationHelper– ValueToXmlString(object value)– ValueFromXmlString(object value, Type type)
XML Serialization
Master ofDatatypes
Datatype #3
Master ofDatatypes
Razor
Master ofDatatypes
• Outputting our XML Property• Easy with razor• .notation• Note that the root node is removed
Razor
Master ofDatatypes
Questions ?
Master of
Datatypes