Anyone can write a Framework

· FrameworksFramework Development

"Anyone can play guitar", says Radiohead, and go further by (almost) saying that just playing a guitar doesn't make you Jim Morrison. Writing a framework is more than just having a good idea, just like playing well on a guitar is not enough to become the next Jim Morrison: The framework has to be unique. I guess there's an exception to that rule, which is when you write a framework for personal or corporate-internal use. A framework, not being unique in any way, will eventually fail because of lack of interest. When people aren't interested in your framework, when no-one is using it, the writer of the framework (usually You) loses motivation to continue maintaining it and eventually drops it. Since no-one used it in the first place, no-one takes over the code and the framework "dies". So how do you determine if the framework you write is unique? I could name a few that pop to my head:
  • Something completely new
  • Integration of components
  • Substantial ease of use

Something completely new

I am one of the more sceptic people you would find about writing completely new things, but since someone had to write the first framework of anything, then you still have a chance. For example, want to write a framework that provide transparent data storage for your data classes? Sure, Hibername and Cayenne have done that first, but someone had to be the first to write them, right? If you have a new idea, and can't find anyone else doing it yet (see later about that), then go for it! The world needs people like you.

Substantial ease of use

Sometimes, a framework is provided and is heavily cumbersome. You find yourself writing the same code, knowing that others have written that code before you, to use the provided framework, and you just know how to write something generic enough for everyone to use. This can be done by writing a sort of a toolkit which:
  • Provides a set of implemented classes for known interfaces
  • Provides utility classes which call different parts of the underlying framework at a specific, well-known sequence
  • Provides code generators that work externally to the framework to supply its demands
. This kind of toolkit is extremely important for developers wanting to use a framework but just can't bear the overhead, repetitive code.

Integration of components

Integration components can be seen as ease of use in most cases, but they also provide another aspect not provided by simple toolkits: They use abilities from two or more given frameworks to create a higher abstraction layer for a programmer to use.

Finding out the uniqueness of your framework

The most important thing to remember is that even though the world of open source and open standards opened a gate way to variety in frameworks, it does not mean that programmers like to swim in an endless sea of choices. Check beforehand if what you try to do already exists. If it does, at some level, see if you have anything to contribute to the existing framework. Checking is simple, and you should use the tools you would use daily. Mainly, Google for the keywords you'd assume your framework would handle. Search Slashdot for articles about it and Sourceforge and Freshmeat for existing projects. Frameworks can sometimes "hide" inside bigger frameworks, or in other open source projects host such as JavaForge or CodeHaus. Sometimes there are less known projects mentioned in people's blogs, so it's good to search and read a few posts about your idea too. Be involved in some forums, and ask questions about the existence of such framework. This might seem like a lot of work, but a good research before starting a project might save you time making a framework no-one uses, save you the disappointment when it happens, and might prepare you better to when people start inquiring about your framework and ask you to compare it to existing ones (and they will, trust me - They will). Later I will post more about writing your own framework, such as how to get it known and how to get motivation writing it.

Comments (1)

ТаРаРаМ » Anyone can write a Framework at Chaotic Java
[...] Anyone can write a Framework at Chaotic Java [...]