Monday, September 22, 2008

LinFu IoC 2.0 Reaches an Important Milestone

Making the Grade

After nearly two months of hard work, I am pleased to announce the impending release of LinFu.IoC v2.0! Today marks an amazing milestone in the development of LinFu's new IoC container because as of the latest build (revision 258), LinFu is the first IoC container framework to pass ALL tests in both the "MustHave" and the "ShouldHave" categories in the latest comparison between the following IoC Frameworks:

  • AutoFac
  • Castle
  • LinFu
  • Ninject
  • StructureMap
  • Spring.NET
  • Unity
The feature lists might vary among these IoC frameworks, but Andrey's blog post does a great job of listing some of the features that an Inversion of Control container "must" have, in addition to the features that it "should" have", and I am proud to say that LinFu is the first IoC container to successfully implement every feature described in that blog post!

What this means is that LinFu.IoC (formerly Simple.IoC) has gone from an undocumented and untested inversion of control container to a fully documented, heavily tested, feature-laden container that is capable of performing all of the tasks that one would expect from a commercial-grade inversion of control container.

In addition to the keeping the code as clean and as compact as possible, I spent countless hours ensuring that every single method, class, interface, property and enum is fully documented, regardless of whether or not that item was marked as public, internal, or private. I love my code and I love what I do, and I hope that shows in the code that I write.

The best part about all this is that LinFu's IoC container framework weighs in at only 94KB, making it the smallest IoC framework among its brethen, with the Autofac container falling at a close 110KB.

Within the next few weeks, I'll be publishing an article on CodeProject that details all the features that you can expect from LinFu.IoC 2.0, and I will time the release so that it coincides with the actual CodeProject article itself.

Meanwhile, stay tuned!

EDIT: I realize that this post is quite scant on details so if you want to dive straight into the LinFu.IoC source, you can just go here. If you want to take a look at the IoC framework comparison project, click here. The code practically speaks for itself. Enjoy!

12 comments:

  1. This is such a great news, I have only give a quick review to LinFu by reading the codeproject articles but I have never write any line of code with it, maybe this is the time to start with :)

    ReplyDelete
  2. Can I proxy a class with Linfu?
    The class to be proxied does not implement any interfaces.

    ReplyDelete
  3. Yes, you can. :) LinFu.Proxy can intercept any class provided that all of its methods are virtual. It makes no distinction between intercepting classes and interfaces because the process for intercepting both interfaces and classes is one and the same.

    ReplyDelete
  4. How is it possible to intercept calls to non-virtual properties?

    ReplyDelete
  5. You can intercept non-virtual properties by using LinFu.AOP.

    Here's the link:

    http://www.codeproject.com/KB/cs/LinFuPart6.aspx

    Enjoy!

    ReplyDelete
  6. I have used Linfu design by contracts. I need contracts on non-virtual members too, which could be enabled by Linfu AOP. Is it a good practice here to mix contracts dynamic proxy with AOP?

    ReplyDelete
  7. Mixing contracts with AOP is possible, and I honestly haven't gotten around to experimenting the possibilities of using the two techniques together into one application.

    It *can* be a good practice if you know exactly where you need to place the contracts at runtime. LinFu.AOP, however, allows you to inject code into any method, and for the most part, tracking the contract locations will still be up to you.

    In other words, LinFu.AOP can do all the crosscutting, but make sure you don't put so many contracts around that you end up cutting yourself in the process :)

    ReplyDelete
  8. Thank you so much for a great article, could you post the source code?

    Thank you :)

    ReplyDelete
  9. Hi Christian,

    You can get the latest version of LinFu from this link:

    http://code.google.com/p/linfu/source/checkout

    Enjoy!

    ReplyDelete
  10. Funq (http://funq.me) weights 24k :P
    And it's the fastest :)

    ReplyDelete
  11. I am really intrigued by LinFu, but can't find much info on it.

    I have briefly noticed the several posts made on the CodeProject and wonder why there aren't more videos.

    If you want LinFu to gain popularity, I suggest:

    1) Make a series of videos from the very beginner (I.e. show how to load and setup LinFu step-by-step).
    2) Ensure there is a master list of videos (I.e. lesson1, lesson2, etc so people don't have to hunt them down).
    3) Try to get on video-related programs like DnrTV

    I want to try-out LinFU, but don't really want to read another book (I.e. go thru the CodeProject examples).

    Please, consider getting CamtasiaStudio and posting many videos and I suspect you will have many more users.

    ReplyDelete
  12. Hi Trevor,

    Those articles have plenty of examples on how to use LinFu, but if you don't want to read them, then I'm not sure if there's anything else that I can do for you (aside from possibly making those five minute videos).

    Trevor, I'll definitely take your suggestions into consideration, but please keep in mind that 1) It's not easy to get on DNRTV, 2) My articles already do a pretty good job of explaining how everything is put together with LinFu (assuming that people read them), and 3) I can really go out of my way to document everything in LinFu and make screencasts about it, but if the people who want to use LinFu don't take the time to learn it, then what's the point?

    With that being said, I think having LinFu screencasts would be an excellent idea. I'll look for a few sites that are willing to publish them (aside from CodeProject, of course), and you'll be the first to know once they're published. :)

    Regards,

    Philip Laureano

    ReplyDelete

Ratings by outbrain