 In this video, I will present the component-based architecture. In short, CBA. We use this architecture when we want to create a software component that emphasizes reusability, a software component that could be reused in many different projects. It focuses on the decomposition of the design into individual functional or logical components that expose well-defined communication interfaces containing methods, events, and properties. Here you see two examples. The one on the left is a visual basic development environment. Here is the software component panel that lists all the components that can be reused in the project. In the center, the developers can adjust the visuals of a component that is used. And on the right, you see a property panel that lists the available component properties. How it is possible? Well, the component exposes application programming interface or API. And it serves both development of the software and software itself. On the right, you see the Unreal Engine development environment that works basically the same way. So, let's see an example of a software component that is dedicated to using along with Unreal Engine. It is an advanced movement component. As we can see, it adds jetpack, sprinting, and other features. Let's dive into the code. Here we have two folders, public and private. In this case, the public folder contains files and mostly define the exposed functions and properties while the private folder contains implementation code. Let's see what's inside the character.h file. We can see the function definition in C++ And you can notice that some functions are decorated with Ufunction keyword. We can see that the function is accessible by Unreal's visual code editor called BlueprintSystem. Also, it falls under the jetpack category. It means that this function is exposed to Unreal and can be accessed by the development environment. Now let's open amcmovementcomponent.h. Here we see another decorator called Uproperty. It tells the development environment that the variable can be shown and accessed within a property list. For example, this jetpackForce variable can be accessible for Blueprint for reading and changing the value. This value can be edited elsewhere, either in the template or in the instance. It falls under the jetpack category so that the development environment displays it in a separate panel dedicated to the jetpack things. Advanced display says the property is shown when the developer opens advanced properties. If you'd like to see the implementation, you may look into the private folder and corresponding source code file. You may notice that this component structure is a real-edged specific. Yes, it is. There are many ways to organize CBA. Many frameworks don't include the development environment at all. And you may end up making your own CBA framework or using existing means for that. The idea is to create such a piece of software that could be reused in many other projects without making specific changes. If you are interested in that, I propose to find the courses dedicated to this topic. Okay, let's review the key principles of CBA. Here are listed the features of CBA software components. We saw Reusable Components are usually designated to be reused in different scenarios in different applications. However, some components may be designated for a specific task. Replaceable Components may be readily substituted with other similar components. Not context-specific Components are designed to operate in different environments and contexts. Specific information, such as state data, should be passed to the component instead of being included in or accessed by the component. Extensible A component can be extended from existing components to provide new behavior. Encapsulated Components expose interfaces that allow the caller to use its functionality and do not reveal details of the internal processes or any internal variables or states. Independent Components are designed to have minimal dependencies on the other components. Therefore, components can be deployed into any appropriate environment without affecting other components of the systems. The main benefits of using CBA include Ease of development As new compatible versions become available, you can replace existing versions with no impact on the other components or the system as whole. Reduced cost The use of third-party components allows you to spread the cost of development and maintenance. Ease of development Components implement well-known interfaces to provide defined functionality, allowing development without impacting other parts of the system. Reusable The use of reusable components means that we can be used to spread the development and maintenance costs across several applications or systems. Mitigation of technical complexity Components mitigate complexity through the use of a component container and its services. Let's summarize this topic. The component-based architecture is an architecture that focuses on the decomposition of the design into individual, functional, or logical components. The components expose well-defined communication interfaces containing methods, events, and properties. There are a lot of benefits that suggest using CBA. There are some shortcomings as well. For example, increased effort required for the development of components that will be used in different contexts. Component maintenance costs, reliability, and sensitivity to changes. It is very important to make the changes in such a way that these do not crash tens, hundreds, or thousands of applications that use the component. There are many ways to make your code ready for use. So, you should choose CBA when you need to use your components in many different projects, and you are looking at the long-term benefits. Thank you for watching.