A decent general purpose definition of lightweight and heavyweight,
applicable to way more than just frameworks, is the degree of
extensibility and configurability and flexibility built into the
"thing". Whether that "thing" be an application framework or a messaging
protocol or whatever.
A lightweight system handles the easy cases, perhaps some of the medium
difficulty cases, but can't deal with complex cases. Maybe you can't
customize at all, or there is just way too much you have to implement
yourself. java.util.logging is lightweight; log4j is more heavyweight.
Java EE 5/6 and Spring are both heavyweight. A lot of Spring aficionados
persist in wanting to call Spring lightweight: they must have some
different definition, and I think I know what it is. Some people equate
"lightweight" with "low barrier to entry" (ironically not true for
Spring anyway) or "minimal configuration" (ironically not true for
Spring anyway) or "low complexity" (ditto), but that's a confusing
usage. I prefer the one I put forth (which I didn't invent btw), which
is actually true for Spring, and one which they shouldn't shy away from.
JSF, for example, is more heavyweight than a number of other web
frameworks (certainly way more heavyweight than writing with servlets
directly). JPA is more heavyweight than iBatis/MyBatis. In all these
cases "lightweight" vs "heavyweight" is not a bad vs good comparison;
it's merely a comparison of
extensibility/configurability/flexibility/manageability etc.
The definition carries: we can identify lightweight web servers and
heavyweight web servers, at least side by side. We know that Alfresco is
a "lighter-weight" CMS than FileNet P8; we know that enterprise Oracle
is a "heavier-weight" RDBMS than Derby. Nothing pejorative about calling
the one "light" and the other "heavy".
Dunno about metrics, but this definition does imply that in order to do
anything with a "heavyweight" framework you've got lots of accompanying
stuff. The upside of this is that you can do lots of different things. A
"lightweight" framework implies that you can't do nearly as many
different things, or it's maybe more work to get some things done
compared to a "heavyweight" setup, but you've got less stuff to take
along for the ride and configure to get a given thing accomplished.
AHS
--
-- Gaiety is the most outstanding feature of the Soviet Union.
Josef Stalin, November 1935