in

Emerald Hand

Emerald Hand, Inc. community home page.

This Blog

  • Home
  • Contact
  • About
  • Directory of Computers/Tech Blogs

Syndication

News

I'm back to blogging

Worm in liquid maze

Design and development of information management tools.

Inversion of Control features

I was reading Castle IoC reference manual and realized something that I have not thought of before. By using IoC facilities it’s really easy to implement certain patterns, especially since Castle is really designed to be extensible. In reality, some of the patterns are already implemented and supported. For example by default all components in the IoC container are of the singleton lifestyle. The beauty of the framework is that it’s really easy to change the lifestyle of the object to, for example, transient (new component per request), without having to change the class code. Since components are singletons by default, reusability of the objects is encouraged. This should save some memory and execution time.

Another cool feature of the Castle is that it’s really simple to configure components. In the past, I might have had to either write my own class to extract configuration from the .config file or use some configuration framework, like Nini. Now my components will automatically initialize with the supplied configuration. I might still have to use Nini when a complex configuration will be required and application will need to save it (save user options for example). But the whole config deal is going to be really simplified.

Share this post: Email it! | bookmark it! | digg it! | reddit!
Readability Stats: Word Count: 211; Sentence Count: 13; Grade Level: 10.3, more info...
Published Jul 10 2005, 10:07 PM by Ornus
Filed under:

Comments

No Comments

Leave a Comment

(required)  
(optional)
(required)  
Add

About Ornus

Lead Sider and Xelog developer. I'm interested in information and how we can better manage it using computers. I'm also into design and understanding how to creating cool, useful, simple things.
Copyright © 2006-2007 EmeraldHand, Inc. All rights reserved.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems