Click here to Skip to main content
Licence LGPL3
First Posted 10 Nov 2011
Views 3,384
Bookmarked 0 times

The LinFu Reimplementation Plan, and Dogfooding

By | 10 Nov 2011 | Technical Blog
The LinFu re-implementation feature list.
A Technical Blog article. View original blog here.[^]
Before I hit the ground coding, let's go over some of the features that were in LinFu v1.0 that will also be in 2.0:
  1. Dynamic Proxies
  2. Late Binding / Multiple Dispatch
  3. Duck Typing
  4. Mixins
  5. Universal Event Handling
  6. Closures with Lambda Arguments
  7. Design By Contract
  8. AOP (static and dynamic weaving)
  9. Inversion of Control / Dependency Injection
  10. Adaptive Object Models
  11. A MyXaml Engine Clone
Aside from the fact that v1.0 has a fairly hefty feature list, one thing that I've noticed with the source is that despite those features, LinFu itself doesn't really use its own IoC or DbC facilities to improve the quality of its own code, and that's a wasted opportunity.

With that in mind, I've decided to implement the following features first:
  • Inversion of Control / Dependency Injection
  • Dynamic Proxies
  • Design by Contract
  • Static AOP Weaving
Building an IoC/DI container will help enforce a separation of concerns, and using Design by Contract in tandem with TDD will eliminate over 90% of the bugs in the code. The reason why I'm also implementing the static AOP weaving and dynamic proxy generator first is that there has to be a way to transparently inject those contracts into a service instance using a dynamic proxy without having to clutter the original source code. In addition, using the static AOP weaving in a debug build will allow me to dynamically inject diagnostic code without affecting the actual release build.

As for LinFu's Design by Contract v3.0, my goal is to make it injection-agnostic. That means that the library itself should be completely unaware of how it's actually being injected into a service instance. It will allow you to inject contracts using a 3rd-party dynamic proxy generator (such as Castle), and most importantly, it should make no distinction between LinFu's static AOP injection and its own proxy generator.

Probably the most striking difference that you'll see between v1 and v2 is that LinFu will no longer be split into multiple projects (aside from PostWeaver.exe, and the MSBuild task for LinFu.AOP). There might be some who might say that clumping all of LinFu into one DLL violates the principle of Separation of Concerns, but in practice, it will save you an untold amount of headaches when managing your project dependencies.

I realize that rebuilding LinFu is a very tall order, and I'm putting my heart and soul into this one to make sure that it's the best code that I'll ever write. This is going to take some time to redo, and I'll keep posting more and more updates on my blog as time progresses.

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)

About the Author

Philip Laureano

Software Developer (Senior)

United States United States

Member

Follow on Twitter Follow on Twitter


Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120517.1 | Last Updated 10 Nov 2011
Article Copyright 2011 by Philip Laureano
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid