Geeks With Blogs
Evil Dev's Blog Plots, Schemes, and Plans to take over the Devleoper world.... Mu hahahaha

I recently decieded to start merging some of my code that I use in a lot of my little projects into a centralized framework, and provide a consistant API for them. (As well as give me a reason to experiment with Visual Studio 2010 ^^).

So today, I released a pre-alpha version of the "Mitch.Web" framework, currently only semi-complete API is the ILogger framework, inspired by Uwe Schmitz demo presentation (with a few design/enhancements I felt were necessary).

API is similar to Uwe's, with a couple of key exceptions, instead of using Unity to auto construct the configured logger, I built a .NET Config Section/Handler for the configuration, and exposed it in a Global Module called "App". The advantage of this approach, is my configuration settings are a bit more flexible, and allow multiple loggers to be used at any given time, as well as referencing a specific logger by a key specified in the config file.

Configuration is highly dynamic, allowing you to specifiy parameters for your constructor, as well as providing parameters for parameters etc recursively instatiating all dependcies.

It does use reflection for instatiation, but currently it caches the final logger collection in memory, so it only instatates once. I plan to improve on this in the future for longer running process like services and web applications, in which I will throw it into a cache with a dependency on the config file the collection was instatiated from, so that if the configuration changes it will refresh the logger collection on the fly.

There are a couple other gems in there that are kind of neat, I'm going to be enhancing this framework for some time yet, but if you want to check it out now, in early development and provide feedback it would be most useful, especially this early in the life cycle. Not much documentation yet I'm afraid, but I promise before I release the full release, all libaries and API's will be fully documented.

So if your interested, it's up on CodePlex here: http://mitchweb.codeplex.com/

Couple of things to note:
- You need to download Visual Studio 2010 Beta 2 in order to open the source
- Written in C#, although maybe someday I'll create a VB version as well.
- Released under an MIT License.

Enjoy!

Posted on Saturday, November 14, 2009 12:26 PM .NET Development | Back to top


Comments on this post: Mitch.Web Framework on CodePlex

# re: Mitch.Web Framework on CodePlex
Requesting Gravatar...
Could you make the address above into a hyperlink (target="_blank")?

I read through the framework and it looks great. I could see how you were getting all the Log Config settings from the local web.config in App.cs. Would it be better to store those settings in a separate XML/Config file?
Left by Gustavo Keener on Nov 15, 2009 9:53 AM

# re: Mitch.Web Framework on CodePlex
Requesting Gravatar...
Hey Gustavo,

Thanks for the feedback :)

I'll update the hyperlink in a minute, I kinda rush posted the above.

As far as the external config question, a little known fact about the .NET configuration is that you can do that by default witha configSource attribute, but I don't have an example to post just yet, I'll write an article in detail about that.

However, the just is you move the "<LoggerSettingsSection>" stuff into a file with a ".config" extension wherever you want it, and then in the web/app.config file, simply add your usually "<configSections>" entry for it, and when you add the "<loggerSettingSection>" stuff, instead of adding the rest of the configuration, add a "configSource='PATH TO Logger.config file'", and it will work just like that.
Left by Mitchell Lee on Nov 16, 2009 1:14 PM

Your comment:
 (will show your gravatar)


Copyright © Mitchell Lee | Powered by: GeeksWithBlogs.net