Written by: Igor Korotach
In aspect-oriented software development, cross-cutting concerns are aspects of a program that affect several modules, without the possibility of being encapsulated in any of them. These concerns often cannot be cleanly decomposed from the rest of the system in both the design and implementation
Some of the most important characteristics of centralized applications are:
1. Global clock
2. Single code base
3. Single point of response
Some of the most important characteristics of decentralized applications are:
1. Independent clock
2. Fault-tolerance
3. Multiple points of response
Layered architecture is an architectural style where the application is structured into independent layers which have their own independent level of responsibility and data control
class Database:
def __init__(self, connection):
self.connection = connection
class Service:
def __init__(self, database: Database):
self.database = database
class Controller:
def __init__(self, service: Service):
self.service = service
def main():
database = Database('connection')
service = Service(database)
controller = Controller(service)
controller.run()
class DatabaseSingleton:
_instance = None
def __init__(self):
self._instance = DatabaseSingleton()
# Some other file
service = None
class Service:
def __init__(self):
service = Service()
class Controller:
def __init__(self):
import service
if not service:
service = Service()
def main():
controller = Controller()
controller.run()
N-Tier also known as N-Level architecture is an architecture style that focuses on physical separation of structural units.
Layers - logical separations, e.g. business logic vs data querying
Levels - physical/network separation, e.g. Frontend/Backend
MVC relies on direct flow of data across the layers, all the initiated actions are explicit.
E.g. Receive request to click a button in controller, propagate to model, change state, render new state in the view
Is usually used in Backend applications for direct flow
MVVM heavily relies on data-binding, i.e. implicit connection between UI and business logic.
E.g. create an interactive button, that handles click as on-click and updates state automatically
Is usually used in GUI applications for easier interactions