How different is V8 api as compared to v4 and what are the key advantages of using it?

Hye!
Advance apology if i ask some silly questions as I am new to this.
Please explain me the theoretical concept behind the use of V8 api in Suite Crm and key advantages of using it. I was going through : API v4.1 :: SuiteCRM Documentation
So far I came to know that in version 4.1, we had both option to either use Soap api or Rest Api. But I read a line in the documentation which says:

“The SuiteCRM REST API is not a true REST API - all calls are performed as POSTs and all calls are to the base URL with the method passed in as a post argument.” Couldn’t understand this! :thinking:

I also made setup for the v8 api and came to know that there is third party tool Post man Api which allows us to test the Api. The files which I found important while making some basic api were routes.php, controller. But not able to understand the flow. Correct me if i am wrong :

As we press the send request in Post man, the control reaches to the routes.php file which is redirected to the target file where we have written the logic for the function we wanted to work. Thats it!
e.g: $app->post(’/deleteduplicate’, ‘DeleteController:duplciatedelete’); Question : Then whats the need of controllers.php file? A sample controllers.php file I found:

<?php
use Psr\Container\ContainerInterface as Container;

require_once('custom/application/Ext/Api/V8/Controller/PortalAuthenticationController.php');
require_once('custom/application/Ext/Api/V8/Controller/ContactsController.php');
require_once('custom/application/Ext/Api/V8/Controller/GeneralController.php');
require_once('Api/V8/Service/ModuleService.php');


return [PortalAuthenticationController::class => function(Container $container) {
    return new PortalAuthenticationController();
}];

return [ContactsController::class => function(Container $container) {
    return new ContactsController();
}]; 

Also that there are some default set of Api when dealing with Suit crm e.g Get module, get relationship but also we can make custom api which would require us to do some modifications in the which we were hitting when the api is called.

Then most important part was the customization. In that portion I came across the slim framework which was defined as a dispatcher that receives an HTTP request, invokes an appropriate callback routine, and returns an HTTP response. But I am not able understand its need in V8 api. :roll_eyes:

Also there were number of files which were being asked to include while making custom Api. Customization :: SuiteCRM Documentation
These include services.php, middleware.php, globals.php . The information given about these files was very less. In all of the files being mentioned, it was written e.g for middle ware : It is a native php file which should returns an array of custom middlewares. But what exactly is the purpose of middlewares and why we would need to return an array of middle wares? Same goes with globals.php, services.php, validators.php, params.php ?

So is V8 api an enhanced version of the already Rest Api which were being used in version 4.1.? And we only have to follow the slim framework in the process?

You can also refer me more relevant resources to study further regarding v8 api. Thank you!