CN115858007A - Loading method and device of extension assembly, storage medium and electronic device - Google Patents

Loading method and device of extension assembly, storage medium and electronic device Download PDF

Info

Publication number
CN115858007A
CN115858007A CN202211564032.5A CN202211564032A CN115858007A CN 115858007 A CN115858007 A CN 115858007A CN 202211564032 A CN202211564032 A CN 202211564032A CN 115858007 A CN115858007 A CN 115858007A
Authority
CN
China
Prior art keywords
file
component package
extension
extension component
dependency
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
CN202211564032.5A
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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd, Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202211564032.5A priority Critical patent/CN115858007A/en
Publication of CN115858007A publication Critical patent/CN115858007A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The application discloses a loading method and device of an extension component, a storage medium and an electronic device, and relates to the technical field of smart families, wherein the loading method of the extension component comprises the following steps: sending first request information to a component package storage, wherein the first request information is used for requesting to acquire a description file of an extension component package of a target system, a form designer runs on the target system, the extension component package is used for indicating a plurality of extension components corresponding to the target system, and the description file comprises: attribute information of the extension component package, an address of a dependency base corresponding to the extension component package, and an address of a configuration file of the extension component package; receiving first response information which is sent by a component package memory and carries a description file, and acquiring a dependent file and a configuration file of an extension component package according to the description file, wherein the dependent file is used for providing an operating environment of the extension component; a plurality of extension components are loaded to the form designer according to the dependency and configuration files.

Description

Loading method and device of extension assembly, storage medium and electronic device
Technical Field
The present application relates to the field of communications, and in particular, to a method and an apparatus for loading an extension component, a storage medium, and an electronic apparatus.
Background
The form is a common component used for information entry in front-end application development, in a business system, a large number of form items often exist in one form, and many form item components are the same.
Therefore, a form designer product appears, commonly used form item components are developed in advance and preset in the designer, the components in the component list are arranged and distributed in a visual mode through a dragging and pulling mode, relevant attributes are set, a form is generated quickly, the repeated process of manual development is omitted, and efficiency is improved. The existing form designer usually presets a part of commonly used form components for users to use, but the preset components are often difficult to meet all business requirements, and the form designer is required to support the expansion of the form components. For form components which do not exist in a form designer, the existing scheme is generally that after a new form component is developed, the new form component is directly preset in the form designer and compiled and packaged together with the form designer, or the new form component is packaged into npm packets and is compiled and packaged together after npm is introduced by the form designer.
In the existing form designer expansion component scheme, newly added expansion components are required to be introduced into a form designer to be compiled and packaged together in a compiling and packaging stage, although the expansion of a form component is realized, when the form component is newly added, the whole form designer needs to be repackaged and deployed, and the dynamic expansion cannot be realized.
Aiming at the problems that the whole form designer needs to be repackaged and deployed when a component is newly added in the related technology, an effective solution is not provided yet.
Disclosure of Invention
The embodiment of the application provides a loading method and device of an extension component, a storage medium and an electronic device, and aims to at least solve the problems that in the related art, when a component is newly added to a form designer, the whole form designer needs to be repackaged and deployed.
According to an embodiment of the present application, there is provided a method for loading an extension component, including: sending first request information to a component package storage, wherein the first request information is used for requesting to obtain a description file of an extension component package of a target system, the form designer runs on the target system, the extension component package is used for indicating a plurality of extension components corresponding to the target system, and the description file comprises: attribute information of the extension component package, an address of a dependency base corresponding to the extension component package, and an address of a configuration file of the extension component package; receiving first response information which is sent by the component package memory and carries the description file, and acquiring a dependency file and a configuration file of the extension component package according to the description file, wherein the dependency file is used for providing an operating environment of the extension component; loading the plurality of extension components to the form designer according to the dependency file and the configuration file.
In an exemplary embodiment, obtaining the dependency file and the configuration file of the extension component package according to the description file includes: sending second request information to a dependency library corresponding to the extension component package according to the address of the dependency library, and sending third request information to a component package configuration system according to the address of the configuration file of the extension component package, wherein the second request information is used for requesting to acquire the dependency file, and the third request information is used for requesting to acquire the configuration file; receiving second response information sent by the dependency library and third response information sent by the component package configuration system; and acquiring the dependency file and the configuration file according to the second response information and the third response information.
In an exemplary embodiment, obtaining the dependency file of the extension component package according to the description file includes: determining whether the form designer loads a dependency file for the extension component package; and under the condition that the dependent file of the extension component package is not loaded, acquiring the dependent file of the extension component package according to the description file.
In an exemplary embodiment, loading a plurality of extension components corresponding to the extension component package to the form designer according to the dependency file and the configuration file includes: configuring a running environment in the form designer for the plurality of extension components according to the dependency file; and performing attribute configuration on the plurality of extension components according to the configuration file so as to load the plurality of extension components to the form designer.
In one exemplary embodiment, before sending the first request information to the component package storage, the method further comprises: sending fourth request information to a dependency library corresponding to the extension component package, wherein the fourth request information is used for requesting to acquire a public dependency file of the form designer, and the public dependency file includes: the dependency file of the form engine of the form designer and the dependency file of the design engine of the form designer; and loading a form engine and a design engine of the form designer according to the public dependence file.
In one exemplary embodiment, sending the first request information to the component package storage includes: receiving the plurality of extension components sent by the target system if the target system determines the plurality of extension components, wherein the target system determines the plurality of extension components according to the following method: the target system sends request information to a component package configuration system to acquire a plurality of extension components corresponding to the target system; sending first request information to the component package memory according to the plurality of expansion components.
In one exemplary embodiment, after loading the plurality of extension components to the form designer according to the dependency file and the configuration file, the method further comprises: receiving a creation request of a target form sent by a target object; determining form components and basic controls of the target form according to the creation request; and carrying out attribute configuration and sequencing on the form components and the basic control to generate the target form.
According to another embodiment of the present application, there is also provided a loading apparatus for an extension component, including: a sending module, configured to send first request information to a component package storage, where the first request information is used to request to obtain a description file of an extension component package of a target system, where the form designer operates on the target system, the extension component package is used to indicate multiple extension components corresponding to the target system, and the description file includes: attribute information of the extension component package, an address of a dependency base corresponding to the extension component package, and an address of a configuration file of the extension component package; a receiving module, configured to receive first response information carrying the description file sent by the component package storage, acquiring a dependency file and a configuration file of the extension component package according to the description file, wherein the dependency file is used for providing an operating environment of the extension component; and the loading module is used for loading the plurality of extension components to the form designer according to the dependency file and the configuration file.
According to another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the loading method of the extension component when running.
According to another aspect of the embodiments of the present application, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the loading method of the extension component through the computer program.
In an embodiment of the present application, first request information is sent to a component package storage, where the first request information is used to request to obtain a description file of an extension component package of a target system, the form designer runs on the target system, the extension component package is used to indicate a plurality of extension components corresponding to the target system, and the description file includes: attribute information of the extension component package, an address of a dependency base corresponding to the extension component package, and an address of a configuration file of the extension component package; receiving first response information which is sent by the component package memory and carries the description file, and acquiring a dependency file and a configuration file of the extension component package according to the description file, wherein the dependency file is used for providing an operating environment of the extension component; loading the plurality of extension components to the form designer according to the dependency file and the configuration file; by adopting the technical scheme, the problems that the whole form designer needs to be repackaged and deployed when the form designer adds the components are solved, the dynamic loading of the extension components of the form designer is supported, and the extension component packages aiming at different service requirements can be dynamically loaded in the running process aiming at different service systems. And when the components are newly added, only the extension component package needs to be updated, and the whole form designer does not need to be repackaged and deployed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a hardware environment diagram of a loading method of an extension component according to an embodiment of the present application;
FIG. 2 is a flowchart of a loading method of an extension component according to an embodiment of the present application;
FIG. 3 is an architecture diagram of a loading method of an extension component according to an embodiment of the present application;
FIG. 4 is a timing diagram of a loading method of an extension component according to an embodiment of the application;
fig. 5 is a block diagram of a loading apparatus for an extension component according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to one aspect of the embodiment of the application, a loading method of an extension component is provided. The loading method of the expansion component is widely applied to full-house intelligent digital control application scenes such as Smart Home (Smart Home), smart Home equipment ecology, smart Home (Intelligent House) ecology and the like. Alternatively, in this embodiment, the loading method of the extension component may be applied to a hardware environment formed by the terminal device 102 and the server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal device 102 through a network, and may be configured to provide a service (e.g., an application service) for the terminal or a client installed on the terminal, provide a database on or independent of the server for providing a data storage service for the server 104, and configure a cloud computing and/or edge computing service on or independent of the server for providing a data operation service for the server 104.
The network may include, but is not limited to, at least one of: wired network, wireless network. The wired network may include, but is not limited to, at least one of: wide area networks, metropolitan area networks, local area networks, which may include, but are not limited to, at least one of the following: WIFI (Wireless Fidelity), bluetooth. Terminal equipment 102 can be but not limited to be PC, the cell-phone, the panel computer, intelligent air conditioner, intelligent cigarette machine, intelligent refrigerator, intelligent oven, intelligent kitchen range, intelligent washing machine, intelligent water heater, intelligent washing equipment, intelligent dish washer, intelligent projection equipment, intelligent TV, intelligent clothes hanger, intelligent (window) curtain, intelligence audio-visual, smart jack, intelligent stereo set, intelligent audio amplifier, intelligent new trend equipment, intelligent kitchen guarding equipment, intelligent bathroom equipment, intelligence robot of sweeping the floor, intelligence robot of wiping the window, intelligence robot of mopping the ground, intelligent air purification equipment, intelligent steam ager, intelligent microwave oven, intelligent kitchen is precious, intelligent clarifier, intelligent water dispenser, intelligent lock etc..
In this embodiment, a loading method of an extension component is provided, which is applied to a computer terminal, and fig. 2 is a flowchart of the loading method of the extension component according to the embodiment of the present application, where the flowchart includes the following steps:
step S202, sending first request information to a component package storage, where the first request information is used to request to obtain a description file of an extension component package of a target system, the form designer operates on the target system, the extension component package is used to indicate a plurality of extension components corresponding to the target system, and the description file includes: attribute information of the extension component package, an address of a dependency base corresponding to the extension component package, and an address of a configuration file of the extension component package;
the attribute information includes, but is not limited to: the name, description, and other information of the extension component package are not limited in this embodiment of the present invention.
It should be noted that the extension component can be understood as a newly added form component.
Step S204, receiving first response information which is sent by the component package storage and carries the description file, and acquiring a dependency file and a configuration file of the extension component package according to the description file, wherein the dependency file is used for providing a running environment of the extension component;
and step S206, loading the plurality of extension components to the form designer according to the dependency file and the configuration file.
Through the above steps, sending first request information to a component package storage, where the first request information is used to request to obtain a description file of an extension component package of a target system, where the form designer operates on the target system, the extension component package is used to indicate a plurality of extension components corresponding to the target system, and the description file includes: attribute information of the extension component package, an address of a dependency base corresponding to the extension component package, and an address of a configuration file of the extension component package; receiving first response information which is sent by the component package memory and carries the description file, and acquiring a dependency file and a configuration file of the extension component package according to the description file, wherein the dependency file is used for providing an operating environment of the extension component; the multiple extension components are loaded to the form designer according to the dependency file and the configuration file, the problems that in the related technology, when a new component is added to the form designer, the whole form designer needs to be repackaged and deployed and the like are solved, the dynamic loading of the extension components of the form designer is supported, and extension component packages aiming at different service requirements can be dynamically loaded during running aiming at different service systems. When the components are newly added, only the extension component package needs to be updated, and the whole form designer does not need to be repacked and deployed.
There are many implementation manners of the step S204, and an implementation manner is provided in an embodiment of the present invention, and in an exemplary embodiment, the obtaining the dependency file and the configuration file of the extension component package according to the description file includes: sending second request information to a dependency library corresponding to the extension component package according to the address of the dependency library, and sending third request information to a component package configuration system according to the address of the configuration file of the extension component package, wherein the second request information is used for requesting to acquire the dependency file, and the third request information is used for requesting to acquire the configuration file; receiving second response information sent by the dependency library and third response information sent by the component package configuration system; and acquiring the dependency file and the configuration file according to the second response information and the third response information.
It should be noted that, because the description file includes: the attribute information of the extension component package, the address of a dependency library corresponding to the extension component package and the address of a configuration file of the extension component package are arranged in a component package configuration system, the dependency library stores a form designer and the dependency file required by the extension component package, the configuration file is in a umd file format, and the extension component package is loaded in a umd format when running, so that the required dependency file is required to be preloaded in a umd format; and requesting a dependent library and a component package configuration system to acquire the dependent file and the configuration file according to the address of the dependent library and the address of the configuration file corresponding to the extended component package in the description file.
In an exemplary embodiment, obtaining the dependency file of the extension component package according to the description file includes: determining whether the form designer loads a dependency file for the extension component package; and under the condition that the dependent file of the extension component package is not loaded, acquiring the dependent file of the extension component package according to the description file.
In one exemplary embodiment, determining whether the form designer loads the dependency file for the extension component package includes: and determining whether the name of the dependent file exists in the form designer, and determining that the form designer loads the dependent file of the extension component package under the condition that the name of the dependent file exists in the form designer.
There are many implementation manners of the step S206, and an implementation manner is provided in an embodiment of the present invention, in an exemplary embodiment, the loading, to the form designer, a plurality of extension components corresponding to the extension component package according to the dependency file and the configuration file includes: configuring a running environment in the form designer for the plurality of extension components according to the dependency file; and performing attribute configuration on the plurality of extension components according to the configuration file so as to load the plurality of extension components to the form designer.
It should be noted that the configuration file is a js code file in umd format after the extension component package is packaged, and is introduced when the form designer runs, and the content of the configuration file is used by the form designer. The js file comprises a form component for PC side display, a form component for mobile side display and a resource component for a designer resource list. The dependency file is used to configure a runtime environment, e.g., a runtime method, a runtime function, etc., in the form designer for the plurality of extension components.
Thus, configuring the runtime environment of a component in the form designer based on a dependency file; loading a plurality of extension components in the form designer based on a configuration file.
In an exemplary embodiment, before sending the first request information to the component package storage, fourth request information is sent to a dependency library corresponding to the extension component package, where the fourth request information is used to request to obtain a common dependency file of the form designer, where the common dependency file includes: the dependency file of the form engine of the form designer and the dependency file of the design engine of the form designer; and loading a form engine and a design engine of the form designer according to the public dependence file.
It should be noted that the dependency library further includes a public dependency preset for the form designer, and the form designer needs to be loaded in advance before running, so that a request is made to the dependency library corresponding to the extension component package to obtain the public dependency of the form designer, where the public dependency includes, but is not limited to, a dependency file of a form engine, a dependency file of a designer engine, and dependency files of some other public dependency libraries.
It should be noted that the form engine is used for rendering, interacting and checking the form; the designer engine is used for dragging layout function of the form component, setting the component attribute and generating the description information of the form.
In one exemplary embodiment, sending the first request information to the component package storage includes: receiving the plurality of extension components sent by the target system if the target system determines the plurality of extension components, wherein the target system determines the plurality of extension components according to the following method: the target system sends request information to a component package configuration system to acquire a plurality of extension components corresponding to the target system; sending first request information to the component package memory according to the plurality of expansion components.
The form designer in the embodiment of the invention has a component extension function, and can dynamically load an extension component package during running according to a plurality of extension components transmitted by a target system, so as to flexibly extend form components. The component package configuration system is respectively configured with extension component packages which need to be loaded for each target system, and each target system can be configured with a plurality of extension component packages; the target system acquires a plurality of required extension components through an interface of the component package configuration system in advance, and transmits the plurality of required extension components to the form designer to be loaded by the form designer.
In one exemplary embodiment, after the plurality of extension components are loaded to the form designer according to the dependency file and the configuration file, a creation request of a target form sent by a target object is received; determining form components and basic controls of the target form according to the creation request; and carrying out attribute configuration and sequencing on the form components and the basic control to generate the target form.
The form designer in the embodiment of the invention provides visual and rapid design and form generation functions for a user. The form designer receives a creation request of a target form sent by a target object, the creation request is used for indicating form components and basic controls of the target form, and the target form is generated according to the creation request.
For example, the user selects the form components from the form component resource list by dragging and pulling to perform arrangement layout, and sets the attribute information of the components to generate the description information of the form.
In order to better understand the process of the loading method of the extension component, the following describes a flow of the implementation method of loading the extension component with reference to an optional embodiment, but the flow is not limited to the technical solution of the embodiment of the present application.
In this embodiment, a loading method of an extension component is provided, and fig. 3 is an architecture diagram of the loading method of the extension component according to the embodiment of the present application, as shown in fig. 3, specifically as follows:
a form designer, a host system (equivalent to the target system in the above embodiment), a dependency library, an extended component package configuration system (equivalent to the component package configuration system in the above embodiment), and an extended component package storage system.
The form designer is a core module of the embodiment of the invention, and the host system is embedded in the form designer in a micro front end mode and is used for providing visual rapid design and generating functions of the form. And selecting the form components from the form component resource list of the form designer by a user in a dragging and pulling mode to carry out arrangement layout, and setting the attribute information of the form components to generate the description information of the form. The form designer has a component extension function, and can dynamically load an extension component package during running according to an extension component package list transmitted by a host system so as to flexibly extend the form component.
The form designer includes: a form engine, a designer engine, an extension component package management module, wherein,
the form engine is used for rendering, interacting and checking the form; the designer engine is used for dragging the layout function, setting the component attribute and generating a form schema of the form component;
and the extension component package management is used for the runtime dynamic loading function of the form item extension component package, and a plurality of extension component packages can be loaded according to the requirement of the host system.
The extension component package storage system includes: an extension component package, wherein,
an extension component package for providing required form components to the form designer, an extension component package comprising a plurality of form components. Developers develop corresponding extension component packages according to respective business requirements, and the extension component packages are introduced into the form designer according to needs. The format of the extension component package is umd, and the umd format supports runtime loading and is introduced by a form designer at runtime.
The extension component package includes: description files and js files (equivalent to configuration files in the above-described embodiments), in which,
the description file stores the relevant information of the extension component package, including the name, description and other attribute information of the extension component package, the dependency library of the extension component package, and the js file address of the extension component package;
the js file is js code in the umd format after the component package is packaged, and is introduced when the form designer runs, and the js file comprises the following components: the system comprises a form component for PC terminal display, a form component for mobile terminal display and a resource component for designer resource list.
And the dependency library is used for storing the dependency files required by the form designer and the extension component package, and the dependency files are loaded when the form designer runs, so that the dependency files adopt a umd format.
The dependency library includes: preset dependencies and component library dependencies, wherein,
and the preset dependency is used for providing preset public dependencies for the form designer, and the public dependencies comprise umd files of the form engine, umd files of the designer engine and umd files of other public dependency libraries which are loaded in advance by the form designer.
And the component library dependency is used for providing corresponding dependency files for each extension component package, and is loaded by the form designer before the component library is loaded.
And the extension component package configuration system is used for registering the extension component package and configuring the extension component package required by each host system.
The extension component package configuration system includes: an extension component package list and a host system extension component package configuration, wherein,
an extension component package list for storing information of the registered extension component package;
the host system expansion component package configuration is used for configuring expansion component packages which need to be loaded for each host system, and each host system can be configured with a plurality of expansion component packages.
The host system is a business system which needs to quote the form designer, introduces the form designer in a micro front end mode, and is used in combination with business functions. The host system inquires an interface of the extension component package configuration system in advance to obtain a required list of extension component packages, and transmits the required list of extension component packages to the form designer to be loaded by the form designer. The business function is the business function of the host system, and the business function related to form design is realized by combining the embedded form designer.
In this embodiment, a method for loading an extension component is provided, and fig. 4 is a timing diagram of a method for loading an extension component according to an embodiment of the present application, and as shown in fig. 4, the following steps are specifically performed:
step S401: in the case of accessing the host system, the extension component package configuration system is queried for a list of extension component packages needed by the host system.
Step S402: the extension component package configuration system returns a list of extension component packages needed by the host system.
Step S403: and the host system loads an embedded form designer and transmits the inquired extension component package list to the form designer.
Step S404: the form designer queries the dependency repository for a preset public dependency file.
Step S405: the dependency library returns the form designer preset common dependency files to the form designer.
Step S406: the form designer requests a description file of the extension component package from the extension component package storage system.
Step S407: the extension component package storage system returns the description file of the extension component package.
Step S408: and the form designer judges whether the dependent library of the extension component package is loaded or not according to the description file of the extension component package.
Step S409: if the dependent file of the extension component package is not loaded, the dependent file is requested from the dependent library.
Step S410: the dependent library returns a dependent file in umd format for the extension component package.
Step S411: and the form designer acquires the js file in the umd format of the extension component package according to the description file request of the extension component package.
Step S412: the extension component package stores and loads the js file in umd format of the returned extension component package.
Step S413: the form designer registers the components in the extension component package with the form designer.
Step S414: and after the form designer finishes loading the required extension component package, the extension component package is embedded into a host system as a sub application of the micro front end.
The steps S406 to 413 are the loading process of a single extension component package, and a plurality of extension component packages are loaded in parallel according to the same flow. It should be noted that the execution order of the above steps may be exchanged or cyclically executed in some cases, which is not limited in the embodiment of the present invention.
By the embodiment of the invention, the form item extension component package can be dynamically loaded when the form designer runs, but not at a compiling and packaging stage, and the extension mode is more flexible. When the form item component is added, only the extension component package needs to be updated, the component can be dynamically extended, and the whole form designer does not need to be repacked and deployed. The form designer can be embedded into a business system, and different form item extension component packages are dynamically loaded aiming at different business systems.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method of the embodiments of the present application.
FIG. 5 is a block diagram of a loading apparatus for an extension component according to an embodiment of the present application; as shown in fig. 5, includes:
a sending module 52, configured to send first request information to a component package storage, where the first request information is used to request to obtain a description file of an extension component package of a target system, the form designer runs on the target system, the extension component package is used to indicate a plurality of extension components corresponding to the target system, and the description file includes: attribute information of the extension component package, an address of a dependency base corresponding to the extension component package, and an address of a configuration file of the extension component package;
a receiving module 54, configured to receive first response information that is sent by the component package storage and carries the description file, and obtain a dependency file and a configuration file of the extension component package according to the description file, where the dependency file is used to provide an operating environment of the extension component;
a loading module 56, configured to load the plurality of extension components to the form designer according to the dependency file and the configuration file.
By the device, first request information is sent to a component package storage, wherein the first request information is used for requesting to obtain a description file of an extension component package of a target system, the form designer runs on the target system, the extension component package is used for indicating a plurality of extension components corresponding to the target system, and the description file comprises: attribute information of the extension component package, an address of a dependency base corresponding to the extension component package, and an address of a configuration file of the extension component package; receiving first response information which is sent by the component package memory and carries the description file, and acquiring a dependency file and a configuration file of the extension component package according to the description file, wherein the dependency file is used for providing an operating environment of the extension component; the multiple extension components are loaded to the form designer according to the dependency file and the configuration file, the problems that in the related technology, when a new component is added to the form designer, the whole form designer needs to be repackaged and deployed and the like are solved, the dynamic loading of the extension components of the form designer is supported, and extension component packages aiming at different service requirements can be dynamically loaded during running aiming at different service systems. And when the components are newly added, only the extension component package needs to be updated, and the whole form designer does not need to be repackaged and deployed.
In an exemplary embodiment, the receiving module 54 is configured to send second request information to the dependency library corresponding to the extension component package according to the address of the dependency library, and send third request information to the component package configuration system according to the address of the configuration file of the extension component package, where the second request information is used to request to acquire the dependency file, and the third request information is used to request to acquire the configuration file; receiving second response information sent by the dependency library and third response information sent by the component package configuration system; and acquiring the dependency file and the configuration file according to the second response information and the third response information.
In an exemplary embodiment, the receiving module 54 is configured to determine whether the form designer loads the dependency files of the extension component package; and under the condition that the dependent file of the extension component package is not loaded, acquiring the dependent file of the extension component package according to the description file.
In an exemplary embodiment, the loading module 56 is configured to configure a runtime environment in the form designer for the plurality of extension components according to the dependency file; and performing attribute configuration on the plurality of extension components according to the configuration file so as to load the plurality of extension components to the form designer.
In an exemplary embodiment, the loading module 56 is configured to send fourth request information to a dependency library corresponding to the extension component package, where the fourth request information is used to request to obtain a common dependency file of the form designer, where the common dependency file includes: the dependency file of the form engine of the form designer and the dependency file of the design engine of the form designer; and loading a form engine and a design engine of the form designer according to the public dependence file.
In an exemplary embodiment, the sending module 52 is configured to receive the plurality of extension components sent by the target system if the target system determines the plurality of extension components, where the target system determines the plurality of extension components according to the following: the target system sends request information to a component package configuration system to acquire a plurality of extension components corresponding to the target system; sending first request information to the component package memory according to the plurality of expansion components.
In an exemplary embodiment, the receiving module 54 is configured to receive a request for creating a target form sent by a target object; determining form components and basic controls of the target form according to the creation request; and carrying out attribute configuration and sequencing on the form components and the basic control to generate the target form.
Embodiments of the present application also provide a storage medium including a stored program, where the program performs any one of the methods described above when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store program codes for performing the following steps:
the method includes the steps that S1, first request information is sent to a component package storage, wherein the first request information is used for requesting to obtain a description file of an extension component package of a target system, a form designer runs on the target system, the extension component package is used for indicating a plurality of extension components corresponding to the target system, and the description file comprises: attribute information of the extension component package, an address of a dependency base corresponding to the extension component package, and an address of a configuration file of the extension component package;
s2, receiving first response information which is sent by the component package storage and carries the description file, and acquiring a dependency file and a configuration file of the extension component package according to the description file, wherein the dependency file is used for providing a running environment of the extension component;
and S3, loading the plurality of extension components to the form designer according to the dependency files and the configuration files.
Embodiments of the present application further provide an electronic device comprising a memory having a computer program stored therein and a processor configured to execute the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
the method includes the steps that S1, first request information is sent to a component package storage, wherein the first request information is used for requesting to obtain a description file of an extension component package of a target system, a form designer runs on the target system, the extension component package is used for indicating a plurality of extension components corresponding to the target system, and the description file comprises: attribute information of the extension component package, an address of a dependency base corresponding to the extension component package, and an address of a configuration file of the extension component package;
s2, receiving first response information which is sent by the component package storage and carries the description file, and acquiring a dependency file and a configuration file of the extension component package according to the description file, wherein the dependency file is used for providing a running environment of the extension component;
and S3, loading the plurality of extension components to the form designer according to the dependency file and the configuration file.
Optionally, in this embodiment, the storage medium may include but is not limited to: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A loading method of an extension component is applied to a form designer and comprises the following steps:
sending first request information to a component package storage, wherein the first request information is used for requesting to acquire a description file of an extension component package of a target system, the form designer runs on the target system, the extension component package is used for indicating a plurality of extension components corresponding to the target system, and the description file comprises: attribute information of the extension component package, an address of a dependency base corresponding to the extension component package, and an address of a configuration file of the extension component package;
receiving first response information which is sent by the component package memory and carries the description file, and acquiring a dependency file and a configuration file of the extension component package according to the description file, wherein the dependency file is used for providing an operating environment of the extension component;
loading the plurality of extension components to the form designer according to the dependency file and the configuration file.
2. The method for loading the extension component according to claim 1, wherein obtaining the dependency file and the configuration file of the extension component package according to the description file comprises:
sending second request information to a dependency library corresponding to the extension component package according to the address of the dependency library, and sending third request information to a component package configuration system according to the address of the configuration file of the extension component package, wherein the second request information is used for requesting to acquire the dependency file, and the third request information is used for requesting to acquire the configuration file;
receiving second response information sent by the dependency library and third response information sent by the component package configuration system;
and acquiring the dependency file and the configuration file according to the second response information and the third response information.
3. The method for loading the extension component according to claim 1, wherein obtaining the dependent file of the extension component package according to the description file comprises:
determining whether the form designer loads a dependency file for the extension component package;
and under the condition that the dependent file of the extension component package is not loaded, acquiring the dependent file of the extension component package according to the description file.
4. The method for loading the extension component according to claim 1, wherein loading a plurality of extension components corresponding to the extension component package to the form designer according to the dependency file and the configuration file comprises:
configuring a running environment in the form designer for the plurality of extension components according to the dependency file;
and performing attribute configuration on the plurality of extension components according to the configuration file so as to load the plurality of extension components to the form designer.
5. The method for loading an extension component according to claim 1, wherein before sending the first request message to the component package memory, the method further comprises:
sending fourth request information to a dependency library corresponding to the extension component package, wherein the fourth request information is used for requesting to acquire a common dependency file of the form designer, and the common dependency file includes: the dependency file of the form engine of the form designer and the dependency file of the design engine of the form designer;
and loading a form engine and a design engine of the form designer according to the public dependence file.
6. The loading method of the extension component according to claim 1, wherein sending the first request information to the component package memory comprises:
receiving the plurality of extension components sent by the target system if the target system determines the plurality of extension components, wherein the target system determines the plurality of extension components according to the following method: the target system sends request information to a component package configuration system to acquire a plurality of extension components corresponding to the target system;
sending first request information to the component package memory according to the plurality of expansion components.
7. The method for loading an extension component according to claim 1, wherein after loading the plurality of extension components into the form designer according to the dependency file and the configuration file, the method further comprises:
receiving a creation request of a target form sent by a target object;
determining form components and basic controls of the target form according to the creation request;
and carrying out attribute configuration and sequencing on the form components and the basic control to generate the target form.
8. An extension component loading apparatus, comprising:
a sending module, configured to send first request information to a component package storage, where the first request information is used to request to obtain a description file of an extension component package of a target system, where the form designer operates on the target system, the extension component package is used to indicate multiple extension components corresponding to the target system, and the description file includes: attribute information of the extension component package, an address of a dependency base corresponding to the extension component package, and an address of a configuration file of the extension component package;
a receiving module, configured to receive first response information carrying the description file and sent by the component package memory, and obtain a dependency file and a configuration file of the extension component package according to the description file, where the dependency file is used to provide an operating environment of the extension component;
and the loading module is used for loading the plurality of extension components to the form designer according to the dependency files and the configuration files.
9. A computer-readable storage medium, comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
CN202211564032.5A 2022-12-07 2022-12-07 Loading method and device of extension assembly, storage medium and electronic device Pending CN115858007A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211564032.5A CN115858007A (en) 2022-12-07 2022-12-07 Loading method and device of extension assembly, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211564032.5A CN115858007A (en) 2022-12-07 2022-12-07 Loading method and device of extension assembly, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN115858007A true CN115858007A (en) 2023-03-28

Family

ID=85670748

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211564032.5A Pending CN115858007A (en) 2022-12-07 2022-12-07 Loading method and device of extension assembly, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115858007A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117111941A (en) * 2023-08-29 2023-11-24 北京房多多信息技术有限公司 Component library adding method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117111941A (en) * 2023-08-29 2023-11-24 北京房多多信息技术有限公司 Component library adding method, device, equipment and storage medium
CN117111941B (en) * 2023-08-29 2024-06-07 北京房多多信息技术有限公司 Component library adding method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106201661A (en) Method and apparatus for elastic telescopic cluster virtual machine
CN106569880B (en) Method and system for dynamically sharing resources between Android applications
CN111399840B (en) Module development method and device
CN111897539A (en) Method and device for deploying applications according to service roles
CN110308999B (en) Method for dynamically sharing dependency package between applications, storage medium and mobile terminal
CN108279882B (en) Framework generation method, device, equipment and computer readable medium
CN115858007A (en) Loading method and device of extension assembly, storage medium and electronic device
CN114896003A (en) Page configuration method and device, storage medium and electronic device
CN114461304A (en) Configuration file determining method and device, storage medium and electronic equipment
CN112256343B (en) Software loading method, equipment and system
CN113721936B (en) Application management method, intelligent terminal, device and storage medium
CN114629958B (en) Resource allocation method, device, electronic equipment and storage medium
CN110704041A (en) Software development method and device
CN115982493A (en) Page jump method and device, storage medium and electronic device
CN107301089B (en) APP deployment and calling method and terminal
CN107783837B (en) Method and device for performing storage expansion and electronic equipment
CN111857736B (en) Cloud computing product generation method, device, equipment and storage medium
CN112035102A (en) Configuration method and device of data interface, storage medium and electronic device
WO2016206437A1 (en) Rom package generation method and device
CN113568623A (en) Application deployment method and device and electronic equipment
CN104219258A (en) Method and system of real-time query of number attribution as well as terminal and server
CN115827140B (en) Method, device, equipment and storage medium for generating visual large screen
CN113568708B (en) Platform creation method, device and equipment
CN111651276B (en) Scheduling method and device and electronic equipment
CN115941834B (en) Automatic operation method, device, equipment and storage medium of smart phone

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