Why Abstraction is Necessary for Modern Web Architecture
Why abstraction, and why should I reconsider my web-shop architecture? In the next few minutes, I will attempt to lay clear the increase in architectural flexibility, and the associated profit gains. This is especially true when abstraction is considered foundational rather than cosmetic, operational, or even departmental.
TL;DR
Use Abstraction! It will save you money and increase flexibility!
OK, that was more of a compression than an abstraction 😉
The long story – abstraction a forgotten art
The human brain is bursting with wonder all its own. Just think of the capabilities each of us has balanced between our shoulders.
One such capability is the core concept of using abstraction to grasp the complex world around us and store it in a condensed way.
This, in turn, makes it possible for us humans to talk about objects, structures, and concepts which would be impossible if we had to cope with all the details all the time.
What is Abstraction?
Abstraction is also one of the main principles of programming, making software solutions more flexible, maintainable and extensible.
We programmers are notoriously lazy. As such, not reinventing the wheel is one of the major axioms by which each and every one of us guides our lives by.
Besides saving time, abstraction also reduces the chance of bugs. As a result, should you find any crawling around inside your code, you simply need to squash them in one location, not multiple times over and over again, provided you’ve got your program structure right.
Using abstract definitions to derive concrete implementations helps accomplish precisely this.
Where have you forgotten to implement abstraction?
Nevertheless, there is one location where you might not be adhering to this general concept of abstraction: the central interface between your shop and your underlying search engine. Here you may have opted for quick integration, over decoupled code. As a result, you’ve most likely directly linked these two systems, as in the image below. Search Engines sit atop Webshop architecture, which is most often abstracted.
Perhaps you were lucky enough, when you opened the API documentation of your company’s proprietary site-search engine, to discover well-developed APIs making the integration easy like Sunday morning.
However, I want to challenge you to consider what there is to gain, by adding another layer of abstraction between shop and search engine.
Who needs more abstraction? Don’t make my life more complicated!
At first, you might think, why should I add yet another program or service to my ecosystem. Isn’t that just one more thing I need to take care of?
This depends heavily on what your overall system looks like. For a small pure player online shop, you may be right.
However, the bigger you grow, the more consumers of search results you have. Naturally, this increases the number of search results and related variations across the board. It follows, that the need, within your company, to enhance or manipulate the results will grow congruently. A situation like this markedly increases the rate at which your business stands to profit from abstracted access to the search engine.
One of the main advantages of structuring your system in this way is the greater autonomy you achieve from the site search engine.