Software Engineering: What is a Software Framework?

First, we will learn what is the software framework? Then see the advantages and disadvantages of using the software framework? Lastly, we will learn about the Spring framework in some detail.

A software framework is nothing but a set of libraries or classes. These provide built-in generic functionalities. The software framework deals with the standard low-level details of a working system. For example, a web framework can provide functionality for authentication, request handling and state management. The software framework can be thought of as a reusable software environment. Some examples of software frameworks are AngularJS, Apache Flex, .NET Framework and the Spring Framework. Also, the framework is a working template application. The software framework can be modified by writing additional code. This additional code modifies callback procedures and object behaviours using inheritance. This produces a specific software application.

Software framework advantages: Now, a software framework provides built-in functionalities for our software application, so it allows easier development of software systems. Since using a framework provides standard functionalities, it reduces the overall development effort and time. Developers can focus on writing code just for their specific software requirements. Only a framework allows the applications using it to be implemented in a standard structure. This improves the maintainability of such applications.

Software framework disadvantages: First, it takes time to learn how to use the framework. Also, using a framework increases the size of the program, because it has a number of modules in it. We need to follow some coding standards in order to utilize the framework. Because of the additional effort needed to use the framework, it is unsuitable when writing very small programs which can be written quickly without using any framework.

Now, let us learn something about the Spring Framework. The Spring Framework is an application framework for writing Java applications. Spring Framework is open source and available since 2002.

Now, let us see some functionalities offered by the Spring Framework. There are numerous standard functionalities built into it. These include Authentication and Authorization. The users and their roles can be stored in database tables. Data Access, which includes database resource management, transaction participation and exception handling. Inversion of Control (also known as IOC): this means that the application’s control flow is done by the framework. The Spring Framework can manage Java objects for their full life cycle, from instantiation to destruction. IOC is also called dependency injection. Transaction Management: Spring Framework has built-in support for local and distributed transactions, nested transactions and save points. Testing support: Spring Framework supports unit testing and integration testing.