2010年12月27日 星期一

My understanding of Framework

Over the years, I have been working on Spring MVC Framework and recognize that a MVC framework is a suitable model for agile development and easy for maintenance. But I have read a book "Oracle JDeveloper 11g Handbook - A Guide to Oracle Fusion Web Development" (This book focuses on the key ADF technologies used by Fusion (ADF Faces, ADF Controller, and ADF Business Components)) recently. It told me the definition of Framework and Meta-Framework. Here is the part of definition described in the book:

Framework
Frameworks evolve as concrete implementations of such patterns, factoring out the repeated portion of task, and leaving programmers with a more limited exercise of configuring the parameters of the framework to theirs needs and much less coding overall although coding is never completely eliminated.

Configured, not coded By definition, a framework performs most boilerplate and plumbing tasks for you. In order for that to happen, the framework must offer a way to define configuration data that provides the information it needs. This configuration data, or metadata, is sometimes injected through code or code annotations, but more often through some sort of configuration file. XML is typically used for such metadata files in modern frameworks, although this does not have to be the case.

Meta-Framework
We've just started to define a framework, and already we've introduced a twist in the form of meta-frameworks. What's this all about? A meta-framework is an end-to-end application development framework that encompasses a wide range of functionality. The meta-framework not only provides functionality, but it may also encapsulate or subsume multiple single-solution frameworks. If a single-solution framework is a screwdriver, a meta-framework is the whole toolbox.
Furthermore, the definition of meta-frameworks includes the idea that they offer choice and pluggability for particular tasks. For the O/R mapping example, meta-frameworks, such as Oracle ADF or Spring, allow the developer to choose one out of a whole range of O/R mapping solutions to implementation will not have an effect on the rest of the application. The user interface, for instance, will be unaware of the actual O/R mapping mechanism being used. This allows for much more flexibility in the development of the application as well as ease in changing the underlying technologies later should the need arise.

After I read the definition of framework from this book, I think that I should state this and tell all of you the main concept of a framework should be:

Framework is a boilerplate, not coded, configured by XML files or injected by code or code annotations, multiple choice for developer to choose solution for the implementation of application (Such as O/R mapping solution).

Glossary:
Oracle ADF technologies - Oracle Application Development Framework technologies
O/R mapping - Object-relational mapping
Oracle WebLogic - A Java Enerprise container engine