Extensibility and reusability

Businesses evolve as they grow, where applications not only scale to handle an increased user base but also keep adding more features to stay ahead and get a competitive edge. A solution design needs to be extendable and flexible enough to modify an existing feature or add new functionality. To modularize their application, often organizations want to build a platform with a group of features and launch them as separate applications. This is only possible with reusable design.

To achieve solution extensibility, a solution architect needs to use a loosely coupled architecture wherever possible. At a high level, creating a RESTful- or queue-based architecture can help develop loosely coupled communication between different modules or across applications. You will learn more about the other kinds of architecture in Chapter 6Solution Architecture Design Patterns. In this section, we will take a simple example to explain the concept of architecture flexibility.

The following architecture diagram shows an API-based architecture in an e-commerce application. Here, you have independent services such as product catalog, order, payment, and shipping being utilized by an end user application in a pick-and-choose manner. Mobile and browser applications are used by the customer to place an online order. These applications need a product catalog service to browse the product on the web, an order service to place an order, and a payment service to make a payment.

The product catalog and order service, in turn, communicate with the shipping service to send ordered items to the customer's doorstep. On the other hand, brick-and-mortar stores use Point of Sales systems, where a customer representative scans barcodes, places orders on behalf of the customer, and takes payment. Here, no shipping service is required as the customer picks the item up in-store:

Extensible API-based architecture

In the preceding diagram, you can see the Reward API, which is used for third-party API integration. This architecture allows you to extend the current design to integrate the Reward API for customer retention and to attract new customers by providing benefits when they purchase an item.

Here, you can see how payment services are reutilized by both online and store ordering. Another service can reuse this if the organization wants to take payments for gift card service, food services, and so on.

Extensibility and reusability are not limited to the service design level. It goes deep into the actual API framework level, where software architects should use object-oriented analysis and design (OOAD) concepts such as inheritance and containership to create an API framework. This can be extended and reutilized to add more features to the same service.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.13.201