Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7833461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T12:43:11+00:00 2026-06-02T12:43:11+00:00

For example, say that I’m writing an application that allows users to design their

  • 0

For example, say that I’m writing an application that allows users to design their own business card, allowing them to add visual objects to the “template” that they are currently designing, each of these objects are bound to various bits of user-data.

eg. They drag an “Address Box” that automatically puts in the address of the user, then a “Name Text” which again, automatically uses the users defined Name.

The reason for this is that a customer may create 15 templates all with their own “look”, however if they want to change their address, they only need to modify it in one place.

All of these visual objects and the template itself, are written in XAML. I need to store these user-created templates into the database so that they can retrieve them and edit them later. The way I see it, I have two options:

  1. Store the entire template as XAML in a database table called “templates” along with an ID and an OwnerID.

  2. Create a table for an abstract type of “visual object”. Create a table for each concrete type of visual object (ie. “AddressBox”) which would inherit from the abstract type and have fields for each of the user-configurable properties (font size, x/y coords, etc). Finally, create a table called template, which holds a collection of visual objects.

It should be noted that I’ve been using the Entity Framework to design this, so apologies if I’ve thrown some EF keywords in there!

Personally, for the time being XAML storage may well be enough to satisfy our requirements, however everything I’ve seen seems to suggest it’s a really bad way to store data in a database.. ie. Skip to 35mins in this: http://youtu.be/uFLRc6y_O3s isn’t this exactly what he’s suggesting not to do?

With XAML storage I gain property value inheritance, which could potentially make things slightly easier, although I’m not sure if the users will understand how values might “flow” down the chain. Obviously XAML also allows me to store any property value I like; I don’t have to add it to the database first.

The downsides are that I think it could be a lot harder to manage the data if it’s all XAML; worst case potentially having to retrieve every piece of XAML, parse all of them, find a value I need to change / look at, re-parse, save the updated “blob” of XAML back. This will obviously result in much larger read/write operations.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T12:43:12+00:00Added an answer on June 2, 2026 at 12:43 pm

    I’d go for storing the XAML directly. Reason is that the only advantage that you get from storing an abstract layout, is that you could replace the UI framework, and you guard yourself from a potential breaking change in XAML.
    But as a breaking change introduced by Microsoft would break all controls out there, so there will be some upgrade possiblity that you quite likely can utilize as well.

    For me option 2 is for sure the nicer version, but I tend to be a “YAGNI”-guy. So develop stuff when you need it, and if you are on WPF go for it.

    hth,
    Martin

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As a hypothetical example, let's say that I wanted to make an application that
To use as an example: lets say that I have 2 EditText s and
Here is my scenario. For the example lets say that I need to return
For Example: Let's say that I want to return a view that displays a
Say that I require a querystring; for example itemid. If that querystring is for
For example, Lets say that I have a gridview column which has important controls,
My simplified and contrived example is the following:- Lets say that I want to
For example lets say I have a JSON object that contains states and cities.
Say for example you had a shell script that utilises inotifywait in the following
Say for example you're getting a web app project that interacts with a database.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.