MVVM generate datatempalte and View Model type

A

Andy O'Neill

This is a second architect/design question about my rather weird generic
project.
This has to handle validation rules and data externally described.

It's a games orientated piece of software intended the user to build an
"army".
It has to work for any set of game rules
To avoid Intellectual Property issues, key aspects must be externally
declared - human readable and un-compiled.
Any given game will have a list of stuff you can pick from to make your
army.
Call them units.
The unit type will have different properties depending on the game selected.

So I need to present a list to pick from and a list of picked units.
External files will be loaded at run time to define details of the
interface.
The user will first choose which rules he's going to be using.
This will define which external xaml to load for substantial parts of the
main screen.
So I could havea fixed datatemplate loaded there, no problem.

Then I started thinking about MVVM and I need some sort of class or type
there for the unit.
I can maybe have an xsd or something and use that to generate my type.

As I thought more about this I started wondering whether it's even a good
idea to use MVVM.
Maybe this is a problem others have seen and there's some sort of pattern
around, I thought.
It's well hidden if people have been blogging though..
MVVM is fairly new and of course usually businesses have just the one set of
business rules.
I'd like to use MVVM..
I want a working product first and foremost, it's not some academic
exercise.

Any ideas?
 
A

Andy O'Neill

In WPF, xaml 2009 you can declare a type in xaml.
This looks fairly promising in that I can then rely on that type in a
view-model layer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top