Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members

The nature of a Framework

Framework vs. Class Library

It is important to understand the nature of a framework, especially in comparison to a class library. Frameworks operate by the "Hollywood principle" (don't call us, we'll call you). That means, the framework controls the entire flow of your application's execution, calling your code in a few well-defined places. When you are using a class library, it is just the other way around: You control the flow, and make calls into the library.
A framework is harder to design than a class library, but provided that your application fits the domain of the framework, it can save you a lot of work, and provide results of superior quality, because you are not only using proven code, but also proven patterns for application design.
In reality, you will rarely find a pure framework. Most frameworks are also accompanied by a class library. These are called hybrid frameworks.

Hotspots

The places in your code, which are invoked by the framework, are called hotspots. These are the places where you are given the chance to customize the behavior of the resulting application. The control flow between the invocations to your code is defined entirely by the framework, and cannot be modified by you.


Razor! Engine Developer's Guide. Copyright © by Tilo Christ. All Rights Reserved. Last updated: 17 Dec 2000