I want to know is this legitimate to say Java SE a framework? If Java SE is a framework, then why there is a collection framework? Isn't collection framework inside Java SE?
No, J2SE (now JavaSE) is not (just) a framework. It is a development and runtime environment, which contains several libraries / frameworks, among others the collection framework.
The terms framework and library are AFAIK fairly loosely defined. A library (in OO languages) is a bunch of interfaces and classes organized around a common goal and/or abstraction, suitable for specific task(s).
A framework is a library which is typically oriented towards making application development simpler by implementing the common "skeleton" of related tasks. A typical feature of frameworks is the inversion of control. E.g. most GUI frameworks I know of manage the initialization / shutdown of the app, the message passing etc. themselves, allowing (and expecting) you to define and hook up callback methods to deal with specific tasks, e.g. opening a document, handling a specific event etc. Your code is always called from within the framework code, and not vice versa as is with libraries in general.
So in this sense the Collection Framework is not well named - it should be called a library instead.
No, I wouldn't call Java SE a framework. If you take a look at its website, it's described as a "complete environment for application development and deployment". A framework on the other hand is some kind of abstraction you program against.
I also don't think that the collections are a good example for a framework, because you usually use them just as a library.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With