Wednesday, February 18, 2009

Framework dilemma

I had written generic framework for performing group, addition and sorting operations in code on fields of record set. One of my colleague was working on task where in this framework could be reused. After going through on how to use it, he mumbled "how complex". Err. I was bit surprised , as tried my best to keep it simple and neat.

Consumers perspective might be totally different than developers perspective in most of the cases.


  • He/She do not have clear understanding of efforts that will require in using straight forward approach rather than using any framework and possibility of that code getting repeated.
  • Framework cannot be made more simpler and cleaner: Kick your ass, Some things can only be done in dirty ways !
  • Crucial - It was developed in a limited time frame. Its very important to realize that the tool(not a GOD) is not going to fix each and every worlds problem, but it is extremely handy in instrumenting its intended functionality, was developed in a limited timely frame.
  • No love for frameworks: Often developers hate to use/consume code written by co-workers/buddies. Even if you follow general organization coding standards, practices, there are differences in the way people code and meant it.
I would prefer using library/code/function if I am able to derive significant value for doing so on following basis,

1. A1 = (T1 - T2) / ( T1 + T2)
T1 = Time required for task without framework/library/third party code
T2 = Time required for task with framework/library/third party code

2. A2 = F1 / F2
F1 = Features consumed for task
F2 = Total features provided by library

3. A3 = All additional overheads in terms of memory,CPU consumption, rework required if any. It should be weighted between 0 - 1.0, totally depends how much critical these factors are for the application.

V(%) = A1 + A2 - A3 * 100
V = Final value of Framework/library/code for consumer


If V > 30%, go ahead use it.

No comments: