HarmonyOS NEXT + AI Q&A 06: What is the Relationship Between the Cangjie Toolchain and DevEco Studio Cangjie Plugin in the Cangjie Programming Language? Why Install So Many Plugins?
In the "HarmonyOS NEXT + AI Large Model to Build an Intelligent Assistant APP (Cangjie Version)" course, a student raised the following question:
After installing the Cangjie toolchain, why do I still need to install the DevEco Studio Cangjie Plugin? Will DevEco Studio call the SDK of the Cangjie toolchain? It seems there are no related settings for this.
Here is a unified response to this student's question to facilitate reference for other students. Previous Q&As can be found on my homepage.
In Chapter 3, "Intelligent AI Assistant Project - Development Environment Setup," of the course, we have arranged the following content:
- 3.1 Chapter Introduction
- 3.2 Register a Huawei account and complete real-name authentication
- 3.3 Set up the Cangjie programming language development environment
- 3.4 Basic usage of CJPM
- 3.5 [Practical] Develop a Cangjie "Hello World" application
- 3.6 Analyze the structure of the Cangjie "Hello World" application
- 3.7 Download and install the development tool DevEco Studio
- 3.8 Configure DevEco Studio
- 3.9 Download and install the DevEco Studio Cangjie Plugin
- 3.10 [Practical] Create a HarmonyOS application "Hello World"
- 3.11 Sign the HarmonyOS application
- 3.12 Run the HarmonyOS application on a local real device
- 3.13 Run the HarmonyOS application using a local emulator
- 3.14 Master the common functions of the DevEco Studio editor
- 3.15 Detailed explanation of the HarmonyOS application structure
- 3.16 Master the core component Ability of HarmonyOS
- 3.17 Understand application-level and component-level configurations
- 3.18 Understand the packaging principle of HarmonyOS
- 3.19 How to improve UI development efficiency and experience?
- 3.20 Chapter Summary
- 3.21 Exercises: Create a HarmonyOS application
It can be seen that there are actually two sets of environment setups introduced here: one is a pure Cangjie environment, and the other is a Cangjie-HarmonyOS environment. These two sets of environments are independent and have no association.
The main installation steps for the pure Cangjie environment are:
- 3.3 Set up the Cangjie programming language development environment
- Mainly involves installing the Cangjie toolchain and the VSCode Cangjie plugin. The Cangjie toolchain can be simply understood as the SDK for Cangjie, similar to the JDK for Java, used for compiling and running pure Cangjie programs.
- The VSCode Cangjie plugin supports developing pure Cangjie programs in VSCode.
The main installation steps for the Cangjie-HarmonyOS environment are:
- 3.7 Download and install the development tool DevEco Studio
- 3.8 Configure DevEco Studio
- 3.9 Download and install the DevEco Studio Cangjie Plugin
- Mainly involves installing DevEco Studio and the DevEco Studio Cangjie Plugin. These tools are primarily used to support developing Cangjie-based HarmonyOS applications in DevEco Studio, similar to Android Studio.
These are two separate environments: one is a pure Cangjie environment, and the other is a Cangjie-HarmonyOS environment. They are independent and have no association.
If you only want to learn the syntax of the Cangjie programming language, you only need the pure Cangjie environment. Chapter 4, "Intelligent AI Assistant - Quickly Get You Started with Cangjie Programming Language," of the course provides a complete learning path from scratch, allowing you to systematically master the Cangjie programming language. Through this chapter, you can learn to develop an animal sound simulator, understand Cangjie collection classes, exception handling, package management, master large-scale program code organization and management, become familiar with I/O operations, file reading and writing operations, and network programming. You can even create TCP servers, UDP servers, and build HTTP services using the Cangjie programming language.
If you want to develop HarmonyOS applications using the Cangjie programming language, you need to install the Cangjie-HarmonyOS environment. As we all know, DevEco Studio is an essential IDE for developing HarmonyOS applications. Since the Cangjie programming language has not been officially released yet, it is necessary to support developing HarmonyOS applications based on the Cangjie programming language in DevEco Studio through a plugin (DevEco Studio Cangjie Plugin). Chapters 5-11 of the course also include corresponding practical training.
Currently, having multiple environments and multiple plugins has indeed caused many difficulties for HarmonyOS application developers, but this is only temporary. As I mentioned in the article "Huawei's Self-Developed Cangjie Programming Language Will Be Open-Sourced and Have the Same Status as ArkTS in the Future," as the Cangjie programming language continues to improve, it will inevitably have the same status as ArkTS. Then, DevEco Studio will naturally support HarmonyOS applications based on the Cangjie programming language without the need to install so many plugins.
The future of the Cangjie programming language is promising. Are you ready?
After understanding the differences between these HarmonyOS programming languages, I believe you now have your own judgment on choosing a HarmonyOS programming language. When selecting a language, you can consider the following aspects based on your own situation:
-
Personal Preference:
- Developers have certain preferences for programming languages. You can choose ArkTS or Java based on your personal喜好.
- If you are familiar with Java or Android, you can choose Java. If you are familiar with JS or TS, you can choose ArkTS. If you are familiar with Rust, Cangjie is also a good choice.
-
Career Needs:
- If you want to implement powerful and complete HarmonyOS application functions and maximize compatibility with existing Android devices on the market, Java is currently a good choice. However, note that HarmonyOS will no longer support Java after API 8. For related content on developing HarmonyOS applications with Java, please refer to my books "HarmonyOS Mobile Application Development Practice" and "HarmonyOS Application Development from Beginner to Master" as well as the video tutorial "HarmonyOS System Practical Short Video App Development from Scratch to Mastery (ArkTS Version)."
- ArkTS is currently the main language promoted in the HarmonyOS ecosystem. It is recommended to build new commercial projects based on ArkTS. For related content on developing HarmonyOS applications with ArkTS, please refer to my books "HarmonyOS Application Development Introduction," "HarmonyOS Application Development from Beginner to Master (2nd Edition)," and "Harmony Light: HarmonyOS NEXT Native Application Development Introduction" as well as the video tutorial "HarmonyOS Zero-Based Rapid Practical - Imitation Douyin App Development (ArkTS Version)."
- If you simply want to learn a new language and keep up with its evolution, Cangjie is also a good choice. From a future development perspective, Cangjie may replace ArkTS as the main development language. However, note that Cangjie is currently only a developer preview version, with an unstable API and incomplete functionality. It is not recommended for use in commercial scenarios. For related content on the Cangjie programming language, please refer to my book "Cangjie Programming from Beginner to Practice" and the video tutorial "HarmonyOS NEXT + AI Large Model to Build an Intelligent Assistant APP (Cangjie Version)."
For more open-source tutorials, please see: