Separation of Concerns (SoC) one of the important concepts in software design and architecture, it's about decomposing the system into parts that highly independent and slightly overlapping in functionality.
*Separation of Concerns (SoC) *one of the important concepts in software design and architecture, it's about decomposing the system into parts that highly independent and slightly overlapping in functionality.
In the case of OOP languages, *encapsulation *and *inheritance *are one of the main ways to achieve SoC. *Event-Driven Programming (EDP) *can be also a major concept in SoC too, ideally, the modules that are throwing the events should not be aware of the modules that will handle them. In this article, I will take you through implementing EDP in *NodeJS *with a real-life example.
I will talk about an AI system that processes inputs, move across a couple of states, and do actions accordingly. I can give an example of that in reinforcement learning through the Q-learning algorithm.
While the core idea about the Q-learning algorithm is using rewards to optimize the knowledge base of the agent, then action execution would be another topic that can be separated apart from the learning procedure.
And an example of that is the Pacman game where the actions will be confined in the following list (Move up- Move down — Move left — Move right) and the SoC will be achieved by separating the Q-Learning algorithm implementation and applying actions to the screen to move the Pacman to one of the directions.
In my example, I will use a very interesting library to implement the event-driven system:
EventEmitter component inside that library supports the ability to dispatch events through “emit” function and to attach handlers to the events using “on” function, and we will talk next more about these concepts next.
An Events-driven system composed usually from the following parts:
In this article, see if there are any differences between software developers and software engineers. What you’re about to read mostly revolves around my personal thoughts, deductions, and offbeat imagination. If you have different sentiments, add them in the comment section, and let’s dispute! So, today’s topic…
To make the most out of the benefits of offshore software development, you should understand the crucial factors that affect offshore development.
Looking to build dynamic, extensively featured, and full-fledged web applications? **[Hire NodeJs Developer](https://hourlydeveloper.io/hire-dedicated-node-js-developer/ "Hire NodeJs Developer")** to create a real-time, faster, and scalable...
To summarise the main differences between the software developer and engineer: A developer executes. ... So the software developer is mainly focused on developing code that is a part of software development cycle. An engineer designs and plans applying the principles of engineering to software development.
Check out these five criteria for the selection of your software vendor, and you will never regret having the wrong quality product made for you.