views:

130

answers:

3

I'd greatly appreciate your advice on a strange specification.

We have a requirement to create an application where users can drag/drop field types onto a form so that they can create their own "app". I have the front-end setup, but the back-end is a big problem.

There are forward mapping ORMs and reverse mapping ORMs, yet I've not found one that can embed within the application and generate the tables, relationship, etc. when the user starts up the app. Of course, if a table, field or other entity already exists, it would not overwrite them (and overwrite the underlying data).

ActiveRecord is the closest I've found, but it is web based and does not extend to a WinForm environment. I would SO prefer not have our crew write our own DAL, debug it, etc. when there might be an ORM out there that can do this.

Does anyone know of an ORM that can do this? If not, how would you go about solving this nightmare in the making?

Thank you so much for your help.

A: 

Although you can think of a solution for this problem built with ORM, I do not think this is a good idea: these tools are designed to solve another class of problems. The only way is to build the application yourself.

bbmud
A: 

That's an unfortunate app-- if your users wanted to do that, they'd just buy Visual Studio!

This isn't a good position to be in, because no, I'm not aware of any suitable way to do this with an ORM. Sadly, if you're looking for this because of schedule pressure, your project may be in trouble.

Greg D
A: 

In theory you can use any ORM, that can automatically generate database schema. For example see DataObjects.Net, it typically generates and upgrades database schema using persistent model, based on persistent classes and additional custom definitions. But I can hardly imagine how your whole application will work in this case... there are so many potential issues.

Alex Kofman