news

behind the prosperity of hongmeng ecosystem: the story of wps fully adapting to harmonyos next

2024-09-11

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

at this year's hdc conference, huawei officially released harmonyos next and announced that harmonyos native applications have entered the full sprint stage. more than 5,000 commonly used applications have been started for development, of which more than 1,500 applications have been put on the shelves.
behind this string of exciting numbers are the enthusiasm and expectations of thousands of developers. as one of the largest office software in china, wps took eight months to complete the hongmengization and become a member of the hongmeng ecosystem.
we interviewed kingsoft office architect qin huan and heard his story behind wps's completion of the development and adaptation of harmonyos next.
tan huan at hdc 2024
“there is not a single line of code in the harmonyos version that is duplicated with the android version.”
the first time i officially came into contact with harmonyos was at the end of 2022. qin huan was suddenly pulled into a meeting to discuss whether wps should be native to harmonyos. he felt a little puzzled.
but it is understandable. qin huan has experienced various architectural changes under the wps system, and his personal growth path is highly overlapped with the rapid development period of wps. in 2012, qin huan had just joined kingsoft office and participated in the migration of wps to multiple platforms based on qt, including windows and linux, and then expanded to macos and the infotech platform. "our group of people caught the last train of wps reconstruction, experienced system architecture changes, multi-platform adaptation, and processed various instruction sets, and participated in these changes almost throughout the process." qin huan said.
the answer is yes, just like embracing information technology innovation back then.
after the chinese new year, wps began to have long-term technical communication with huawei on the issue of hongmeng nativeization. "from february to around july last year, we went through seven or eight rounds of in-depth exchanges, discussing the technical difficulties of wps in the pure-blooded hongmeng system." qin huan recalled.
by the middle of the year, the wps team suddenly learned that harmonyos was no longer compatible with android, which meant the full launch of the harmonyos next plan, which was released in september of the same year.
once harmonyos next is launched, it will open a door to unlimited opportunities. this development path may foreshadow the division of the operating system into three parts. the goals of huawei and kingsoft office are highly consistent at the national level, industry development level, and corporate market expectations.
"in fact, we also hope to be able to take the harmonyos next express train, quickly join this process and jointly develop the market, and gain a certain market voice." qin huan said.
in order to quickly make wps hongmeng-friendly, qin huan and others quickly formed a hongmeng-friendly team. "we have selected more than 40 high-tech technicians. basically, all the high-level professionals in the office field have been recruited."
wps hongmeng version interface
team members must not only have a deep understanding of the underlying structure of wps, especially the kernel, but also have the awareness of cross-platform development. in addition, they must have the ability to develop multiple systems simultaneously, because they need to consider unifying the kernel on multiple terminals.
the pure-blooded hongmeng harmonyos next completely abandons the linux kernel. the original mechanism for running android applications no longer exists. if wps does not change accordingly, it will not be able to run on harmonyos next.
can only be rewritten.
to this end, qin huan and others transplanted the existing wps pc kernel engine to hongmeng, and rewrote the upper-level application on this basis. in order to achieve this, a framework from the kernel to the upper-level application was also built. compared with the previous android version, the hongmeng version of wps is completely different. "no line of code is repeated, it is a completely rewritten set." qin huan emphasized.
in november 2023, wps was successfully launched on hongmeng innovative products. then, by adding a simple ark layer on the kernel, basic operations of wps on mobile devices, such as opening documents, were implemented a month later. this is the hongmeng version of wps with arkui on the upper layer and c++ on the lower layer.
more than 40 requirements forced harmonyos ide to grow
after running the kernel of hongmeng innovative products on mobile devices, a new problem arises - how to build a system that can meet the requirements of cross-stack calling functions, performance and stability?
previously, on the android platform, wps had considered the interoperability solution between c++ and java (jni), but the solution was eventually rejected due to poor performance and stability. on the ios platform, this problem has been better solved because oc and c++ share the same call stack.
today, on the hongmeng mobile terminal, the upper layer is the ark runtime and the underlying layer is c++, which inevitably involves calling problems similar to jni, such as serialization and deserialization of large amounts of data and cross-process scheduling and communication.
"we are a group of people who have been raised by visual studio to be very picky." qin huan said that most of the wps developers use the mature tool chain system on the market. when they turned to harmonyos development, they encountered unprecedented challenges. "harmonyos's debugging tools and development environment - deveco studio is a huge test for us. when faced with complex problems such as cross-language debugging, custom variable observation, multi-threaded problem analysis, memory leaks, etc., can deveco meet our requirements?"
especially when it is necessary to penetrate from js to c++, due to the lack of effective cross-language debugging capabilities, tools like cmd limit their means of problem analysis and processing. they can only rely on logs and timestamps to analyze problems, and debugging becomes extremely complicated.
especially in terms of remote debugging and cross-compilation, wps has high proficiency and performance requirements, but existing tools cannot meet these requirements. wps has a huge amount of code, and how to efficiently push the compilation cache to the device has become a difficult problem.
"every time we modify the code, we have to wait for several minutes before debugging, which has a serious impact on our work efficiency. we have tried various methods to improve the compilation and debugging speed and problem verification efficiency."
during this process, huawei provided a series of technical support, such as analysis of possible logical errors and abnormal situations, and how to maintain the stability of the framework in these situations, so that the framework is well protected in terms of security, thereby avoiding the risk of abnormal crashes and enhancing the robustness and reliability of the entire system.
finally, through internal communication with huawei's technical team, wps built a scheduling framework that supports synchronous and asynchronous cross-language scheduling, which basically met wps's business needs.
in fact, before the official start of harmonyos compilation, the first topic of discussion in the formal communication between wps and huawei was whether the development and debugging tools were ready and whether they could support the compilation and debugging of such a large amount of code. in the early stages of development, wps put forward as many as 25 requirements for deveco, a dedicated development and debugging tool for harmonyos.
in early exchanges with huawei's technical team, qin huan once said that if the wps development environment can be well compatible or adapted with deveco, then deveco will be able to meet almost all development requirements of applications in the harmony process.
as the requirements are met one by one, not only the development efficiency is greatly improved, but also the confidence of developers in the hongmeng ecosystem is greatly enhanced. qin huan and his team have witnessed deveco grow from an ide with unlimited potential to a powerful tool that can stably support the development of large-scale projects.
deveco multi-scenario in-depth tuning
in addition to providing support at the technical level, huawei is also rapidly advancing the harmonyos process of third-party libraries at the strategic level.
wps office is an office software suite that relies on multiple third-party libraries to provide additional features and enhanced performance during its development. however, wps is only a user of third-party libraries and does not have sufficient control over them. "promoting the hongmengization of third-party libraries is a very energy-consuming task for us. wps relies on more than 100 third-party libraries, but we are proficient in only more than ten of them," said qin huan.
huawei is undoubtedly at the helm of the hongmeng ecosystem. in the process of promoting the adaptation of third-party libraries to the hongmeng system, huawei has played a key role, providing system-level adaptation and support, greatly saving the development team's r&d time, and ensuring the improvement of performance and r&d speed.
"in just one or two weeks, we achieved the smooth operation of the third-party library on harmonyos, which accelerated the migration process of wps to harmonyos," qin huan concluded.
throughout the entire wps hongmeng process, qin huan led the development of 40 million lines of code applications, put forward more than 150 requirements for harmonyos next, and more than 40 requirements for the integrated development environment (ide), which greatly supplemented the system capabilities, such as windows, application frameworks, files, fonts, printing, dfx and other subsystem capabilities and engineering support capabilities for large applications. in recognition of qin huan's outstanding technical contributions, the huawei developer conference (hdc 2024) awarded him the hongmeng pioneer "excellent technology contribution award" medal.
“there is no technical point that cannot be achieved on hongmeng”
the complexity of wps system and the huge amount of code make wps have special requirements for system resources. even without counting the third-party libraries, wps has 40 million lines of code, and its installation package size is far larger than most hongmeng apps.
even wps can run smoothly on the hongmeng operating system, which means that the technical barriers to the application of hongmeng have been basically eliminated. next, developers only need to pay more attention to how to optimize the details of the function and ensure stability, as well as how to perform adaptation work.
"the learning curve of harmonyos is relatively gentle, and it is not difficult to get started for people who have experience in other programming languages," said qin huan.
in the process of integrating into the harmonyos ecosystem, wps did not specifically recruit professional harmonyos developers. its team is composed of traditional c++, java, oc developers, as well as technicians familiar with front-end h5 development.
qin huan said that for developers who have been working in the c++ field for many years, the design concept of harmonyos is clear and easy to understand, and its complexity is not high. in addition, hongmeng has solved the problem of cross-language debugging, and most problems can be debugged separately and carefully by making demos or miniaturized examples.
"the process of migrating the instruction set to the huawei platform was actually simpler than expected and not as difficult as originally imagined. after all, we have experienced the creation of information technology and encountered countless problems. with hongmeng, things are not more difficult than before. in comparison, with the accumulation of their respective past technologies, the hongmengization of wps has been relatively smooth."
over the past eight months, wps has fully tested and verified the various technical capabilities provided by harmonyos. "wps has basically put all the technical capabilities that everyone needs into the harmonyos system, and there is almost no technical point that cannot be realized on harmonyos," said qin huan.
currently, wps has completed the development of the harmonyos native version of the application, and has adapted the product to screens of different sizes, such as mobile phones, folding screens, and tablets. based on the unification of multi-platform accounts, it has realized cross-terminal and cross-device document and data sharing, and supports multi-user collaboration, browsing, editing, and revision capabilities. at present, the wps harmonyos native application is running smoothly on all terminals, and wps ai is also launched simultaneously on multiple terminals. dozens of ai functions have been migrated to harmonyos next.
wps hongmeng version will be unveiled at hdc 2024
wps joins hands with hongmeng, which may subvert the mobile office ecosystem
harmonyos next, as a manifestation of huawei's technological strength, will bring users a safer, more autonomous and controllable operating system experience on a new development path. it can compete effectively with microsoft's windows system and international technology giants, and help my country gain the initiative in the field of science and technology.
as we all know, microsoft office has system privileges on windows, which third-party software does not have. in terms of functionality, wps is completely comparable to microsoft office, but it still lacks system privileges on windows.
with the release of the fully self-developed harmonyos next, china's own home turf is ready. qin huan expressed the hope that wps can break the deep binding strategy of microsoft office on windows through the deep integration with harmonyos next.
qin huan believes that once this idea is implemented, wps will provide functions and experiences that exceed user expectations. the startup optimization they are doing recently is an example. because they can deeply understand the details of system loading, they can make targeted adjustments and greatly improve the startup speed of wps.
as of may 2024, the number of hongmeng ecosystem devices has exceeded 900 million. the influence of harmonyos in the market is constantly increasing, providing a broad market space and new opportunities for applications such as government and enterprise offices.
qin huan said: "we expect huawei to play a key role in this process, bring new impetus to the office sector, and establish a more mature office ecosystem in the government and enterprise office ecosystem that can rival or even surpass the windows system, helping us gain an advantageous position in the technology field."
currently, the hongmeng ecosystem has more than 5,000 applications. this is not just a simple number, but the gradual construction and improvement of an ecosystem.
the prosperity of the application ecosystem is not a one-day job. it requires time, technology accumulation, and continuous investment from all parties. in this process, huawei, as the initiator and promoter of the ecosystem, continuously optimizes hongmeng's development tools and platforms, lowers the development threshold, and improves development efficiency. at the same time, huawei provides technical support and resource investment to encourage developers to innovate and support the rapid growth of high-quality applications.
i believe that with the release of the commercial version of harmonyos next, more companies will invest in the blue ocean market brought by harmonyos, which will also bring new possibilities for completely subverting the mobile office ecosystem.
report/feedback