Frameworks contain pre-written JAVA code that can be used by callings its methods, inheriting from its classes, creating instances of its classes etc. Frameworks are also referred to as “bodied of code”.
Frameworks tend to dictate the structure and architecture of the code and applications that make use of them.
The motivation of using frameworks it to promote reusability of logic, as well as centralized architecture control. Frameworks can also contribute to improved structuring and reduced complexity.
JAVA frameworks are language specific, i.e. specific to the JAVA programming language.
It is important to understand the relationship between a JAVA framework, a JAVA library, and a JAVA API:
- A JAVA library is a collection of precompiled routines and resources (e.g. classes, templates, configuration files).
- A JAVA API (application programming interface) gives access to the functionality supported and provided by the framework.
- A JAVA framework includes libraries (if meaningful) and APIs and can make use of the libraries it comprises.