What is a framework? (programming)
Page is part of Articles in which you can submit an article
written by owen on 2012-Feb-05.
The seems to be a growing trend to re-define certain things in programming and computer science to fit whatever newfangled meme that comes up. This article seeks to solidify what I mean when I use the work framework in a programming and software design context.
Wikipedia provides a clear definition (as usual);
In computer programming, a software framework is an abstraction in which software providing generic functionality can be selectively changed by user code, thus providing application specific software. It is a collection of software libraries providing a defined application programming interface (API). - Wikipedia
Almost everything involving programming nowadays involves some kind of framework or better yet an application framework - it is an unavoidable fact of todays high level programming needs and the added benefit of the control provided by having a fixed set of rules or a sandbox.
Operating Systems vs Application Frameworks
The Android operating system for example provides a application framework which must be used in order to interact with the hardware and other features of the operating system. This separation allows the makers of the operating system to have better control over the programs that are written on the platform and hense provides a measure of stability to the platform. It is easy to identify the framework by looking at the software stack and its design. The Windows phone 7 application stack is similar but is even further abstracted from the hardware. Abstraction has its drawbacks which I have already discussed.
So basically anything that has a API (that you are forced to use) is a framework, it is an unavoidable evil. The further away from the kernel you are programming the deeper the rabbit hole goes. Some frameworks even require you to use a whole new custom language in order to interface with the API. I can even go as far to say that every program you write is a framework for the user who uses it - its what programmers do - we build layers.
Frameworks are often synonymous with certain keywords; for example Eclipse, Java and Refactoring. Once any of these things are mentioned there is is a 99% chance they they are mentioned in relation to a framework because these technologies eat their own dog food. Having a consistent framework allows tools like Eclipse to do their auto-magic refactoring without many side effects - its a cause and effect situation.
Conclusion
So basically a framework is a application layer - it is not a library, design pattern or paradigm (though it could be, if its restricted to a small set of features). It is a specific abstraction layer. Some frameworks are deeper than others. Some frameworks API are only accessible by privileged root applications provided by the makers of the API while others are secret. As the generations progress there will be a increased push towards managed code to solve many problems such as viruses and memory leaks. Some frameworks for example in video games, real-time systems and graphics often require a minimal abstraction and will however continue to operate using a low level framework or even assembly.
permanent link. Find similar posts in Articles.
comments
This is a really great blog. Keep up the good work. Also liked the other post about frameworks
by lroal 2012-Feb-06
to rass man. the last thing i would expect to see is a jamaican talking about computer science and programming
by bunyonb 2012-Mar-01