A library is a collection of class definitions and its implementations. The main benifits of creating library is simply code reuse. A simple
example is one of the other developer written code for sending emails. If you think it is a generic module. Most of the places this code can be reusable.
If we can make it a library (jar), we can include this library in our code, and call those methods. The classes and methods normally define specific
operations in a domain specific area.
In framework, all the control flow is already defined, and there is a bunch of predefined places that you should fill out with
your code. We use framework to develope applications. A framework defines a skeleton where the application defines its own features to fill out
the skeleton. In this way, your code will be called by the framework when appropriately. The benefit is that developers do not need to worry
about if a design is good or not, but just about implementing domain specific functions.
|