Darabonba SDK for PHP is supported in PHP 5.6 and later versions. Multiple issues related to the Classic SDK are resolved for the Darabonba SDK. The Darabonba SDK introduces various new features. The Darabonba SDK is easy to understand, lowers the usage barriers, and improves the robustness of the SDK. This user guide describes the new features in detail. This user guide also describes how to use the Darabonba SDK by comparing the differences between the Classic and Darabonba SDKs.
Darabonba SDK for Node.js is developed based on Darabonba. Darabonba is a domain-specific language (DSL) that is developed by Alibaba Cloud. You can use DSL to compile code in a flexible manner. You can also parse the DSL-generated abstract syntax trees (ASTs) to generate an SDK that is suitable for all types of API operations of different Alibaba Cloud services. For more information about Darabonba, visit Darabonba. Multiple issues related to the Classic SDK are resolved in the DSL-based Darabonba SDK. The DSL-based Darabonba SDK provides the following features:
In the Classic SDK, the APIs of different Alibaba Cloud services vary based on the style, such as remote procedure call (RPC) and resource-oriented architecture (ROA). Therefore, the API operations of the services are called by using different methods. This issue is resolved for the Darabonba SDK, and the API operations of all Alibaba Cloud services can be called by using the same method.
The DSL-based Darabonba SDK contains complete business logic. This resolves the issue that the Classic SDK is tightly coupled with the core library alibabacloud/client. This way, the development costs of upgrading SDKs are reduced.
The SDK of each Alibaba Cloud service provides a client object. You can instantiate the client object to call all API operations of the Alibaba cloud service. This implementation of the Darabonba SDK is better than that of the Classic SDK because the Darabonba SDK ensures the security of multiple threads, isolates the identity and authentication information about each Alibaba Cloud service, and does not require multiple Alibaba Cloud services to share one piece of profile information. In the Classic SDK, one SDK client processes multiple threads, and permission management is less efficient. You can configure different parameters to call the API operations of different Alibaba Cloud services. The parameters that you can configure include the region, timeout period, HTTP proxy, and retry mechanism.
The Darabonba SDK is suitable for more complex scenarios. For example, to use Visual Intelligence API (VIAPI) to process an image, you must upload the image to Object Storage Service (OSS), and OSS generates a URL for the image. Then, you can specify the URL in VIAPI, and VIAPI analyzes and processes the image based on artificial intelligence (AI)-based technologies. If you use the Darabonba SDK, the identity authentication, image upload, and image processing can be complete in a simplified manner.
Darabonba SDK for PHP provides sample code for all API requests. Darabonba SDK for PHP also provides usage scenarios in which multiple API requests are sent. This way, when you use Darabonba SDK for PHP, you incur low development costs and you can focus more on your business scenario. For more information about sample code for API requests, visit Sample code for API requests. For more information about usage scenarios, visit Sample Center.