Toolkit v/s Framework
Toolkit: A set of related and reusable classes designed to provide useful, general-purpose functionality. Ex: Collections, IO Library, etc
Framework: A set of cooperating classes that make up a reusable design for specific types of software. Ex: JUnit, Spring, etc
Toolkit | Framework |
---|---|
Code reuse | Design reuse (Dictates the architecture or part of it by defining overall structure and key responsibilities of classes) |
Delegate calls | Create application specific subclasses of abstract classes from the framework |
We define the main body of the class and call the toolkit code we want to reuse | Reuse the main body and write the code it calls |
Very helpful. Library are usually built by experts and rest of the developers can leverage library builder’s expertise. | Faster to build applications this way. Also ensures same structure across different applications, hence easy to maintain. At the same time frameworks are guilty of enforcing stuff on the developers and loss of some creative freedom. |