Разлика между framework и library?
Някой може ли да обяси с прости думи разликата между двете?
Някой може ли да обяси с прости думи разликата между двете?
A library performs specific, well-defined operations.
A framework is a skeleton where the application defines the "meat" of the operation by filling out the skeleton. The skeleton still has code to link up the parts but the most important work is done by the application.
Examples of libraries: Network protocols, compression, image manipulation, string utilities, regular expression evaluation, math. Operations are self-contained.
Examples of frameworks: Web application system, Plug-in manager, GUI system. The framework defines the concept but the application defines the fundamental functionality that end-users care about.
Представи си ги то така, макар, че е доста относително
1 библиотека е предназначена за 1 нещо
1 фреймуърк от своя страна е изграден от много библиотеки, работещи заедно
и едно малко по-ясно обяснение
A library is essentially a set of functions that you can call, these days usually organized into classes. Each call does some work and returns control to the client.
A framework embodies some abstract design, with more behavior built in. In order to use it you need to 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.