Defining business rules as POJOs
Back in the day, when enterprise development was strongly influenced by Java 2 Platform, Enterprise Edition (J2EE) (known today as Jakarta EE), there was a technology called Enterprise JavaBeans (EJBs), responsible for lifting from developers all the heavyweight jobs required to manage software development plumbing activities, relating to transaction management, security, and object life cycles. The EJB promise was that developers could focus their energy on developing business features, while the J2EE container would take care of all the infrastructure details. EJBs fulfilled this promise, but not without a price. It was time-consuming and boring to create and maintain EJBs in their first versions. There were lots of things to do, involving various Extensible Markup Language (XML) configurations and deployment descriptors, and to make things worse, there was little space to reuse these EJB objects because they had so much boilerplate. They weren’...