![](https://crypto4nerd.com/wp-content/uploads/2023/02/18Zahm-Foz9uod9rqBhrYg.png)
Programmers love the fun they have with source code development and the way of turning it over to a real value touching people need.
The way of code programming has been evolved over time from assembly, high-level programming languages, object oriented, design patterns, agile development, and then machine learning. The same basic components are being used with each phase of evolution but with different approaches and techniques.
We are on the edge of new software development era with the emerging of machine learning and the urgent need of automating human works.
let’s be more realistic, we are seeking the machines that can save time, effort, and give us the power of domination. That is awesome, when we think about world of human beings served by inelegant machines that can work hard 24×7 in agriculture, manufacturing, transportation, healthcare, etc.
We are the makers of that intelligent world (using code as the basic development unit), so we need to know the drivers of this revolution:
- Portability — build a portable code block (system, module, packages, or even code snippet). That is maximize the code reusability so it can be ported from one environment to another with the less configuration as possible. The main idea behind portability is to build portable building blocks. GitOps and Linux CMake are clear example of code portability, while packages and containers are example of binary portability.
- Automation — a higher level of programming that reduce human interaction in software processes. Low code tools are example of software development process automation. But to be considered, source code still the basic unit in the automation process which by then compiled into a binary component that used on the fly.
- Artificial intelligent — the main player and the current game changer as the next high-level of system programming technique. The traditional programming code algorithm is replaced with an inelegant algorithm that depends on data and math. for more details, please check this article “The Machine Learning Landscape”
The echo system between AI, portability, and automation are playing a big role in evolving each of them. All are depending on each other, and all are affecting on each other.
Source code will continue to be the basic unit of software development whatever the programming technology or methodology (traditional or ML). That is means we still need to take care of code structure and to adopt new development principles which are more aligned with the change and progress in the information technology. For example, adopting the principles of cloud native services during coding, make us focus on business requirements (during development time) and move away the implementation of non-business requirements to the environment (hosting platform) and shared services like configuration, cashing, service discovery, messaging, data streaming, etc. That is make code simple and portable.
The term “software service” is used here to refer to server side “business service” that hosted on the cloud or on-premises.
Simply, any software system is consisting of main three parts:
- User Interface (GUI, console, etc.)
2. Business Logic —the implementation of use-cases and business domain entities so it could be represented by more than one component.
3. Data — data stores like database, memory, or disk files.
While other parts in software program are to support non-business functions like:
- Libraries — a reusable system component which provide cross-cutting features (logging, error handling, caching, and security) or reusable technical functions (reusable code or packages).
- Integration — The gates used by the system to interact with other systems either through in-bound integration or out-bound integration. And that what is reflected in the architecture with coms matrix. This part (or component) is encapsulating the required logic that needed by application component as we will see in the DDD model.
Integration and libraries are representing the infrastructure of the software application.
Code structure is important to control application development over time to keep aligned with business changes. So, design patterns are used to provide a unified work pattern and standard reusable solutions for the recuring problems. One of the famous design patterns used in developing enterprise applications is the Domain Driven Design (DDD) which is focus on the core domain business as centric part in the system. The idea behind DDD was to close the gap between business and technical by working together using a common language aka ubiquitous language. That happened simultaneously with the emerging of agile development and the new principles raised for creating independent system layers aka inversion of control (IoC). So, software engineers have developed different design patterns that apply DDD and IoC with common concept but with different flavors like clean architecture, hexagonal architecture, onion architecture, etc.
Actually, DDD is a natural concept, so it is being used widely with different architecture patterns like monolithic architecture, modular monolithic architecture, micro-service architecture, and wise-grained service architecture.
The term wise-grained service is used to refer to the system with business boundary that reflect the real business case and avoid bias to the technical architecture style (for example monolith or micro-service).
I am adopting a simplified DDD model with the following concepts to apply code portability (or mobility):
- Simple system structure, by reducing layers/components as possible. For example, we may have code structure as Entities in the core, Application, Northbound for public integration, and Southbound for internal integration.
- Keep focus on the business requirements. So, for non-business requirements rely on the technology framework and hosting environment as possible. For example, use the framework capabilities for cross-cutting features (caching, logging, error handling, etc.) and use environment capabilities for the cross-services features (configuration, service discovery, networking, etc.). Simply, follow cloud-native principles.
- IoC is the secret of components portability. So, abstract the communication between layers using interface classes and let runtime to decide which concrete component to be used at runtime using system configuration.
That increase the ability of creating system with portable components so they can be replaced without interrupting business and with lowest cost as possible. Also, that support our goal to have high level of automation and artificial intelligence.
Who is first, Application or Data?
Actually, both are two sides of one coin. the first side reflect the business case and the second side reflect the data behind the business case.
There is a mutual induction between application and data. So, starting with application or data does not matter. Use application to validate data model and use data model to validate application logic.
Reusable Parts in the System
The velocity of development is directly impacted by the number of code lines to be written and tested. High velocity means the speed of delivering a new business feature or changing an existing feature. Which means, reusable code increases the velocity and the quality of developing new business feature.
The following diagram is depicting an estimated percent of reusable code. The idea is to give hint about high potential reusable parts which have to be considered in the design and development phases.
Integration and libraries components have the highest percent of reusability. Application component has the lowest percent as it is the most customized part in the system. While core business component has a high percent when looking to its reusability from one application to another like web, mobile, and other app types.
portable code is the reusable code from one system to another.
Portable system is the system which can be ported from one environment to another without need to do special customization (environment agnostic) like containerized applications.
Lets have a look from the upper level view to get global insight about the goal of this article for how to utilize portability, automation and artificial intelligence to build swift and smartness systems.
System can be deployed on the hosting environment with different approaches which have to be identified at design time. We can have one system with one layer, deployed on one giant server. Or, we can have a a scaled and distributed system with specialized services (each has a specific role).
The idea here is to create standard, adaptable and changeable system, no matter what its topology is. But lets go with the best practice by adopting cloud-native systems which support our seeking of a swift and smartness system.
Good design must be like seed, start simple and grow-up steadily.
Hosting environment is the same as soil for the plant, so system can grow-up and keep alive using environment resources.
Business-Centric System
As in DDD, business is the centric part, so business system/service still the centric system in the hosting environment. Which means, understanding the hosting environment -specially cloud native environments- and using mature development framework helps us to build nimble systems that take care of business. Cloud-native environment provide out of the box services that can be used by the main system like configuration and service discover, also it is built to host disposable services (like integration services) that can be accessed via standard interfaces (e.g., HTTP REST). For more details about cloud native services https://www.cncf.io
Good design should be composable and decomposable, so it can be composed from independent parts that can be decomposed and replaced when required.
The above diagram is an example for how we can think about building a business-centric environment. The idea is to emphasize the role of hosting environment and its shared services in building a secured business-centric system.
The main characteristics of the hosting environment architecture are:
- Platform — represent the shared services between all systems (hosted by the environment). It is play a vital role in automating provisioning process as part of continuous system delivery, and take care of operating and monitoring the running systems. So, it is the basic foundation of automation and portability.
- Edge — represent the public gateway to the systems. It is play an important role as the first line of defense, control the traffic to the core business services, and bear the none-business load (like public content and integration with public service)
- Integration — represent the shared services used for internal and external communication. Integration gives a broader area for the business systems to depend on other systems or to provide its service for other systems.
- cross-cutting frameworks and libraries — the shared libraries used in development time to build different systems.
- Business System — the dynamic and the focal point of all of that.
Platform, Integration, and frameworks are playing a vital role to allow high level of process automation.
(1) Portability
As much as reusability is well utilized as much as code/component portability level increase.
And, as we are tending to build business-centric system. we have to consider the reusable components of cross-cutting, integration, and edge. Also, reusable business service when targeting different applications.
Any required configuration (like settings) must be independent from the portable component and injected at runtime using different techniques (like using web configuration service or any other techniques which is appropriate for the final solution).
Portability is Reusability in Action
(2) Automation
It won’t be done without good tools and good platform. It should be composed of independent reusable components to compose an automated business (or technical) process.
Automation is some sort of programming which means it is subject to be evolved with AI machine learning techniques. That is highlighted in the above diagram “Software Service Landscape->Env Integration ->Adaptive AI”, or any other AI techniques which targets automation integration.
(3) AI
It is going to be aspect in every software system by embedding ML model inside the system. Whereas AI implementation is not restricted on specific system function (edge, business, or integration).
The following diagram depict how ML is going to be an aspect in the software system which will change the future of software system development.
Folow this link (The Machine Learning Landscape) for a get-started guide for how to use ML in system development.
Frontend (or client channels) are the client apps that interface with the business system either via presentation service or via API. It is not depicted in the diagrams, as the same idea can be implemented while design/build frontend apps by considering the three main factors of portability, automation and AI.
Frontend apps like mobile application can be supported with embedded ML model or it can use it remotely via API.
The following diagrams are depicting a use case of School system. The idea is to show the basic components/layers in the system and their interactions with external systems.
Identifying the basic components in the system and their coms matrix allow us to determine the scope of development work and opportunity of reusability, automation, and machine learning.
Zoom in “Env 1”
To make a transformation strategy toward intelligent and agile systems, that requires to be ready with portable building blocks, mature automation process, and clear ML vision.
Design the building blocks with reusability in mind, using simple techniques of abstractions and dependency injection. Make system design simple to consist pluggable components that can be replaced as required without interrupting the business.
Machine Learning has been becoming an aspect in the modern software systems so this is the time to start build your ML models for different systems you have as possible.
To be continued, how to measure?