Reputation: 2547
What i want is to describe a form (fields with types, names, validation rules) via some xml or dsl. Then, in the runtime my code feeds this tool with metadata, it generates form (web, win forms, whatever), it's shown to a user, user inputs data, pushes OK, tool calls my code via some delegate with values as key-value dictionary. Of course, I can write such a thing by myself, but maybe I don't need to?
Upvotes: 4
Views: 213
Reputation: 15907
You might want to take a look at NakedObjects. That works the right way: from code to data, not the other way around. Otherwise you will not be able to adequately model behavior. For other platforms (Bamboo, java, Smalltalk) there are other implementations.
Upvotes: 2
Reputation: 6713
Ironspeed does what you're after. I've heard of some having poor experiences with it, however.
Upvotes: 0
Reputation: 364329
I know only one tool from MS world which is close to your requirements - MS InfoPath. My experience is that everything including custom development is better than InfoPath.
Upvotes: 0
Reputation: 109080
If you look at the code behind for WinForms, the controls are assembled and configured in code.
If you decompile (e.g. via Reflector) the assembly generated from web .aspx
or .ascx
in WebForms it is just code that outputs the HTML (lots of Response.Write
calls via an HtmlTextWriter
.
XAML is just a way to define an object graph.
It is all just code.
There is no reason you can't:
Upvotes: 1
Reputation: 4108
Dynamic Data will do it from an model eg Linq to SQL or EntityFramework, but not xml. It drives from the data and uses templates.
Hope this helps.
Upvotes: 1