CN-116225400-B - Cross-platform desktop application development method
Abstract
The invention discloses a development method of a cross-platform desktop application program, which is used for developing a client of a C/S mode system, wherein a Java Swing development client program is used for carrying out communication interaction, developing Java Swing and local database operation and developing Java Swing and local operating system interaction operation in the client program respectively, a Web program is developed, the Web program is deployed to a server and operated, jxBrowser is loaded into a Web program for linking, jxBrowser and Java Swing interaction operation is developed, java Swing and local database operation and Java Swing and local operating system interaction operation and S4 are combined to form an integral debugging operation program, and a development program is used for checking whether Windows and Linux program packages in development engineering are complete or not and selecting target client operating system types. The invention solves the problem of adapting domestic safe and reliable computer software and hardware, does not need to modify business logic programs, directly generates domestic safe and reliable computer desktop application programs through generating programs, and has diversified communication modes and high system safety.
Inventors
- Tan Yanqiang
- LONG ZHIJIAN
- TAN GUANG
- Zhou Shangmiao
- LIU LANG
- LONG YI
Assignees
- 湖南科大天河通信股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20230223
Claims (1)
- 1. A development method of a cross-platform desktop application program is characterized by comprising the following steps: s1, a client side of a C/S mode system to be developed; S2.1, developing a client program by Java Swing based on the S1, and respectively embedding JxBrowser in the client program to perform communication interaction, develop Java Swing and local database operation and develop Java Swing and local operating system interaction operation; s2.2, developing a Web program based on the S1, deploying the Web program to a server and running the Web program; s3, loading JxBrowser in the S2.1 into the Web program link of the S2.2; s4, developing JxBrowser and Java Swing interaction operation based on the S3; S5, combining the operation of developing Java Swing and a local database in the S2.1, the interactive operation of developing Java Swing and a local operating system with the S4 to obtain an integral debugging running program; S6, checking whether Windows and Linux program packages in development engineering are complete or not based on the S5 to-be-developed program, and selecting a target client operating system type; S7.1, based on S6, if the class of the target client operating system selects Windows, developing an IDE automatic generation program, copying a program package applicable to Windows into a target directory, copying the generated Windows client program to a computer with a Windows operating system for running, and completing development of an application program; S7.2, based on S6, if the class of the target client operating system selects Linux, developing IDE automatically generates a program and copies a program package applicable to Linux into the target directory, copying the generated Linux client program to a computer with the Linux operating system for running, and completing the development of the application program; The operation of embedding JxBrowser in the client program for communication interaction in the step S2.1 at least comprises the steps of obtaining or setting a form element value in a Web page, interoperating the client Java program with a browser JavaScript, and pushing a client message to a browser; The step S2.1 of developing the interactive operation of Java Swing and a local operating system at least comprises the steps of reading and storing a local file, configuring or reading a dongle/encryption chip, cleaning a browser cache, managing a browser process and monitoring local system parameters; in the step S2.1, the operation of developing the Java Swing and the local database is performed by setting an adaptation development flow of the local database, and the adaptation development flow of the local database comprises the following steps: S2.1.1, analyzing software development requirements and preparing a design relation database table; s2.1.2, defining database fields by adopting basic data types; S2.1.3, developing, adding, deleting, checking or checking data in the same-level database, and judging whether the data can be realized by using standard SQL sentences; S2.1.4, if the implementation can be realized by adopting a standard SQL statement, adopting the standard SQL statement to write a database business logic code, and calling the execution result of the standard SQL statement in the Java program; if the standard SQL statement can not be adopted, the standard SQL statement is adopted to find out a required data table, the execution result of the standard SQL statement is called in the Java program, and business logic which can not be realized by the standard SQL statement is written in the Java program; S2.1.5, merging and running in software and testing the business logic to ensure that the business logic is realized.
Description
Cross-platform desktop application development method Technical Field The invention relates to the technical field of computer programs, in particular to a development method of a cross-platform desktop application program. Background In the prior art, the best development mode for solving the problem of cross-platform is a B/S mode, namely a browser-to-server mode, is irrelevant to the platform of a client, can realize the independence of a client operating system as long as the client supports the installation of the browser with a specified framework, and only needs to be deployed to a server program according to a Web development technology development program. Different browsers and different versions of the same browser have slight differences when displayed on a UI interface, so that some finely displayed interfaces can be disordered, but the slight differences can be completely ignored for business systems or portal sites of large departments, or developers consider the slight differences when designing, so that different browsers or different versions are completely consistent in display. In the field of information application related to civil security, in order to use a private communication system and a communication protocol, embody the strict UI structure of a system and the screen projection display of various command hall big screens (such as a civil air defense alarm issuing system), a C/S structure is required to be adopted, namely an independent client independent desktop application program is required to be directly clicked for use. The desktop application program is closely related to the type and version of the operating system of the client computer, so as to adapt to various operating systems and versions, different desktop application programs are respectively developed, and particularly, some UI interfaces are complex programs, and the development workload is increased by times. In the prior art, domestic safe and reliable computer equipment is a domestic operating system with a Linux kernel, the chip kernel of the product is an ARM framework, but the environment supported by many existing application and management software is Windows series computer goods, the chip kernel of the product is an X86/X64 framework, and the product cannot be operated when being directly installed on the environment of the domestic operating system and the domestic CPU, so that the product is inconvenient. Disclosure of Invention In order to solve the technical problems, the invention provides a development method of a cross-platform desktop application program, which embeds a browser into the desktop application program of a client through Java Swing development, displays a content display part of the browser in a full screen manner in the desktop application program, and hides tool bars such as navigation and the like to serve as a hidden browser. In order to achieve the above purpose, the present invention adopts the following technical scheme: A development method of a cross-platform desktop application program comprises the following steps: s1, a client side of a C/S mode system to be developed; S2.1, developing a client program by Java Swing based on the S1, and respectively embedding JxBrowser in the client program to perform communication interaction, develop Java Swing and local database operation and develop Java Swing and local operating system interaction operation; s2.2, developing a Web program based on the S1, deploying the Web program to a server and running the Web program; s3, loading JxBrowser in the S2.1 into the Web program link of the S2.2; s4, developing JxBrowser and Java Swing interaction operation based on the S3; S5, combining the operation of developing Java Swing and a local database in the S2.1, the interactive operation of developing Java Swing and a local operating system with the S4 to obtain an integral debugging running program; S6, checking whether Windows and Linux program packages in development engineering are complete or not based on the S5 to-be-developed program, and selecting a target client operating system type; s7.1, based on the S6, if the class of the target client operating system selects Windows, executing a Windows client program generation instruction, and running the generated program on the Windows client; And S7.2, based on the step S6, if the class of the target client operating system selects Linux, executing a Linux client program generation instruction, and running the generated program on the Linux client. Preferably, in the developing Java Swing and the local database operation in step S2.1, the local database adaptation development process is set, and the local database adaptation development process includes the following steps: S2.1.1, analyzing software development requirements and preparing a design relation database table; s2.1.2, defining database fields by adopting basic data types, and avoiding adopting proprietary data types of cer