CN113419712A - Cross-platform application generation method, cross-platform application calling method and development device - Google Patents

Cross-platform application generation method, cross-platform application calling method and development device Download PDF

Info

Publication number
CN113419712A
CN113419712A CN202110735609.3A CN202110735609A CN113419712A CN 113419712 A CN113419712 A CN 113419712A CN 202110735609 A CN202110735609 A CN 202110735609A CN 113419712 A CN113419712 A CN 113419712A
Authority
CN
China
Prior art keywords
layer
platform
cross
api
platforms
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110735609.3A
Other languages
Chinese (zh)
Inventor
张哲�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202110735609.3A priority Critical patent/CN113419712A/en
Publication of CN113419712A publication Critical patent/CN113419712A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/545Interprogram communication where tasks reside in different layers, e.g. user- and kernel-space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a cross-platform application generation method, a cross-platform application calling method and a development device. In a specific embodiment, the application generation method includes: generating a view logic layer based on a cross-platform technology stack; establishing an API layer based on the attributes of a plurality of platforms, wherein the API layer comprises a general interface layer and an extended interface layer, the general interface layer is used for carrying out information interaction with the view logic layer, and the extended interface layer is used for carrying out information interaction with each platform respectively; and packaging the view logic layer and the API layer to form the cross-platform application. The implementation method is based on a cross-platform technology stack development view logic layer and establishes an API layer based on a plurality of platform attributes, so that cross-platform application capable of meeting cross-platform interaction is realized.

Description

Cross-platform application generation method, cross-platform application calling method and development device
Technical Field
The invention relates to the technical field of software. And more particularly, to a cross-platform application generation method, a cross-platform application calling method, and a development apparatus.
Background
With the rise of cross-platform technologies, cross-platform solutions represented by Flutter, React nature, Weexs, and the like, are receiving more and more attention and use in the industry. How to ensure the consistency of multi-end experience in a multi-form service scene is a direction which is concerned by the front-end technical field.
However, in many application scenarios, development of various different platforms requires development tools, development languages, and corresponding development environments and tools of different platforms, it is difficult for multiple platforms and the same application to ensure consistent experience of multiple ends, and meanwhile, different platforms correspond to different development technology stacks, and developers at each end cannot reuse the development tools and can only do development work based on the local end technology stack, so that there is no way to achieve maximum utilization rate and efficiency in terms of manpower and research and development efficiency.
Disclosure of Invention
The present invention aims to provide a solution to at least one of the problems of the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme:
the invention provides a cross-platform application generation method, which comprises the following steps:
generating a view logic layer based on a cross-platform technology stack;
establishing an API layer based on the attributes of a plurality of platforms, wherein the API layer comprises a general interface layer and an extended interface layer, the general interface layer is used for carrying out information interaction with the view logic layer, and the extended interface layer is used for carrying out information interaction with each platform respectively;
and packaging the view logic layer and the API layer to form the cross-platform application.
In some alternative embodiments, the cross-platform technology stack is Flutter, and the plurality of platforms includes at least two of IOS, Android, Web, Windows, macOS, and Linux.
In some optional embodiments, generating the view logic layer based on the cross-platform technology further comprises:
modular code is created based on cross-platform technology, the modular code including regular data packages provided across a platform technology stack and plug-in data packages applied to multiple platforms.
In some alternative embodiments, a common interface layer is used to define common interaction behavior of multiple platforms with the view logic layer.
In some optional embodiments, establishing the API layer based on the attributes of the plurality of platforms further comprises: and establishing a public logic processing layer for respectively establishing private interaction functions corresponding to the plurality of platforms according to the public interaction behavior and carrying out information interaction with the expansion interface layer by utilizing the private interaction functions.
In some optional embodiments, the expansion interface layer comprises plug-in interfaces corresponding to a plurality of platforms, and the plug-in interfaces are used for information interaction with the platforms to which the plug-in interfaces belong.
A second aspect of the present invention provides a method for calling a cross-platform application generated above, which is applied to a terminal, and includes:
responding to the operation of starting the host by the user to acquire the type parameter of the platform loaded with the host;
the method comprises the steps that communication is carried out between a host and an API layer of cross-platform application in a server according to encapsulation of the host, and an information calling request is sent to the API layer, wherein the information calling request comprises type parameters, the API layer comprises a universal interface layer and an expansion interface layer, the universal interface layer is used for carrying out information interaction with a view logic layer, and the expansion interface layer is used for carrying out information interaction with each platform;
receiving modular code created in a view logic layer in a server from an API layer; and
and the host loads the modular codes to realize information calling.
In some optional embodiments, communicating with the API layer of the cross-platform application in the server according to the hosted package further comprises:
in some optional embodiments, the API layer further includes a common logic processing layer, and receiving modular code created in the view logic layer in the server from the API layer further includes:
and respectively establishing private interactive functions corresponding to the plurality of platforms according to the public interactive behaviors, and carrying out information interaction with the expansion interface layer by utilizing the private interactive functions.
A third aspect of the present invention provides a device for developing a cross-platform application, including:
a view logic layer generation unit configured to generate a view logic layer based on a cross-platform technology stack;
the system comprises an API layer generating unit, a view logic layer generating unit and an API layer generating unit, wherein the API layer generating unit is configured to establish an API layer based on attributes of a plurality of platforms, the API layer comprises a general interface layer and an expansion interface layer, the general interface layer is used for carrying out information interaction with the view logic layer, and the expansion interface layer is used for carrying out information interaction with each platform respectively; and
and the packaging unit is used for packaging the view logic layer and the API layer to form the cross-platform application.
A fourth aspect of the present invention provides a computer device comprising:
one or more processors;
a storage device on which one or more programs are stored;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the application generation method described above.
A fifth aspect of the invention provides a computer readable storage medium having stored thereon a computer program, wherein the program, when executed by a processor, implements an application generation method as described above.
The invention has the following beneficial effects:
aiming at the existing problems, the invention sets a cross-platform application generation method, a cross-platform application calling method, a development device, computer equipment and a computer readable storage medium, develops a view logic layer based on a cross-platform technology stack, establishes an API layer based on a plurality of platform attributes, and sets the API layer to comprise a general interface layer for performing information interaction with the view logic layer and an expansion interface layer for performing information interaction with each platform respectively, so that cross-platform application meeting the cross-platform interaction can be generated, thereby truly realizing 'Write Once and Run AnyWhere' (Write Once and available everywhere), enabling developers to realize multi-end multiplexing, reducing labor cost, improving application development efficiency and having wide application prospect.
Drawings
The following describes embodiments of the present invention in further detail with reference to the accompanying drawings.
FIG. 1 shows a schematic flow diagram of a cross-platform application generation method according to one embodiment of the present invention.
FIG. 2 illustrates an exemplary hardware system block diagram to which the application generation method or calling method of the present invention may be applied.
FIG. 3 illustrates a functional framework diagram of a cross-platform application developed according to an embodiment of the present invention.
FIG. 4 shows a schematic flow diagram of a method for invoking a cross-platform application generated by the present invention, according to an embodiment of the present invention.
FIG. 5 illustrates a schematic block diagram of a calling process for a cross-platform application generated using the present invention, according to an embodiment of the present invention.
FIG. 6 shows a schematic block diagram of a development apparatus for a cross-platform application according to an embodiment of the present invention.
Fig. 7 is a schematic structural diagram of a computer device according to another embodiment of the present invention.
Detailed Description
In order to more clearly illustrate the present invention, the present invention will be further described with reference to the following examples and the accompanying drawings. Similar parts in the figures are denoted by the same reference numerals. It is to be understood by persons skilled in the art that the following detailed description is illustrative and not restrictive, and is not to be taken as limiting the scope of the invention.
In order to solve one of the above problems, as shown in fig. 1, an embodiment of the present invention provides a cross-platform application generation method, including:
s101, generating a view logic layer based on a cross-platform technology stack;
s102, establishing an API layer based on attributes of a plurality of platforms, wherein the API layer comprises a general interface layer and an expansion interface layer, the general interface layer is used for carrying out information interaction with a view logic layer, and the expansion interface layer is used for carrying out information interaction with each platform respectively;
s103, packaging the view logic layer and the API layer to form the cross-platform application.
In this embodiment, a view logic layer is developed based on a cross-platform technology stack, an API layer is established based on a plurality of platform attributes, and the API layer is set to include a general interface layer for performing information interaction with the view logic layer and an extended interface layer for performing information interaction with each platform, respectively, so that a cross-platform application satisfying the cross-platform interaction can be generated, and thus, "Write Once and Run AnyWhere" is really realized can be realized, so that developers can realize multi-terminal multiplexing, thereby reducing labor cost, improving development efficiency of applications, and having a wide application prospect.
For a further understanding of the invention, the method and apparatus of the invention are described in detail below with reference to specific examples.
As shown in FIG. 2, there is shown a block diagram of an exemplary hardware system to which the application generation method or calling method of the present invention may be applied. The hardware system includes a server 100, a network 200, and a terminal device 300. The network 200 is a medium to provide a communication link between the server 100 and the terminal device 300. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The terminal device 300 may be installed with hosts of various applications, such as a web browser application, a video application, a content sharing application, a social application, and the like. Applications include applications suitable for various platforms, such as IOS, Android, Web, Windows, macOS, Linux, hong meng, etc., and hosts for applications may be Application (APP) shells downloaded from various applications, such as application stores, and in particular for Web platforms, hosts for applications are shells for Web applications based on Web browsers. The host typically includes a package of applications and a localized plug-in library, where the package includes routing channels, e.g., Methchannel, Flutter Web Pluin class, etc., that interact with the cross-platform applications stored in the server 100.
The terminal device 300 is various electronic devices receiving user operations, including but not limited to a desktop, a tablet computer, a notebook computer, and the like, and various systems such as IOS, Android, Windows, macOS, Linux, and hongmeng may be loaded on the terminal device 300. The terminal device 300 may interact with the server 100 through the network 200 to receive or transmit messages or the like.
The server 100 may be a background server supporting the hosting of applications installed on the terminal device 300. The server 100 may call a prestored application based on communication with the terminal device 300; and then the Application Programming Interface (API) based on the application issues the modular codes in the cross-platform application to the terminal equipment 200 to realize the dynamic calling of the application. In the embodiment of the present invention, the application stored in the server 100 in advance is a cross-platform application, that is, a cross-platform application that can be run by multiple platforms after being developed by a developer at one time.
The server 100 may also be a local server equipped with a development device such as a desktop, tablet, or notebook computer using a cross-platform service and a compiler. The cross-platform application generated by the development device can communicate with the terminal device 300 based on the network 200, so that the dynamic calling is realized.
The cross-platform application development method according to the embodiment of the present invention is described below with reference to specific embodiments.
In a specific example, referring to fig. 1 and 2, in step S101, a view logic layer is generated based on a cross-platform technology stack. In the embodiment of the invention, the cross-platform technology stack can be a technology stack of various platforms, such as Flutter, React Native, Weexs, and the like, as long as a set of technology stacks is satisfied to complete the development of the view logic layer. Among them, Flutter is a cross-screen mobile development framework, and the development language adopts Dart, because Dart supports AOT (Ahead-of-Time compilation) and JIT (Just in Time compilation) at the same Time, Flutter inherently supports dynamism, and therefore, it is preferable to select a logical layer of view generated based on Flutter.
In step S101, generating the view logic layer based on the cross-platform technology further includes: modular code is created. Specifically, when the cross-platform technology stack generating the view logic layer is flute, the modular codes are all written in Dart language, and include a regular data Package (Dart Package) provided by the cross-platform technology stack and a plug-in data Package (plug-in Package) applied to the multiple platforms.
The conventional data packet may contain specific functions depending on the Flutter framework, such as a User Interface (UI), an Icon (Icon), and the like depending on the Flutter framework, and the use range of the conventional data packet is limited to Flutter. The plug-in package may be written for Android (platform using Kotlin or Java), iOS (platform using Swift or Objective-C), Web, macOS, Windows, and Linux, or at least two platforms in any combination. In other words, with a cross-platform technology stack, such as Flutter, in generating the view logic layer, a data packet is created for multiple platforms to be applied that will be used for the dynamic invocation.
In step S102, an API layer is established based on the attributes of the plurality of platforms, the API layer including a generic interface layer and an extended interface layer. The plurality of platforms includes at least two of IOS, Android, Web, Windows, macOS, and Linux. Of course the above platforms are not exhaustive and the invention is not limited thereto, other platforms are also suitable, for example a grand meng may be included.
As shown in fig. 3, the generic interface layer is used for information interaction with the view logic layer. In particular, the generic interface layer is used to define common interaction behavior of multiple platforms with the view logic layer. That is, the actions of each platform are specified in a defined form to ensure the uniformity of the operation of multiple platforms. Specifically, when a general structural layer is formed, only the definitions of public interaction behaviors such as picture processing behavior, page jump behavior, scene conversion behavior and the like are given
Through the setting, for implementation scenes which cannot be aligned among all platforms, for example, a Web platform and Android and IOS platforms have different implementation modes on routing, the Android and IOS platforms form routing channels through registering MethChanel, and realize data packet transmission in Json language specific to the platforms, the Web platform utilizes a Flutter Web plug class written in an official specified form (Federated plug) to carry out routing, and realizes data packet transmission through Dart Libary or Package, or under the condition that existing ready-made available JS SDK or JS implementation function needs to be largely used, an official provides Package, and the JS Package calls Javascript, so that interaction with Javascript is realized; through the universal interface layer, specific implementation is not restricted any more, and only definition exists, so that interaction with the view logic layer can be realized through uniform API network requests.
Continuing to refer to fig. 3, the extended interface layer is configured to perform information interaction with each platform, and includes plug-in interfaces corresponding to the multiple platforms, specifically, the plug-in interfaces are configured to perform information interaction with the platforms to which the plug-in interfaces belong. Namely, the interactive docking with the corresponding platforms is directly completed through the expansion interface.
In particular, even general-purpose functions may have limitations in specific implementations for each platform. For example, an application gesture, an up-down downloading or down-down refreshing gesture, may be implemented at a mobile phone end of the IOS or Android platform, but does not have a gesture concept at the Web platform, and more mouse operations, such as dragging, pulling, and dragging, different from those of the IOS or Android platform occur at the Web platform. The above function differences may all correspond to common behavior definitions of page jump or scene transition of the universal interface layer, and therefore, the common behavior of the universal interface layer interacting externally is docked to the corresponding platform for expansion implementation by expanding the interface layer.
However, in consideration of the extensibility of the interface interaction type, in order to handle the common logic in the dependency, inherit and implement the interaction behavior of the view logic layer for the difference of each platform, in the embodiment of the present invention, the establishing the API layer based on the attributes of the multiple platforms further includes: and establishing a public logic processing layer, wherein the public logic processing layer is used for respectively establishing private interaction functions corresponding to the plurality of platforms according to the public interaction behavior and carrying out information interaction with the expansion interface layer by utilizing the private interaction functions. The common logic processing layer is realized based on each platform, and the extension of the extension interface layer corresponding to each platform at the lower layer of the API layer is realized based on the common logic layer.
Specifically, taking Flutter as an example, the basic dependencies in Flutter are all developed and maintained in the form of plug-in, and in terms of architecture, a generic interface layer provided for the plug-in API layer and finally exposed to a developer, and in terms of detailed implementation, a common logic processing layer is used to handle differences between respective various dependencies of various platforms.
In one aspect, there are scenarios between multiple platforms that can be aligned between the platforms. Such as a buried point library. The buried point library comprises log dotting, log statistics and the like. The embedded point library uses SDK provided uniformly no matter in IOS, Android, Windows, macOS, Linux platform or Web platform, and has natural consistency in API layer design, so that all interfaces can be directly aligned in the extended interface layer, and only compatible processing is needed in the common logic processing layer.
On the other hand, there are scenes that cannot be aligned between multiple platforms. Such as a routing library. As described above, the Web platform and the Android and IOS platform have different implementation manners in routing, different routing channels, and different data packets for transferring data. In Android or IOS (input/output system) terminal system platforms, a routing library is a set of brand-new routing system maintained by the platforms at the bottom layer, and a strong customized function is provided by depending on native support. The Web platform and the platforms can not support hundreds of percent at a native implementation layer, for the scene which can not be aligned like a routing library, the external alignment is carried out through an upper layer general interface layer, and for the Web platform, the expansion is finished by using a pure Dart language by virtue of Flutterer Navigator, Dart and html in a public logic processing layer, and when the platform is called at the later stage, the modular code is issued by a corresponding expansion interface layer which is downward from the public logic layer. The logic is similar for other unaligned scenes, and at a common logic processing layer, the embodiment of the invention provides a default inheritance interface to realize the modification of the default logic, thereby providing a flexible extension space.
In step S103, the view logic layer and the API layer are packaged to form a cross-platform application. Specifically, the cross-platform application formed by packaging is a cross-platform application which can be simultaneously realized on a plurality of platforms, that is, a dynamic application framework which can be dynamically called with each platform.
Through the arrangement of the invention, the view logic layer at the upper layer is generated by a set of cross-platform technology stack, the API layer is designed, various public behaviors in the view logic layer are uniformly defined through the universal interface layer at the API layer, and the platforms are butted by the expansion interface layer at the lower layer, so that the behavior expansion aiming at a plurality of platforms is realized, the interaction with the view logic layer can be completed at the upper layer, the interaction with various platforms can be completed at the lower layer, and the real Write one & Run AnyWhere is realized.
Correspondingly, referring to fig. 4 and 5, an embodiment of the present invention further provides a method for calling a cross-platform application generated by the above method, which is applied to a terminal, and includes:
s401, responding to the operation that the user starts the host to acquire the type parameter of the platform loaded with the host,
specifically, in step S401, the operation of starting the host may be that the user using the terminal clicks on the host with the application installed, and starts the host by inputting a user name or a password. The host comprises an encapsulated and localized plug-in library of the application, and the type parameter of the platform comprises information indicating the type of the platform;
s402, according to encapsulation of a host, communicating with an API layer of cross-platform application in a server, and sending an information calling request to the API layer, wherein the information calling request comprises type parameters, the API layer comprises a general interface layer and an expansion interface layer, the general interface layer is used for carrying out information interaction with a view logic layer, the expansion interface layer is used for carrying out information interaction with each platform respectively,
specifically, the common behavior is defined and interacted with the view logic layer through a universal interface layer in the API layer, each platform is butted through an expansion interface layer at the lower layer, behavior expansion aiming at a plurality of platforms is realized, and therefore interaction with the view logic layer can be completed;
s403, receiving the modular code created in the view logic layer in the server from the API layer, that is, issuing the modular code created in the view logic layer through the API layer,
more specifically, the API layer further includes a public logic processing layer, and the receiving, by the API layer, the modular code created in the view logic layer in the server further includes respectively creating private interactive functions corresponding to the plurality of platforms according to the public interactive behavior, and performing information interaction with the extended interface layer using the private interactive functions, thereby completing the issuing of the modular code; and
s404, the host loads the modular codes to realize information calling.
Through the arrangement, the view logic layer developed based on the cross-platform technology stack and the API layer established based on the plurality of platform attributes are arranged, wherein the API layer comprises a general interface layer used for carrying out information interaction with the view logic layer and an extended interface layer used for carrying out information interaction with each platform respectively, dynamic calling between various platforms on a local terminal and cross-platform application on a server can be achieved, and therefore the true Write Once and Run AnyWhere (available everywhere) is achieved, developers can achieve multi-terminal multiplexing, labor cost is reduced, application development efficiency is improved, and the multi-terminal multi-platform multi-application platform has a wide application prospect.
Based on the same inventive concept, referring to fig. 6, an embodiment of the present invention further provides a development apparatus for cross-platform application, including:
a view logic layer generation unit configured to generate a view logic layer based on a cross-platform technology stack;
the system comprises an API layer generating unit, a view logic layer generating unit and an API layer generating unit, wherein the API layer generating unit is configured to establish an API layer based on attributes of a plurality of platforms, the API layer comprises a general interface layer and an expansion interface layer, the general interface layer is used for carrying out information interaction with the view logic layer, and the expansion interface layer is used for carrying out information interaction with each platform respectively; and
and the packing unit is used for packing the view logic layer and the API layer to form the cross-platform application.
Through the arrangement, the view logic layer is developed based on the cross-platform technology stack through the view logic layer generating unit, the API layer generating unit is arranged to establish the API layer based on the attributes of the platforms, the API layer comprises a general interface layer used for information interaction with the view logic layer and an extended interface layer used for information interaction with each platform, and cross-platform application meeting the cross-platform interaction can be generated, so that Write Once and Run AnyWhere (available everywhere) can be really realized, developers can realize multi-terminal multiplexing, labor cost is reduced, development efficiency of applications is improved, and the application prospect is wide.
Another embodiment of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements: generating a view logic layer based on a cross-platform technology stack; establishing an API layer based on the attributes of a plurality of platforms, wherein the API layer comprises a general interface layer and an extended interface layer, the general interface layer is used for carrying out information interaction with the view logic layer, and the extended interface layer is used for carrying out information interaction with each platform respectively; and packaging the view logic layer and the API layer to form the cross-platform application.
In practice, the computer-readable storage medium may take any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present embodiment, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
As shown in fig. 7, another embodiment of the present invention provides a schematic structural diagram of a computer device. The computer device 12 shown in fig. 7 is only an example and should not bring any limitations to the functionality or scope of use of the embodiments of the present invention.
As shown in FIG. 7, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 7, and commonly referred to as a "hard drive"). Although not shown in FIG. 7, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with computer device 12, and/or with any devices (e.g., network card, modem, etc.) that enable computer device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, computer device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via network adapter 20. As shown in FIG. 7, the network adapter 20 communicates with the other modules of the computer device 12 via the bus 18. It should be appreciated that although not shown in FIG. 7, other hardware and/or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processor unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, to implement a cross-platform application generation method provided by an embodiment of the present invention.
It should be noted that, the order of the steps of the gaze tracking method provided in the embodiment of the present invention may be properly expressed, and the steps may be increased or decreased according to the situation, and any method that can be easily changed within the technical scope disclosed by the present disclosure by a person skilled in the art should be covered in the protection scope of the present invention, and therefore, the detailed description is omitted.
Aiming at the existing problems, the invention sets a cross-platform application generation method, a cross-platform application calling method, a development device, computer equipment and a computer readable storage medium, develops a view logic layer based on a cross-platform technology stack, establishes an API layer based on a plurality of platform attributes, and sets the API layer to comprise a general interface layer for performing information interaction with the view logic layer and an expansion interface layer for performing information interaction with each platform respectively, so that cross-platform application meeting the cross-platform interaction can be generated, thereby truly realizing 'Write Once and Run AnyWhere' (Write Once and available everywhere), enabling developers to realize multi-end multiplexing, reducing labor cost, improving application development efficiency and having wide application prospect.
It should be understood that the above-mentioned embodiments of the present invention are only examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention, and it will be obvious to those skilled in the art that other variations and modifications can be made on the basis of the above description, and all embodiments cannot be exhaustive, and all obvious variations and modifications belonging to the technical scheme of the present invention are within the protection scope of the present invention.

Claims (11)

1. A cross-platform application generation method is characterized by comprising the following steps:
generating a view logic layer based on a cross-platform technology stack;
establishing an API layer based on the attributes of a plurality of platforms, wherein the API layer comprises a general interface layer and an extended interface layer, the general interface layer is used for carrying out information interaction with the view logic layer, and the extended interface layer is used for carrying out information interaction with each platform respectively;
and packaging the view logic layer and the API layer to form a cross-platform application.
2. The application generation method of claim 1, wherein the cross-platform technology stack is Flutter, and the plurality of platforms include at least two of IOS, Android, Web, Windows, macOS, and Linux.
3. The application generation method of claim 2, wherein the generating a view logic layer based on a cross-platform technology further comprises:
creating modular code based on cross-platform technology, the modular code including regular data packages provided by the cross-platform technology stack and plug-in data packages applied to the plurality of platforms.
4. The application generation method of claim 1, wherein the generic interface layer is configured to define common interaction behavior of the plurality of platforms with the view logic layer.
5. The application generation method of claim 4, wherein establishing the API layer based on the attributes of the plurality of platforms further comprises: and establishing a public logic processing layer for respectively establishing private interaction functions corresponding to the plurality of platforms according to the public interaction behaviors and carrying out information interaction with the expansion interface layer by utilizing the private interaction functions.
6. The application generation method of claim 1, wherein the extended interface layer comprises plug-in interfaces corresponding to the plurality of platforms, and the plug-in interfaces are used for information interaction with the platforms to which the plug-in interfaces belong.
7. A method for calling a cross-platform application generated by claims 1-6, applied to a terminal, comprising:
responding to the operation of starting the host by the user to acquire the type parameter of the platform loaded with the host;
communicating with an API layer of a cross-platform application in a server according to the encapsulation of the host, and sending an information calling request to the API layer, wherein the information calling request comprises the type parameter, the API layer comprises a general interface layer and an expansion interface layer, the general interface layer is used for carrying out information interaction with the view logic layer, and the expansion interface layer is used for carrying out information interaction with each platform respectively;
receiving modular code created in a view logic layer in the server from the API layer; and
and the host loads the modular codes to realize information calling.
8. The calling method of claim 7, wherein the API layer further comprises a common logical processing layer, and wherein receiving modular code created in the view logical layer in the server from the API layer further comprises:
and respectively establishing private interactive functions corresponding to the plurality of platforms according to the public interactive behaviors, and carrying out information interaction with the extended interface layer by utilizing the private interactive functions.
9. An apparatus for developing a cross-platform application, comprising:
a view logic layer generation unit configured to generate a view logic layer based on a cross-platform technology stack;
the system comprises an API layer generating unit, a view logic layer generating unit and a view logic layer generating unit, wherein the API layer generating unit is configured to establish an API layer based on attributes of a plurality of platforms, the API layer comprises a general interface layer and an extended interface layer, the general interface layer is used for carrying out information interaction with the view logic layer, and the extended interface layer is used for carrying out information interaction with each platform respectively; and
and the packaging unit is used for packaging the view logic layer and the API layer to form cross-platform application.
10. A computer device, comprising:
one or more processors;
a storage device on which one or more programs are stored;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the application generation method of any of claims 1-6.
11. A computer-readable storage medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the application generation method of any one of claims 1 to 6.
CN202110735609.3A 2021-06-30 2021-06-30 Cross-platform application generation method, cross-platform application calling method and development device Pending CN113419712A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110735609.3A CN113419712A (en) 2021-06-30 2021-06-30 Cross-platform application generation method, cross-platform application calling method and development device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110735609.3A CN113419712A (en) 2021-06-30 2021-06-30 Cross-platform application generation method, cross-platform application calling method and development device

Publications (1)

Publication Number Publication Date
CN113419712A true CN113419712A (en) 2021-09-21

Family

ID=77717266

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110735609.3A Pending CN113419712A (en) 2021-06-30 2021-06-30 Cross-platform application generation method, cross-platform application calling method and development device

Country Status (1)

Country Link
CN (1) CN113419712A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023092292A1 (en) * 2021-11-23 2023-06-01 京东方科技集团股份有限公司 Communication method for flutter web application and host program, and computer device
CN116795356A (en) * 2023-08-21 2023-09-22 山东为农信息科技有限公司 Mixed development method, system and device for Flutter and native platform

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020099863A1 (en) * 2000-06-02 2002-07-25 Guillaume Comeau Software support layer for processors executing interpreted language applications
US20030182461A1 (en) * 2002-03-21 2003-09-25 Stelting Stephen A. Service mapping method of enterprise application modeling and development for multi-tier service environments
KR20100100685A (en) * 2009-03-05 2010-09-15 주식회사 코아로직 Interface apparatus for communication between processors and communication system
CN104834519A (en) * 2015-04-04 2015-08-12 杭州中焯信息技术股份有限公司 Cross-platform application software development system
CN106990966A (en) * 2017-03-31 2017-07-28 中国科学技术大学苏州研究院 Mobile terminal cross-platform Development Framework and development approach based on front end frame
US9846682B1 (en) * 2013-11-25 2017-12-19 Amazon Technologies, Inc. Cross-platform presentation of digital content
CN107908426A (en) * 2017-12-21 2018-04-13 江苏国泰新点软件有限公司 Design method, device, mobile terminal and the storage medium of cross-platform program
US20200159220A1 (en) * 2018-11-15 2020-05-21 Raven Industries, Inc. Integrated platform and common software structural architecture for autonomous agricultural vehicle and machinery operation

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020099863A1 (en) * 2000-06-02 2002-07-25 Guillaume Comeau Software support layer for processors executing interpreted language applications
US20030182461A1 (en) * 2002-03-21 2003-09-25 Stelting Stephen A. Service mapping method of enterprise application modeling and development for multi-tier service environments
KR20100100685A (en) * 2009-03-05 2010-09-15 주식회사 코아로직 Interface apparatus for communication between processors and communication system
US9846682B1 (en) * 2013-11-25 2017-12-19 Amazon Technologies, Inc. Cross-platform presentation of digital content
CN104834519A (en) * 2015-04-04 2015-08-12 杭州中焯信息技术股份有限公司 Cross-platform application software development system
CN106990966A (en) * 2017-03-31 2017-07-28 中国科学技术大学苏州研究院 Mobile terminal cross-platform Development Framework and development approach based on front end frame
CN107908426A (en) * 2017-12-21 2018-04-13 江苏国泰新点软件有限公司 Design method, device, mobile terminal and the storage medium of cross-platform program
US20200159220A1 (en) * 2018-11-15 2020-05-21 Raven Industries, Inc. Integrated platform and common software structural architecture for autonomous agricultural vehicle and machinery operation

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023092292A1 (en) * 2021-11-23 2023-06-01 京东方科技集团股份有限公司 Communication method for flutter web application and host program, and computer device
CN116795356A (en) * 2023-08-21 2023-09-22 山东为农信息科技有限公司 Mixed development method, system and device for Flutter and native platform
CN116795356B (en) * 2023-08-21 2023-11-24 山东为农信息科技有限公司 Mixed development method, system and device for Flutter and native platform

Similar Documents

Publication Publication Date Title
CN109032706B (en) Intelligent contract execution method, device, equipment and storage medium
CN106462407B (en) Code services for language independent scheduling
CN111176626B (en) Cross-programming-language code calling method and device, medium and equipment
CN111158818A (en) Page rendering method and device
CN111338623B (en) Method, device, medium and electronic equipment for developing user interface
CN111740948B (en) Data packet issuing method, dynamic updating method, device, equipment and medium
CN111581555B (en) Document loading method, device, equipment and storage medium
CN113419712A (en) Cross-platform application generation method, cross-platform application calling method and development device
CN111026439B (en) Application program compatibility method, device, equipment and computer storage medium
CN113127361B (en) Application development method and device, electronic equipment and storage medium
CN111857658A (en) Method, device, medium and electronic equipment for rendering dynamic component
CN103443763A (en) ISA bridging including support for call to overidding virtual functions
CN113918195A (en) Application interface updating method and device, electronic equipment and readable storage medium
CN104025046A (en) Isa bridging with callback
CN110888639A (en) Business code compiling and packaging method and device
CN112835615B (en) Plug-in processing method and device for software development kit and electronic equipment
WO2023083071A1 (en) View interaction method and apparatus, electronic device, and computer readable medium
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN108667902B (en) Remote control system, method, device and equipment of iOS equipment
CN112162755B (en) Data processing method, device, medium and electronic equipment
CN114547604A (en) Application detection method and device, storage medium and electronic equipment
CN111782196A (en) MVP architecture-based development method and device
CN110908711A (en) Control development method and device of application program and electronic equipment
CN112612531A (en) Application program starting method and device, electronic equipment and storage medium
US11768667B2 (en) Compiling method, compiling device, execution method, computer-readable storage medium and computer device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination