Framework


1.Framework:
A Structural software that provides automation of common tasks of the domain as well as providing a built in architectural solution that can be easily inherited by applications implemented on the framework.
We say structural because structure is perhaps a larger goal of the framework than any specific functional requirement. A framework tries to make generalizations about the common tasks and work flow of a specific domain. The framework then attempts to provide a platform upon which applications of that specific domain can be more quickly built. The framework does this primarily in two ways. First, the framework tries to automate all the tedious tasks of the domain. Second, the framework tries to introduce an elegant architectural solution to the common workflow of the domain in question.

1.1 A framework automates common tasks

Don't re-invent the wheel. Any good framework will provide mechanisms for convenient and perhaps automatic solutions to the common tasks of the domain, saving the developers the effort of re-inventing the wheel. Reflecting back on our discussion of the common tasks of the web application domain, we can then infer that a web application framework will provide some sort of built in mechanisms for things like converting data from their HTTP string representation to Java data types, data validation, separation of business and data layer calls from web related work, internationalization, and presentation rendering. Good frameworks provide elegant, if not transparent, mechanisms for relieving the developer of these mundane tasks.

1.2 A framework provides an architectural solution
While everyone can appreciate automation of tedious tasks, the structural features of frameworks are perhaps more important in the big scheme of things. The structure that the framework provides comes from the workflow abstractions made by the classes and interfaces of the framework itself. Being an action oriented framework, one of the key abstractions at the heart of the Struts 2 architecture is the action. When we build an application on a framework, we are pretty much buying into that framework's architecture. Sometimes we can fight against the architectural imperative of the framework, but a framework should offer its proud architecture in a way that makes it hard to refuse. If the architecture of the framework is good, why not let our application gracefully inherit that architecture?