Wednesday, April 29, 2009

Project Codename: DRFM

So while I'm currently without a place of employment I've been working on a few "projects" to help keep my technical skills sharp. Warning, this post contains a lot of "Technical" stuff. Be warned the following content may not be suitable for non-developers.

Project Codename: DRFM - Dynamic Runtime Form Manufactoring

I've been working on this .Net development project for a few weeks now. The goal: To create an application that can build rich user interfaces dynamically at runtime. For those of you who don't speak techie, what I'm trying to do is to develop an application that by itself is just a blank window, but with the help of an XML config file will be whatever the user wants.

The intent of this is to allow me to quickly develop applications for customers that use a base application and are then simply configured to look and perform as the end user dictates. Sounds spiffy right?

Right now I'm at a very interesting point in the application development. As of this moment, I am taking Microsoft's controls and wrapping them in my own code to form an UI element that contains XML data from the config file. This way a generic event handler can pickup the event and read the config information from the element sending the event and can execute the appropriate method. This means I can do a lot of really cool stuff with these elements, but it requires me to wrap each of the elements before I can use them. Which is a lot of work.

The idea I'm toying with is to "reflect" the actual MS object, get it's type and then try to match parameters from the config file to the button. This would mean a lot less code changes to the framework of the app, and allow users to use whatever control they would like, not just the controls I've setup for them. The down side is that it's a PITA as far as event handlers go.

The other thing that concerns me is that with all the options available by reflecting the MS controls is that the config file may become complicated and very unwieldy, thus it would just be simpler to write a custom application rather than try to build a config.

A little bit about the app, it's .NET 3.5 using WPF for it's sheer good looks. I'm writing it in C# and hopefully will be marketing it locally in the Boise area to some small businesses for some extra income (hopefully someday). I'm hoping that at somepoint that MEF (Managed Extensibility Framework) www.codeplex.com/MEF will become a part of this application, but I'm hoping that the MEF source will stop changing as much before that time comes.

If and when i finish this project, I may move on to building an XML config creation applicaiton where end-users can drag/drop form elements to build their own UI or rearrange an existing one.