Develop a SOLID architecture

SOLID is an acronym describing five architectural principles that should be adhered to:

  • S ingle Responsibility Principle - each module, class, method, and so on, should only have one responsibility.
  • O pen/Closed Principle - modules should be open for extension and closed for modification.
  • L iskov Substitution Principle - types should be replaceable by their subtypes.
  • I nterface Segregation Principle - no client should be forced to depend on methods that it does not use.
  • D ependency Inversion Principle - High-level modules should not depend on low-level modules. Both should depend on abstractions. Abstractions should not depend on details. Details should depend on abstractions.

Striving for compliance with these five principles should result in a system that has a strict separation of concerns.

TIP
SOLID is a commonly used concept in object-oriented programming and each element is widely discussed in industry literature.
This information is just a short summary presented for awareness and you are encouraged to familiarize yourself with these concepts in more depth.

Follow the Robustness Principle

The Robustness Principle states that you should be conservative in what you send, but be liberal in what you accept. In other words, when sending messages to a third-party, you should completely conform to specifications. However, when you receive messages from a third-party, you should accept non-conforming messages as long as the meaning of the message is clear.

Implement spikes in their own modules

Spikes and test code are a part of any Agile software implementation. However, you want to make sure that they do not make their way into the production code base without the appropriate level of oversight. As a result, it is recommended that spikes are created in their own module.

Implement data migration scripts in their own module

Data migration scripts, while production code, are only run once at the initial launch of a site. Therefore, when the site is live, the scripts become dead code. To ensure that you do not build implementation code that depends on the migration scripts, they should be implemented in their own module. Doing so lets us remove and retire this code immediately after launch, eliminating dead code from the system.

Follow published Maven conventions in POM files

Apache has published style conventions at https://maven.apache.org/developers/conventions/code.html. It is best to follow these conventions because it makes it easier for new resources to come up to speed quickly.

Experience Manager


B2B Reimagined: Transforming Go-to-Market Strategies for Profitable Growth

Online | Strategy Keynote | General Audience

B2B brands are facing a digital revolution. Buyers expect hyper-relevant content and self-service, while internally AI is transforming...

Wed, Mar 19, 1:00 PM PDT (8:00 PM UTC)

Register

Put the Customer at the Center and Build Relationships That Last a Lifetime

Online | Strategy Keynote | General Audience

First impressions last a lifetime. Great first impressions feel personal, connected, and relevant right from the start. From the first...

Wed, Mar 19, 2:30 PM PDT (9:30 PM UTC)

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more