views:

215

answers:

6

Hi, I was trying to find an answer for my question today using google and StackOverflow search engines... but no luck :)

I was wondering what are the key features of every framework for end user, and how can you characterize every framework from the end-user point of view (I've looked into Framework Design Guidelines by K. Cwalina, but I've found only concepts and guidelines for framework architects), for me:

  • it should be extensible
  • should let build extensible and reusable components
  • and of course : Simple things should be simple, complex things should be possible. (http://en.wikiquote.org/wiki/Alan_Kay)

I think there is much more out there.

Please share your knowledge.

A: 

A Framework is for me a other name for a Library (like Boost and many others) that is not about only one Topic (there are Librarys about Math, Networking, whatever out there, but these are no Frameworks) and it is of course Extensible and you can combine the Features of it to do your Job.

Quonux
Nooooo. Framework != library. Your code calls a library while a framework calls your code. You missed the inversion of control part of a framework. This is a fundamental difference.
Pascal Thivent
+1 @Pascal, but its not the only difference that can differentiate b/w them fully - you can always define **callbacks**, does it make library a framework then?
Gollum
http://stackoverflow.com/questions/148747/what-is-the-difference-between-a-framework-and-a-libraryI like Martin Fowler's definition:Library: Each call does some work and returns control to the client.Framework: insert your behavior into various places in the framework either by subclassing or by plugging in your own classes. The framework's code then calls your code at these points.
Jarek
@Gollum: It's not the only difference but it's a big one, big enough to point out that a framework and a library are definitely not the same things. Jarek posted "the reference", I don't have anything to add.
Pascal Thivent
A: 

It sounds like you just want to know what is the defining characteristic of a framework...?

From FOLDOC:

In object-oriented systems, a set of classes that embodies an abstract design for solutions to a number of related problems.

So basically, a class library ("set of classes") that's extensible ("embodies an abstract design"),

Laurence Gonsalves
I'm not looking for a framework definition.I can find it on SO site with no problem.I'm just searching for a few points that can characterize every framework.
Jarek
A: 

I'll attempt a definition based on my own understanding: A framework is a body of code that abstracts a subset of tasks common to some classes of application programs. The intent is to provide, once, proven and tested code so that application programming doesn't have to keep re-inventing code for the common tasks handled by the framework.

In real life, frameworks often spring into being when a programmer or team get carried away with generalizing and future-proofing what started out as a single application. There's an honorable intent to start code re-use, but it often turns out that such frameworks aren't designed with intent from the beginning, don't have consistent design reflecting this intent, and are actually lousy code that ends up not being re-used at all. Most architects who feel qualified to create frameworks, aren't.

Carl Smotricz
+3  A: 

Here are two good quotes from Ralph Johnson and Brian Foote

A framework is a reusable, ``semi-complete'' application that can be specialized to produce custom applications

One important characteristic of a framework is that the methods defined by the user to tailor the framework will often be called from within the framework itself, rather than from the user's application code. The framework often plays the role of the main program in coordinating and sequencing application activity. This inversion of control gives frameworks the power to serve as extensible skeletons. The methods supplied by the user tailor the generic algorithms defined in the framework for a particular application.

There was a special issue of CACM that you might want to take a look at too.

Here's one more link The Hollywood Principal. "Don't call us, we'll call you." About how the framework inverts the typical control so the framework calls your code instead of you calling some library code.

Paul Rubel
Ok, I think it's the best answer so far. +1 and bounty for you :)
Jarek
A: 

The difference between libraries and frameworks: You call libraries. Frameworks call you.

sarnold
A: 

Answering your question covering the depth it deserves is beyond the scope of this forum. All you should do is read this book though its focused on .Net frmaework specifically and written by the designers of the .Net framework, I'm sure the wisdom and information that this book provides would be sufficient to answer your question and satisfy your curiosities on the subject.

Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries (2nd Edition)

alt text

this. __curious_geek
Thanks man, but as I wrote before I've already read it :PMaby not whole book, but I couldn't find there answer to my question, and I think that Gollum was right, and I can't characterize every framework with the same features
Jarek