Refactoring Java Application: Object-Oriented And Functional Approaches

Java Refactoring Approaches

Refactoring in Java has many aspects, but among all of them, there are two fundamentals: object-oriented and functional. Object-oriented existed almost from the first Java version, whereas functional appeared only with Java 1.8 (March 2014).

Object-Oriented (OO) and Functional Approaches

Java is a classical object-oriented language and allows the creation of flexible object structures. After Java 1.8 received functional features, it became capable to operate not only with objects or methods but with lambdas (which is executable code itself). In the functional world, you can operate with functions as with objects in the OO world.

Functional and Non-Functional Testing: The Basics You Should Know

Testing is an essential part and success factor of the software development process. If the test management is carried out correctly, tests can help to avoid software errors and ensure a high quality of the product. There are a lot of testing practices to make sure that your solution works correctly and can be used easily across multiple environments and platforms. These methods are usually divided into functional and non-functional tests.

You may also like: Functional Testing vs. Non-Functional Testing

Functional JavaScript: Lenses

One of the most interesting talks among the ones I attended in lambda.world was Functional Lenses in JavaScript by FlavioCorpa. He talked about Functional Lenses in a practical way; what’s more, he started with his own small implementation (not for production), and then he talked about different libraries like Ramda or Monocle-TS.

The talk started with an easy-to-understand definition for those of us who are familiar with the procedural/imperative programming: “Lenses are basically functional getters and setters”. Basically, what we get with Lenses is the ability to reuse the data access of a structure in a modular and immutable way, either to obtain the data or to modify it. Later, we will see examples to better understand it.