"What has been will be again, what has been done will be done again; There is nothing new under the sun."

I started writing a little framework that takes an object grid and visualizes it using forms created on-the-fly.

What I have right now is that if you run the following code (note the Main method):

namespace DotNetZen.ObjectExperience.Tester
{
    [Style(typeof(DefaultStyle))]
    public class TestClass
    {
        private string m_SomeText = string.Empty;

        [Field]
        public string SomeText
        {
            get
            {
                return m_SomeText;
            }
            set
            {
                m_SomeText = value;
            }
        }

        [Field]
        [LiteralDescription("Some ReadOnly Field:")]
        public string SomeOtherText
        {
            get
            {
                return "w00t!";
            }
        }

        public string SomeOtherNonFieldText
        {
            get
            {
                return "w00t!";
            }
        }

        [STAThread]
        static void Main()
        {
            TestClass tc = new TestClass();

            Application.Run(DotNetZen.ObjectExperience.ObjectViewer.Experience(tc));
        }
    }
}

You will get a form that looks like this (the fields are bound to the properties):

I showed it to Avner, who gave me the quote in the title and showed me the Naked Objects site. It’s quite impressive and is exactly what I thought of (sans the whole part about persisting the data; I was planning on the use of a good O/R mapper for that).

Still, I’m gonna go on playing with this, as I add new style choices, use less reflection, add i18n, etc.
I wonder what could come out of this. :)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s