In this article we are going to understand about the frameworks used in Java technology.
Framework Generally, framework can be defined as a real or conceptual structure intended to serve as a support or guide for developing or building of something that results in something useful or meaningful. In the world of computer systems, a framework can be considered as the layered structure suggesting what kind of program can or should be built and how they would interrelate to provide something fruitful. Sometimes frameworks also include actual programs, specify programming interface, or provide programming tools for using the frameworks. More precisely, a software framework is a huge prewritten program which can be used to add in our program or code to solve a specific domain problem. Actually, framework uses our code because it is usually the framework that is in control. We can make use of a framework by calling it ‘method’, ‘inheritance’ and supplying ‘callbacks’, listeners or other implementations of observer types. A framework is a collection of software libraries or components which provide a defined application programming interface (API). The framework is having such key features that can differentiate a framework from libraries we are talking about. The key features are as following:
Frameworks are of different kinds depending upon the need of the problem. They are component, development, domain, services, conceptual, application, platform, etc. If we see it more precisely then have a look a the below table.
Use of frameworks A framework is very helpful in building complex applications because it often dictates the structure of the application program. Some frameworks even supply so much code that you need to do very little to write or complete your task. This can be good or bad, depending on how easy it is to use in different domain problems. By Wil Shipley: “Frameworks are the substance of programming. You build on top of a good one, your program is solid and fast and comes together beautifully. You build on top of a bad one, your life is miserable, brutish, and short.” Frameworks in Java In Java technology, plenty of frameworks are there which can be used by the programmers or developers to build the complex applications of programs. The frameworks in Java are like ‘Hibernate’, ‘Spring’, ‘Struts’, etc. Example In Java, a very common example of frameworks is GUI frameworks such as Java Swing and AWT classes. As they have a big bundle of code to manage the user interface, and there is an inverted flow of control, because we start the GUI framework and then wait for it to call our listeners for further processing. Sometimes the Collections classes are also called as a framework, perhaps largely because of the size and complexity. But it is actually referred to as a library because there is no inverted flow of control as our programs simply call methods in these predefined or extended classes to get the further response. That’s all for the introduction part of framework. We will further move to learn a framework – Hibernate - in the next part of this article. Thank you, keep learning and sharing.
Solutions Manual to Objects First with Java – A Practical Introduction using BlueJ