HarmonyOS provides more than 16,000 apis. In addition to these apis, HarmonyOS also provides a series of component libraries that make application development easier and more efficient. The HarmonyOS library is directly available on the OpenHarmony open source community, and Huawei is still expanding it. What is the HarmonyOS component library that works so well? We can understand it from the following five aspects. In 2021, HarmonyOS will roll out over 1,000 HarmonyOS components in 10 categories, including UI, animated graphics, frameworks, security, tools, networking, file data, multimedia, image caching and basic functionality. It has three major features: multi-device form availability, multi-terminal deployment and performance optimization.
The HarmonyOS Project directory structure is similar to that of the Java Project. The HarmonyOS Project directory consists of the Build directory, liBS dependency library directory, SRC source code directory, and build scripts.
DevEco Studio, HarmonyOS’s IDE tool, allows developers to develop projects directly with components. Simply open a specified template and the associated directory structure is automatically imported into the project file. DevEco Studio download link:Developer.harmonyos.com/cn/develop/…
Har package reference (build.gradle) Binary directory reference is simple and straightforward, developers only need to put component libraries into the liBS directory. Prototyping is very convenient and is a common way for beginners or testers. dependencies { implementation project(“:mylibrary”) } 2. When developers need to optimize the components they are using, they can reference the source file, download the source code, and modify it synchronously. After optimization, you can also contribute the source code to the open source warehouse. dependencies { implementation fileTree(dir: ‘libs’, include: [‘.jar’, ‘.har’])} 3. Maven storehouse references (build.gradle) are suitable for large-scale team development or commercial application development. Developers can download Maven storehouse references directly from the central storehouse. Maven {url ‘file:// d :/01.local repository}}} Dependencies {implementation ‘com. Huawei. Har: mylibrary:’ 1.0.1} four, component library how to obtain the developers through OpenHarmony Gitee open source address to download the source code, You can also find the components in the HarmonyOS component library documentation. ●Gitee open source link: gitee.com/openharmony…
2. How to obtain component library documents HarmonyOS provides a unified management platform for component library documents. ● Link address:hpm.harmonyos.com/hapm/
5. Demo effect display of some components
1.BezierMaker: simple Bezier curve drawing method ● source download address: gitee.com/openharmony…
2.Cardslib: Card layout library
● Download the source code at gitee.com/openharmony…
3. Confetti mimics the falling snow
● Download the source code at gitee.com/openharmony…
4.FileDownloader: a file download library
● Download the source code at gitee.com/openharmony…
From this introduction and description, you should have a basic understanding of how the HarmonyOS component library works. The HarmonyOS library helps developers develop their apps more efficiently, but it also requires constant feedback, additions and improvements. The HarmonyOS ecosystem needs more developers to grow and flourish.