Because Spring will create most of your objects up front, a simple error in the configuration Xml can have disastrous effects. This, in my opinion, is the #1 reason people fear Spring.
Here are a few error messages I’ve seen, and their corresponding solutions:
The virtual path ‘/currentcontext.dummy’ maps to another application, which is not allowed: This error message usually means you’ve deployed the application to a server, but forgotten to make the virtual directory an application in IIS.
This post is part of a series on Spring.NET. I recommend starting at the beginning if you haven’t already. Also, I am walking through code in the accompanying GitHub project.
By now, you should have the basics of DI, IoC, and the benefits and drawbacks of the approach. Now, I’ll introduce you to the architecture of Spring.NET in an ASP.NET environment. I’m sure a lot of other IoC frameworks operate in a similar manner.
Move all the CS BS to the side. This stuff doesn’t work in the real world. And it’s because of things that could have (and probably should have) been fixed by uber-geeks 10+ years ago with fancy CompSci PhDs. And I’m talking about .Net specifically here, although I can throw the same stones at Java. Most (but not all) other languages have the same problems I’ll get on my soapbox about here.
This post is part of a series on Spring.NET. I recommend starting at the beginning if you haven’t already. Also, I am walking through code in the accompanying GitHub project.
Last time, I walked through why we might want to use dependency integration. Outside the authentication example, here are a few other examples:
Authentication Authorization SMTP settings Payment gateways Business rules (rule engine style) Branding This time, I’d like to explore how an IoC container actually does its job.
Last time, I introduced you to Spring, IoC, and Dependency Injection. If you haven’t read that post, please do. This time, I’ll start walking through some of the code in the accompanying GitHub project. The code is organized by project in order of these posts. Some conventions (specifically 1 class/file) have been ignored specifically to let the reader go through in a linear manner. All projects are setup as console applications.
I get quite a few questions about Spring.Net, so I thought I’d put together a VS Solution, presentation, and set of blog posts to provide some background and details about what it is, why/when to consider using it, and how to configure and debug the framework.
A lot of this material will not be specific to Spring.Net, but rather Dependency Injection generally. To understand Spring.Net, you must be familiar with Inversion of Control and Dependency Injection.