views:

157

answers:

2

I'm trying to get a grasp of using spring.net ioc to suit my purpose.

What options to using xml configuration (metadata file) are available in spring.net ioc. i.e. i don't want to use the following:

<object name="MyMovieFinder"
    type="Spring.Examples.MovieFinder.SimpleMovieFinder, 
    Spring.Examples.MovieFinder"/>
</object>

Instead, i want to load this values from a database like below:

   SqlCommand cmd = new SqlCommand("select ObjName, ObjType, ObjPath from tblApp", cn)
   SqlDataReader dr = cmd.ExecuteReader();

while(dr.read)
  IApplicationContext ctx = ContextRegistry.GetContext();
  MovieLister lister = (MovieLister) ctx.GetObject (dr["ObjName"]);
+1  A: 

If you want to store your object definitions in a database and use that to power your application you should look at the IResource interface, there's a chapter on it in the Spring.NET documentation here.

BennyM
A: 

@BennyM

Thanks for the insight. I think the IResource interface comes in very handy and obviates a need to load object definitions separately from DB.

My original goal is to create a robust dynamic website. I was planning on developing a framework that would utilize loosely coupled components\controls to generate contents for the pages.

To avoid reinventing the wheel, I have been looking to find a robust .net appl development framework (or CMS if you may). So far, I've only looked at DotNetNuke, but i'm unconvinced that it is robust enough to produce highly dynamic pages (having multiple widgets on a single page i.e video players, search tools etc).

Do you know of any framework out there that you can recommend.

Thanks

Fash1
I don't spend a lot of time in web development. DotNetNuke is a big player I think and if you still want to use Spring.NET I think the two can be integrated (check the Spring.NET forum). The only other system I've worked with is Cuyahoga http://www.cuyahoga-project.org/
BennyM