How I Built a Basic Salesforce Mobile App with Lightning App Builder

In the fall of 2018, I decided to replace an application my mother-in-law was using for her real estate business. I decided to replace the application with an Angular client and Spring Boot service running inside of AWS. The biggest lesson I learned was that I felt like I spent more time trying to understand AWS and less time making enhancements to her application.

That all changed when spring 2020 arrived…

Method Builder With Lombok @Builder

Overview

In this tutorial, we are going to explore the possibilities of generating method builders with Lombok's @Builder annotation. The aim is to improve usability by providing a flexible way of calling a given method even if it has a lot of parameters.

@Builder on Simple Methods

How to provide a flexible usage for methods is a general topic that might take multiple inputs. Take a look at the following example:

Builder Design Pattern In Java

Here I am with my another article on design patterns - Builder Design Pattern. A very useful creational design pattern that lets us construct complex objects step by step.

Builder Design Pattern

  • The Builder design pattern is designed to provide a flexible solution to various object creation problems in object-oriented programming.
  • The Builder design pattern provides a way to separate the construction of a complex object from its representation.
  • The Builder pattern constructs a complex object by using simple objects and step by step approach.
  •  The pattern provides one of the best ways to create a complex object.
  •  It is one of the Gang of Four design patterns that describe how to solve recurring design problems in object-oriented software.
  • This pattern is useful to build different immutable objects using same object building process.

The builder pattern is a design pattern that allows for the step-by-step creation of complex objects using the correct sequence of actions. The construction is controlled by a director object that only needs to know the type of object it is to create.

Why Builder Is Often an Antipattern and How to Replace it With Fluent Builder

The Builder Pattern is extremely popular in Java applications. Unfortunately, it's often misunderstood and incorrectly applied, which results to runtime errors.

Let's remember the purpose of Builder: set only necessary fields in some object and keep remaining fields set to default values. For example, if we're preparing a configuration object, then it's convenient to change only the necessary parameters and keep other parameters set to default values.