Search This Blog
Tuesday, December 22, 2015
MediaDataObject - Declaring images as object references instead of byte array
In v15.2 we have introduced the new MediaDataObject business class. The use of this type mainly reduces traffic in Web apps because images are cached in the browser cache (compared to images declared as byte[]).
We have invented this solution when optimizing the new Web style performance on mobile devices.
We have invented this solution when optimizing the new Web style performance on mobile devices.
For instance, in our XCRM demo application (installed to C:\Users\Public\Documents\DevExpress Demos 15.2\Components\eXpressApp Framework\XCRM\, by default) the avatar picture in the top right corner is implemented using MediaDataObject:
Both WinForms and ASP.NET Image Property Editors are used automatically for properties of the MediaDataObject type, the delayed loading is also always enabled - no special attributes are required for this. However, you still can apply the ImageEditorAttribute to customize the editor's options.
XPO and EntityFramework versions of this type are available in the Business Class Library. Refer to the eXpressApp Framework > Concepts > Business Model Design > Data Types Supported by built-in Editors > BLOB Image Properties article to see example property declarations for your favorite ORM.
XPO and EntityFramework versions of this type are available in the Business Class Library. Refer to the eXpressApp Framework > Concepts > Business Model Design > Data Types Supported by built-in Editors > BLOB Image Properties article to see example property declarations for your favorite ORM.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment