For example, let's say that I am writing an application that allows users to create their own business card, allowing them to add visual objects to the “template” that they are currently developing, each of these objects is associated with different bits of user data.
eg. They drag the "address box", which is automatically placed in the user's address, and then the "text name", which again automatically uses the name specified by users.
The reason for this is that the client can create 15 templates with his own “look”, however, if they want to change their address, they only need to change it in one place.
All these visual objects and the template itself are written in XAML. I need to save these user-created templates to a database so that they can restore them and subsequently edit them. As I see it, I have two options:
Save the entire template as XAML in a database table called "templates" along with the identifier and owner identifier.
Create a table for the abstract type of "visual object". Create a table for each specific type of visual object (that is, an "AddressBox") that inherits from an abstract type and has fields for each of the user-configured properties (font size, x / y coordinates, etc.). Finally, create a table called template that contains a set of visual objects.
, Entity Framework , , EF!
, XAML , , , , , , . 35 : http://youtu.be/uFLRc6y_O3s , ?
XAML , , , , "" . , XAML , ; .
, , , XAML; , , XAML, , , /, , "blob" XAML . , , /.