Can I create new "database table", "table object class", "silverlight UI" at runtime?

Topics: Prism v4 - Silverlight 4, Prism v4 - WPF 4
Dec 3, 2010 at 7:26 AM

Hi, All,

I have a requirement as following, please tell me whether Prism can do.

There is an UI designer for silverlight app, end user can use the desinger to create a new module in the runtime.

Process of the app:
1. The program will create a new table in database in the runtime.
2. The program will create a new Model class associating with the created table in the runtime.
3. Client will show the UI without refreshing the page and display UI controls(e.g. textbox, button) based on Model class's properties.

such as Model class
class User{
    public string Name{get; set;}
    public bool Adult{get; set;}

genereate UI (control name may be wrong, this is only a sample)
<TextBox Name="Name" ... />
<Radio Name="Adult" ... />


I found that WCF cannot do it since client cannot know newly generated object in the runtime.

  1. Create a new model class in runtime.
  2. Create a new services class in runtime.
  3. I don't find a way that client side can re-load WCF proxy without refrech the SL application in runtime (Is there a way?)
  4. Even if SL can re-load WCF proxy without refreshing the page, I cannot write the code like below.

NewModel c = WCFClient.CreateModule("new module name");

NewModel is dynamically created in the runtime, that is to say client doesn't have this object, so that cannot directly write in above way.

Does anybody have idea on how to implement it?  Thanks.

Dec 3, 2010 at 7:07 PM


 As your requirements involve aspects that are outside the scope of the guidance provided by Prism, you might find better support in other forums such as the following:

Additionally, you might find this documentation useful to fulfill your requirement:

  • ADO.NET Entity Framework (where you might find information on generating database table info from your objects)
  • Reflection (where you might find information on how to use reflection to create, invoke and access type instances at run time)

Aside from that, your scenario can still benefit from the guidance Prism provides for creating Composite applications. You can read more about the benefits of using Prism here.


Guido Leandro Maliandi

Dec 4, 2010 at 8:30 AM

Thanks.  Looks like the Prism doesn't fit for my requirement.

Dec 6, 2010 at 8:21 AM

Does anybody else have any idea?