Dilemma posed by multiple technology stacks

A technology stack is a 'Set of technological tools and programming languages that help you build and ship a digital product'. Today we are going to explore on an 'unpolpular opinion: Configuring a stack is more complicated than writing the code'.

Lets jump right to it, suppose a company wants to launch a digital product, what all would they have to consider:

For the simplicity, we would not mention defacto standards by mentioning defacto standards like HTML, JSONs or getting into things like package managers or going too deep by exploring third party libraries for every technology, as they are not the product decisions but rather can be dealt by developers and should be. Also there are a ton of different tools that would be added, if we decide to look at marketing the app, and since they can be added in later, lets skip them for now.

1) Frontend:


Where would their customers be?
Web -
* Javscript vs Typescript
* UI framework : Too many options to pick up here like React, Angular, Vue
* State Managment: Redux, Mobx, hookstate
* CSS framework: Bootstrap vs Tailwind
* CSS preprocessor: To add CSS more efficiently(Sass or not)
* Post CSS: To purge unused CSS- purge vs minify
* Module bundler: Webpack: To combine our multiple JS files and use it as a bundle to run on a browser


Ios -
Two options here, which will have options of their own:
* Native: Objective C vs Swift
* Hybrid: React Native vs Flutter vs Ionic


Android -
Two options here, which will have options of their own:
* Native: Java vs Kotlin
* Hybrid: React Native vs Flutter vs Ionic

2) Backend:


Database - First choice you will have to make is to consider kind of database-
* Realational Database: Collection of data-items which would have defined realationship between them, organised as a set of tables with columns and row
Examples: Microsoft SQL Server, Postgress, Oracle Database, MySQL and IBM DB2.
* Non Relational Database: Does not contain a tabular schema of rows and columns found in most traditional databases, they are optimised for a specific requirement
Examples: Couchbase, MongoDB, Apache Cassandra, Cloud firestore
Apart from this you would have to consider if this is going to be fast enough for you? Do you require an in-memory database to help you solving that problem?
Redis or Memcached can be a couple options that you might want to consider.

Server Side Proggramming language:
In order to serve data from the database to the frontend, we need to pick our poison: Backend programming language. There are a ton to choose from following -
NodeJS, java, python, go, rust, php to name a few.
Framework:
Choosing a right framework for the programming language you chose, example:
Python: Django, Flask
PHP: Codeigniter, Laravel
Java: Spring
NodeJS: Express, Next, Meteor


Now depending on the type of Database and programming language that you just selected, you would have to consider bringing in an ORM.
ORM stands for Object Relational Mapping, it would help you encapsulate the code needed to manipulate the data, so you don't write raw SQL anymore rather interact with data using the programming languae that you write. Some ORMs for popular languages are:
Java: hibernate, ebean
Nodejs: Bookshelf, Sequalize, typeorm
Php: Doctrine, propel

Web Server
By chossing a programming language above, we now have the capability of 'writing an executable code on a server', but in order for that server to be made available to the internet, we would need a web server:
Nginx or Apache are the most popular options


API
Choosing between Server driven architecture(REST) or a client driven architecture( GraphQL)

3) Integrations


Payments:
You might want a payment integrations, as they are too complex to build on your own, and you might not want to re-invent the wheel, and most popular ones to choose from are:
Stripe, paypal, razorpay, securePay


Messaging:
Send messages to users using- Twilio or messagebird or plivo


Authentication and Authorisation:
AaaS or Authentication as a service has come up to save from trouble of doing this, as experts agree that authentication remains the weakest part of the cloud security. AaaS works by giving services like multi-factor authentication, single sign-on and password management. Bunch of options one might consider are:
Auth0, AWS Cognito, Firebase Auth


Headless CMS
Today CMS(Content Management System) is a critical layer between your Frotend and your backend. Headless CMS turns your CMS as a cloud based APIs that can be accessed from any application. And because it is decoupled from your code and user database, you can integrate it with any application with any tech based framework.
You can choose between: Sanity.io, Contentful and Strapi


Logging
Gone are the good old days where in you could log in the servers, grep through the logs to figure out an issue, now in the advent of cloud services, cloud based logging services aim to ship your logs securely and helps you access them. Consider following: Sematext, logDNA, SolarWinds Papertrail


Elastic Search
You might be building an app where in you want a seamless fast searching through your database, that is where ElasticSearch will help you out. You might want to integrate Kibana and Logstash too with Elasticserach


Wasm
Your application, could have a complex nature for a specific part. Wasm (Web Assembly) can be helpful here by defining a 'portable binary-code format', which can be executed on a Virtual machine that runs in browser.

4) Deployment


Standardising
Before we even think of that, we need to standardise the environment for our code by containerising it by docker, this creates a standard linux environment that helps us deploy our code to any cloud server.
So we would need to bring in Docker.


Scaling
As our app grows we might need to figure out orchstrating multiple containers and for that we bring in the Kubernetes


Cloud providers
Now we would need to host all this infrastrucure together, so we will have to choose from: AWS(Amazon Web Services), GCP(Google Cloud Provider), Microsoft Azure are the most famous ones.


Infrasctructure as a code
Now since we have hired a smart bunch of people for the jobs, we might have to consider writing code to programatically create pur infrastructure and version it for better reliability, rather than going to AWS website and clicking buttons. We would choose, terraform by Hashicorp.


Hosting the source Code
We would need a place to host our source code too and have a version control like git or SVN, best place to choose would be from:
Github, bitbucket, gitlab


CI/CD
A CI/CD pipeline is a series of steps that must be executed, in order to deliver a new version of a software, basically automating software delivery process.


5) More

Apart from these, there could be a host of different technologies, services and tools available to make things work like:
Archiving, using CDNs, managing certifications, security layers and protocols, sockets. The Cloud providers have the complex architectures of their own. Users have a hard time understanding which AWS service to use at what time and to be honest, there exists a ton of them now.

Conclusion

This has gone out of hand too fast. Although you don't have to go integrate all of the points mentioned above, and can skip many of it, many of the applications would have all of the features mentioned above and much more.
Although we can wrap things up by summarising that there are four major factors in my opinion that govern a tech stack:
1) Customisation needed for building the right app
2) Scalabilty that comes along when a business or app grows
3) Integrations that you look forward to doing
4) Affordability: Some of the tools are open source, while other come with a huge price tag.

But still with multitudes of tech stacks available, and new one dropping every week, it is getting hard for the companies to pick the right one.