CN116149639A - Method and device for developing components, electronic equipment and storage medium - Google Patents

Method and device for developing components, electronic equipment and storage medium Download PDF

Info

Publication number
CN116149639A
CN116149639A CN202111373794.2A CN202111373794A CN116149639A CN 116149639 A CN116149639 A CN 116149639A CN 202111373794 A CN202111373794 A CN 202111373794A CN 116149639 A CN116149639 A CN 116149639A
Authority
CN
China
Prior art keywords
component
dependent
data
developed
dependent data
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
CN202111373794.2A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202111373794.2A priority Critical patent/CN116149639A/en
Publication of CN116149639A publication Critical patent/CN116149639A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • G06F8/433Dependency analysis; Data or control flow analysis

Landscapes

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

Abstract

The application discloses a method, a device, electronic equipment and a storage medium for component development, which relate to the technical field of computers and comprise the following steps: obtaining dependency data corresponding to a component to be developed, wherein the dependency data comprises: and obtaining the dependency object when determining that the pre-stored dependency object matched with the dependency data exists. Further, storing the pre-stored dependent object under a component source code file corresponding to the component to be developed to obtain a new component source code file, and operating the new component source code file to obtain a corresponding target component; and then, performing function debugging on the target component to obtain a debugging result, and outputting the debugged target component when the debugging result is determined to be in accordance with the preset condition. It can be seen that depending objects containing the same dependent data can be passed only once based on this approach, thereby improving the efficiency of the overall development component.

Description

Method and device for developing components, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, an electronic device, and a storage medium for component development.
Background
With the rapid development of science and technology, various websites and application programs bring great convenience to life and production. In order for various websites and various applications to meet increasingly rich usage needs, it is often necessary to develop a wide variety of components for websites and applications; the component is a simple package of data and operation methods, the component can be provided with special attributes and methods, and the use of the component can realize the functions of rapidly processing access, designing a software development method and the like.
For example, a promotion policy presentation type component is developed for marketing promotion services, and for example, a payment selection type component is developed for payment services.
Specifically, in the process of developing a component, a process of developing, publishing or completely simulating a production environment needs to be executed, so that the initially developed component can be debugged in the production environment, namely in the related art, the development process of the component is complicated, and the development efficiency of the component is low.
In view of this, a framework for template-based pass-through scripting and integrated drive electronics (Integrated Drive Electronics, IDE) plugins is provided in the related art for improved component development efficiency.
However, the component development implemented based on the framework needs to execute the process of acquiring the component data and setting the dependent object corresponding to the component based on the component data each time the component development is performed, and thus, each time the component development is performed, the determination of the dependent object needs to be executed once; when the component which is initially developed is debugged and completed, when the same component data as the component data is required to be used, the setting processing of the dependent object still needs to be executed once, and the component data included in the dependent object can be used, namely, the same component data is set for a plurality of times of dependent objects, so that the problem that the component data included in the same dependent object is transferred a plurality of times is caused, and the efficiency of the whole development component is affected.
Disclosure of Invention
The embodiment of the application provides a method, a device, electronic equipment and a storage medium for component development, which are used for improving the component development efficiency.
In one aspect, a method of component development is provided, the method comprising:
obtaining dependency data corresponding to a component to be developed, wherein the dependency data comprises: the universal attribute corresponding to the component to be developed and the method for processing the attribute;
When a pre-stored dependent object matched with the dependent data exists, acquiring the dependent object, wherein the dependent object is generated based on the dependent data corresponding to the preset component function use requirement;
storing the pre-stored dependent object under a component source code file corresponding to the component to be developed to obtain a new component source code file, and operating the new component source code file to obtain a corresponding target component;
performing function debugging on the target component to obtain a debugging result; and outputting the debugged target component when the debug result meets the preset condition.
In one aspect, an apparatus for component development is provided, the apparatus comprising:
the first obtaining unit is configured to obtain dependency data corresponding to a component to be developed, where the dependency data includes: the universal attribute corresponding to the component to be developed and the method for processing the attribute;
the second acquisition unit is used for acquiring the dependent object when the pre-stored dependent object matched with the dependent data exists, wherein the dependent object is generated based on the dependent data corresponding to the preset component function use requirement;
The first obtaining unit is used for storing the pre-stored dependent object under the component source code file corresponding to the component to be developed to obtain a new component source code file, and operating the new component source code file to obtain a corresponding target component;
the second obtaining unit is used for performing function debugging on the target component to obtain a debugging result; and outputting the debugged target component when the debug result meets the preset condition.
Optionally, before the obtaining the dependency data corresponding to the development component, the apparatus further includes a processing unit, configured to:
determining a component identifier and a target template corresponding to the component to be developed;
initializing the component to be developed by using the target template through a script command to obtain the component to be developed containing a file corresponding to the target template; the to-be-developed component containing the target template corresponding file at least comprises a file directory for a functional debugging case file, a source code file containing realization dependency capability and a file for exporting the to-be-developed component.
In one aspect, an electronic device is provided that includes a processor and a memory, wherein the memory stores program code that, when executed by the processor, causes the processor to perform a method of component development as described above.
In one aspect, a computer program product or computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device performs the method of component development described above.
Embodiments of the present application provide a computer readable storage medium comprising program code for causing an electronic device to perform the steps of a method of any one of the component developments described above, when the program product is run on the electronic device.
The beneficial effects of the application are as follows:
according to the method, the device, the electronic equipment and the storage medium for component development, when the electronic equipment determines that the pre-stored dependent object exists in the dependency data matching, the dependent object can be obtained, then the pre-stored dependent object is stored under the component source code file corresponding to the component to be developed, a new component source code file is obtained, the new component source code file is operated, a corresponding target component is obtained, the function of the target component is debugged, and a debugging result is obtained, so that when the electronic equipment determines that the debugging result meets the preset condition, the debugged target component is output, and further the development of the component to be developed is completed rapidly.
In this way, the electronic device does not need to frequently generate the corresponding dependent object based on the same dependent data, but only needs to generate and store the dependent object corresponding to the dependent data when the dependent data appears for the first time, and the dependent object can be called in the component development process, so that the repeated transmission of the same dependent data is effectively reduced, and the efficiency of the component to be developed is obviously improved.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described below, and it is apparent that the drawings in the following description are only embodiments of the present application, and other drawings may be obtained according to the provided drawings without inventive effort for a person having ordinary skill in the art.
Fig. 1 is an alternative schematic diagram of an application scenario in an embodiment of the present application;
FIG. 2 is a schematic diagram of an exemplary component development system architecture in an embodiment of the present application;
FIG. 3 is a flow chart of a method of component development in an embodiment of the present application;
FIG. 4 is a schematic diagram of a target template in an embodiment of the present application;
FIG. 5 is a flowchart of a method for generating dependent objects according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a data storage class in an embodiment of the present application;
FIG. 7 is another schematic diagram of generating dependent objects in an embodiment of the present application;
FIG. 8 is a schematic diagram of one embodiment of the present application for obtaining a target component;
FIG. 9 is a schematic diagram of a scene update for a target component in an embodiment of the present application;
FIG. 10 is a schematic diagram of a first product form display interface of a target assembly according to an embodiment of the present application;
FIG. 11 is a second product form interface schematic of a target assembly according to an embodiment of the present disclosure;
FIG. 12 is a third product form interface schematic of a target assembly according to an embodiment of the present application;
FIG. 13 is a fourth product form interface schematic of a target assembly according to an embodiment of the present application;
FIG. 14 is a schematic diagram of an interface for development of a target assembly in a production environment in an embodiment of the present application;
FIG. 15 is a schematic view of the composition and structure of a device developed by one of the components in the embodiment of the present application;
FIG. 16 is a schematic diagram of an electronic device in an embodiment of the present application;
fig. 17 is a schematic diagram of a hardware composition structure of an electronic device in an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure. Embodiments and features of embodiments in this application may be combined with each other arbitrarily without conflict. Also, while a logical order is depicted in the flowchart, in some cases, the steps depicted or described may be performed in a different order than presented herein.
In order to facilitate understanding of the technical solutions provided in the embodiments of the present application, some key terms used in the embodiments of the present application are explained here:
1. and (3) assembly: is a simple package of data and methods. In particular, the components may have their own properties and methods; wherein the attribute is a visitor to the component data and the method is some function corresponding to the component.
2. Production environment: refers to an environment that positively provides external services, typically turning off error reports, and turning on error logs. In particular, a production environment is understood to be an environment containing all the functions, on the basis of which the environment used by any project can be based, in particular, on the adjustment of the functions corresponding to the components based on the individual needs of the customer.
3. Class (Class): is the basis for implementing information encapsulation for Object-oriented programming (OOP, object-Oriented Programming). Specifically, the class internally encapsulates attributes and methods for manipulating its own members. A class is a definition of an object, has a behavior (behavior), which describes what an object can do and the method (method) it does, which are programs and processes that can operate on the object. It contains information about the behavior of the object including its name, attributes, methods and events.
For example, the data cache class in the embodiment of the present application includes a name corresponding to the dependent object, a method for acquiring dependent data for acquiring the dependent data from the object, and a method for overriding setting dependent data for updating the dependent data on the object.
The word "exemplary" is used hereinafter to mean "serving as an example, embodiment, or illustration. Any embodiment described as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The terms "first," "second," and the like herein are used for descriptive purposes only and are not to be construed as either explicit or implicit relative importance or to indicate the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature, and in the description of embodiments of the present application, unless otherwise indicated, the meaning of "a plurality" is two or more.
In the related art, a framework for integrating driver electronics (Integrated Drive Electronics, IDE) plug-ins through scripts based on templates is provided for improving component development efficiency.
However, the component development implemented based on the framework needs to execute the process of acquiring the component data and setting the dependent object corresponding to the component based on the component data each time the component development is performed, and thus, each time the component development is performed, the determination of the dependent object needs to be executed once; when the component which is initially developed is debugged and completed, when the same component data as the component data is required to be used, the setting processing of the dependent object still needs to be executed once, and the component data included in the dependent object can be used, namely, the same component data is set for a plurality of times of dependent objects, so that the problem that the component data included in the same dependent object is transferred a plurality of times is caused, and the efficiency of the whole development component is affected.
On the other hand, when the component is developed based on the framework, the component cannot be directly developed in a production environment, and the debugging of the initial development completion component in the production environment is realized based on a plurality of intermediate environment agents, so that the overall efficiency of component development is lower.
In view of this, in the embodiments of the present application, a new solution for developing components is provided, in which multiple passes of the same dependent data are no longer performed. Specifically, the dependency data corresponding to the preset component function use requirement can be stored in the data cache class, then the dependency data in the data cache class can be obtained, and the corresponding dependency object is generated and stored based on the dependency data, so that when the dependency data corresponding to the component to be developed is determined to be matched with the dependency data in the data cache class, the dependency data in the data cache class is directly used as the dependency object corresponding to the component to be developed, namely, the generation times of the same dependency object are effectively reduced, the repeated transmission of the same dependency data is avoided, and the development efficiency of the component to be developed is effectively improved.
Specifically, since the data cache class supports the storage of the dependent data, that is, the data storage class supports the storage of the first dependent data at this time and the storage of the second dependent data next time, if the second dependent data is different from the first dependent data, the update of the first dependent data can be directly implemented, that is, the data storage class supports the storage and update of the dependent data. Therefore, when the dependent data are different, the dependent data in the data cache class data can be directly updated, and the determination of a new dependent object is realized, so that the determination of the dependent object is quickened, and the development efficiency of the component to be developed is further improved.
After the design concept of the embodiment of the present application is introduced, some simple descriptions are made below for application scenarios applicable to the technical solution of the embodiment of the present application, and it should be noted that the application scenarios described below are only used to illustrate the embodiment of the present application and are not limiting. In the specific implementation process, the technical scheme provided by the embodiment of the application can be flexibly applied according to actual needs.
Referring to fig. 1, an optional application scenario is shown in an embodiment of the present application. The scheme provided by the embodiment of the application can be suitable for most of the component development scenes. In this scenario, a terminal device 100 and a server 200 may be included. Communication between the terminal device 100 and the server 200 may be performed through a communication network. Alternatively, the communication network may be a wired network or a wireless network. The terminal device 100 and the server 200 may be directly or indirectly connected through wired or wireless communication, which is not limited herein.
In the embodiment of the present application, the terminal device 100 is an electronic device that can be used by a user, and the electronic device may be a personal computer, a smart phone, a tablet computer, a notebook, an electronic book reader, an intelligent home, a vehicle-mounted terminal, and other devices; the terminal device 100 can each include one or more processors 1011, memory 1012, and I/O interfaces 1013 to interact with a server, etc. The terminal device 100 may have a component development platform or a component development system installed therein. The server 200 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (Content Delivery Network, content delivery networks), basic cloud computing services such as big data and artificial intelligence platforms, and the like.
In this embodiment of the present application, a developer may determine a name of a component to be developed based on a component development platform or a system on the terminal device 100, execute development and debugging of the component to be developed, and send a request to the server 200 when obtaining dependency data or other information of the component to be developed, so as to complete development and debugging of the component to be developed based on information responded by the server 200, thereby obtaining a target component after debugging.
For example, each developer may use a corresponding component development platform or system on the corresponding terminal device 100, perform development of the component to be developed on the component development platform, and when specific information is needed in the development process, send a request for obtaining the information to the server 200, and similarly, the server 200 processes the request sent by each terminal device 100, so that the terminal device 100 may implement development and debugging of the component to be developed based on the information fed back by the server 200, and obtain the target component after debugging.
Of course, the method provided in the embodiment of the present application is not limited to the application scenario shown in fig. 1, but may be used in other possible application scenarios, and the embodiment of the present application is not limited. The functions that can be implemented by each device in the application scenario shown in fig. 1 will be described together in the following method embodiments, which are not described in detail herein.
Referring to fig. 2, fig. 2 is a schematic diagram of a system framework according to an embodiment of the present application. The system frame schematic diagram comprises: component initialization module, component mode module and production environment module. Specifically, the system may be deployed on the aforementioned terminal device 100.
In the embodiment of the application, the component initializing module is used for quickly creating the template file required by the component to be developed through the script command, so that the initialization of the component to be developed is completed. The script command is, for example, "npm run create { component name }). Specifically, the initialized component to be developed at least comprises a component source code file, a capability export file and a case file directory.
In this embodiment of the present application, for each different service component, in consideration of the capabilities of the component itself, a common gateway interface (Common Gateway Interface, CGI) request method, user information, and other data of the component capabilities in a real scenario are also commonly used, that is, the dependent data corresponding to the component to be developed, so, referring to fig. 2, the component schema module in this embodiment of the present application provides a component dependent unit, which can inject the dependent data into the component source code file.
By way of example, the component dependency unit may be referred to as a "setup Loader," for example. Specifically, the usage method of the component dependent unit is as follows: before using the target component, the component dependency is injected in advance through a method for establishing a dependency object in a setupLoader; for example, the foregoing "establish dependent object method" may be referred to as the "setConfig" method. And acquiring the dependency data included in the injected dependency object through a setupLoader acquisition dependency object method when the component runs; for example, the aforementioned "get dependent object method" may be referred to as the "getConfig" method.
In this embodiment, please continue to refer to fig. 2, the component source code file provides a corresponding function for the capability exit file, and the capability exit file provides a corresponding application for the case file directory. Specifically, the case file directory is a file of an actual usage scenario corresponding to the component to be developed, for example, if the component to be developed a includes product forms such as a basic form, an industry form, and a conventional status form, the component to be developed a includes three case files.
In the embodiment of the application, the terminal equipment can realize the debugging and running of the target component based on the production environment module.
Of course, the method provided in the embodiment of the present application is not limited to the application scenario shown in fig. 1, but may be used in other possible application scenarios, and the embodiment of the present application is not limited.
Referring to fig. 3, a flowchart of an implementation of a method for component development according to an embodiment of the present application is shown, where the method may be executed by an electronic device, such as the foregoing terminal device 100, and the specific implementation flow is as follows:
step 301: obtaining dependency data corresponding to the component to be developed, wherein the dependency data comprises: the method for processing the universal attribute and the attribute corresponding to the component to be developed.
In the embodiment of the present application, before executing step 301, the electronic device determines a component identifier and a target template corresponding to a component to be developed. Specifically, the component identifier of the component to be developed may be a correspondingly set component name. It should be noted that, the component name may be composed of any other character such as letters, numbers, etc., which is not limited in the embodiments of the present application. For example, the component name may be "campaign".
In the embodiment of the application, after the electronic device determines the component identifier and the target template corresponding to the component to be developed, the target template can be used through the script command, and the component to be developed is initialized to obtain the component to be developed containing the file corresponding to the target template.
Referring to fig. 4, a schematic diagram of a target template is shown in an exemplary embodiment of the present application. The target template at least comprises a single file directory, a case file directory, a source code file, a function export file, a package description file and a component description file.
In the embodiment of the application, the electronic device can initialize the component to be developed by running 'npm run create demo' under the catalog of the component to be developed. In the embodiment of the application, after the electronic device determines that the initialization of the component to be developed is completed, the dependency data corresponding to the component to be developed may be obtained.
In the embodiment of the application, the dependent data includes: the method for processing the universal attribute and the attribute corresponding to the component to be developed. In particular, dependent data may be understood as a method or configuration used by a component to be developed. Illustratively, the component is developed outside the component to be developed, but the method within the large project to which the component to be developed belongs is used as the dependent data. Of course, it is also possible to determine the dependent data of the component to be developed based on the actual implementation correspondence. For example, the project needs to report the clicking action of the user for analysis, so that some buttons inside the component need to be reported when clicking, and the electronic device can use the clicking reporting method as dependent data.
Step 302: and when the existence of the pre-stored dependent object matched with the dependent data is determined, acquiring the dependent object, wherein the dependent object is generated based on the dependent data corresponding to the preset component function use requirement.
In the embodiment of the application, when the electronic device determines that the pre-stored dependent object matched with the dependent data exists, the dependent object can be acquired, that is, the dependent object does not need to be generated again based on the dependent data.
In an embodiment of the present application, please refer to fig. 5, which is a flowchart of steps for generating a pre-stored dependent object provided in the present application.
Step 501: based on the preset component function use requirement, corresponding dependent data are obtained.
In the embodiment of the application, the electronic device can correspondingly determine the preset component function use requirement according to the historical use requirement or the large project corresponding to the component to be developed, so that corresponding dependent data can be obtained based on the preset component function use requirement. It should be noted that, in a specific implementation process, the dependent data may be updated based on actual use requirements.
Step 502: constructing a data cache class based on the dependent data; the data cache class is used to support the storage of dependent data.
In the embodiment of the application, after the electronic device determines the dependent data corresponding to the preset component function use requirement, a data cache class can be constructed in a class mode. In particular, the data cache class is used to support the storage of dependent data. Wherein, the data cache class supports the storage of each dependent data, namely, the storage and updating of each dependent data.
Referring to fig. 6, the data cache class may include an initialization method, a method of acquiring dependent data, and a method of updating setting dependent data. The method for updating the dependent data comprises the steps of storing object identification and dependent data on a dependent object, acquiring the dependent data from the dependent object, and updating the set dependent data to cover the dependent data on the dependent object. In practical implementation, the object identifier may be understood as an identifier identical to the component name, and of course, may be other identifiers, which is not limited in this application.
Step 503: and acquiring the dependent data in the data cache class based on a preset object establishment method.
In the embodiment of the present application, after the electronic device constructs the data cache class based on the dependent data, the dependent data in the data cache class may be obtained based on a preset object establishment method.
Step 504: corresponding dependent objects are generated and saved based on the dependent data and the object identification.
In the embodiment of the application, after the electronic device acquires the dependent data in the data cache class, a corresponding dependent object can be generated and stored based on the dependent data and the object identifier. Specifically, the electronic device may construct a dependent object for the component to be developed based on the dependent data and the object identifier through a single-instance design mode in the component to be developed. The dependent objects comprise object identification, attributes, a method for supporting setting of dependent data during initialization, a method for updating the dependent data according to requirements and a method for acquiring the dependent data according to requirements.
Therefore, the scheme provided by the embodiment of the application supports setting the dependent data during initialization or subsequently updating the dependent data as required by using the setConfig method, so that the extension of the dependent data can be realized. And when the follow-up target crime uses the scene, the getConfig method can be called according to the actual situation to acquire the dependent data from the dependent object at the moment, namely the dependent data in the application can be dynamically updated, and the latest dependent data is acquired.
Referring to fig. 7, fig. 7 is a schematic diagram illustrating a process of generating a dependent object according to an embodiment of the present application. Specifically, the electronic device may generate the component dependent object based on the data cache class, that is, the dependent object generation class and the dependent object generation method shown in fig. 6.
Optionally, when the electronic device determines that there is no pre-stored dependent object matched with the dependent data corresponding to the component to be developed, constructing a new data cache class based on the dependent data corresponding to the component to be developed; the new data cache class is used for supporting the storage of dependent data corresponding to the component to be developed; then, based on a preset object establishment method, the dependent data in the new data cache class can be obtained, and a corresponding new dependent object is generated and stored based on the dependent data corresponding to the component to be developed and the new object identifier.
Obviously, in the embodiment of the application, the electronic device does not need to frequently generate the corresponding dependent object based on the same dependent data, but only needs to generate and store the dependent object corresponding to the dependent data when the dependent data appears for the first time, and can be called in the component development process, so that the repeated transmission of the same dependent data is effectively reduced, and the efficiency of the component to be developed is remarkably improved.
Step 303: and storing the prestored dependent object under the component source code file corresponding to the component to be developed to obtain a new component source code file, and operating the new component source code file to obtain a corresponding target component.
In the embodiment of the application, the electronic device may store the pre-stored dependent object under the component source code file corresponding to the component to be developed, to obtain a new component source code file. Specifically, after the electronic device obtains the dependent object corresponding to the component to be developed, the dependent object can be matched with the relying object setup.ts file stored in the source code file corresponding to the component to be developed, that is, the prestored dependent object is stored under the component source code file corresponding to the component to be developed, so that the default declaration dependent data of the component to be developed can be injected, and the initialization of the dependence of the component to be developed is completed.
Fig. 8 is a schematic diagram of a target component according to an embodiment of the present application. Specifically, it is assumed that a component name of a component to be developed is "campaign", and the component to be developed relies on a click report method. As shown in fig. 8, the set.ts file of the source code file for saving the dependent object includes a component name and a click reporting method for providing a reporting method for the set.ts file of the source code file, when the electronic device determines that the dependent object corresponding to the component to be developed matches the set.ts file of the source code file for saving the dependent object, a new component source code file is obtained, and after the new component source code file is run, the electronic device can obtain a corresponding target component.
In the embodiment of the application, after the electronic device obtains the new source code file, that is, after the dependent object is injected into the component to be developed, the dependent data can be obtained by calling the dependent object, that is, the dependent data can be obtained from the dependent object when the target component runs.
In the embodiment of the application, since the component acquires the dependent object data, the dependent data can be adjusted by the setConfig method provided by the dependent object before the component acquires the dependent object data, so that the dependent data can be dynamically adjusted as required. Therefore, the electronic device sets at least one application scene for the component to be developed based on the method of updating the dependent data as required, namely, different application scenes can be set for the component by the setConfig method before the target component operates.
For example, referring to fig. 9, fig. 9 is a schematic diagram illustrating a scene update of a target component according to an embodiment of the present application. After obtaining the target component, i.e. the planning component in fig. 9, the electronic device may further determine the requirement of the application scenario of the component based on the product form requirement of the client, i.e. report the application scenario information selected by the user, and then the electronic device may correspondingly determine new dependent data based on the requirement of the application scenario of the component, so that the application scenario of the target component may be updated.
In order to facilitate understanding of those skilled in the art, the following examples are provided to illustrate how to set application scenarios for components to be developed based on methods for updating dependent data on demand, and it should be understood that the following examples are merely illustrative, not limiting of embodiments of the present invention, and other determination methods may be employed in the implementation in addition to those listed below, which are not exhaustive herein.
Mode one:
in the embodiment of the present application, assuming that the target component is a planned popularization component and the dependent parameter corresponding to the planned dependency component is a basic version dependent parameter of the newly-built popularization plan state, that is, each function corresponding to the planned popularization component is displayed in a fully-unfolded state, the electronic device may set or update the dependent parameter of the planned popularization component based on a method of updating dependent data as required, so that the foregoing steps 301 to 303 may be executed to determine the target planned popularization component.
Specifically, referring to fig. 10, a schematic diagram of a display interface of a target component according to an embodiment of the present application is shown. As shown in fig. 10, the plan type display unit includes a display advertisement plan sub-display unit and a search advertisement plan sub-display unit; the promotion target display unit comprises a commodity promotion sub-display unit, an application promotion sub-display unit, a sales lead search sub-display unit, a brand activity promotion sub-display unit, a webpage promotion sub-display unit and a small game promotion sub-display unit; the throwing mode display unit comprises a standard throwing sub-display unit and an accelerated throwing sub-display unit; and the planning daily budget comprises an unlimited sub-presentation unit and a specified daily budget sub-presentation unit.
Mode two:
in the embodiment of the present application, assuming that the target component is a planned popularization component and the dependent parameter corresponding to the planned dependency component is an industry version dependent parameter of a newly-built popularization plan state, that is, each function corresponding to the planned popularization component is displayed in a single expansion state, the electronic device may set or update the dependent parameter of the planned popularization component based on a method of updating dependent data as required, so that the foregoing steps 301 to 303 may be executed to determine the target planned popularization component.
Specifically, referring to fig. 11, a schematic diagram of another display interface of a target component according to an embodiment of the present application is shown. As shown in fig. 11, the plan type display unit includes a display advertisement plan sub-display unit; the promotion target display unit comprises a sales lead searching sub-display unit; the throwing mode display unit comprises a standard throwing sub-display unit and an accelerated throwing sub-display unit; and the planning daily budget comprises an unlimited sub-presentation unit and a specified daily budget sub-presentation unit.
It is apparent that the display interface shown in fig. 10 and the display interface shown in fig. 11 are different in display manner for each unit.
Mode three:
in the embodiment of the application, it is assumed that the target component is a plan promotion component, and the dependent parameters corresponding to the plan dependent component are conventional dependent parameters, that is, each function corresponding to the plan promotion component is displayed in a fully-unfolded state and each function is clickable. The electronic device may set or update the dependent parameters of the plan promotion component based on the on-demand update dependent data method so that the foregoing steps 301-303 may be performed to determine the target plan promotion component.
Specifically, referring to fig. 12, a schematic diagram of a display interface of a target component according to an embodiment of the present application is shown. As shown in fig. 12, the plan type display unit includes a display advertisement plan sub-display unit and a search advertisement plan two sub-display unit; the promotion target display unit comprises a commodity promotion sub-display unit, an application promotion sub-display unit, a sales lead search sub-display unit, a brand activity promotion sub-display unit, a webpage promotion sub-display unit and a small game promotion sub-display unit; the throwing mode display unit comprises a standard throwing sub-display unit and an accelerated throwing sub-display unit; and the planning daily budget comprises an unlimited sub-presentation unit and a specified daily budget sub-presentation unit.
Mode four:
in the embodiment of the application, it is assumed that the target component is a plan promotion component, and the dependent parameter corresponding to the plan dependent component is an edit-state dependent parameter, that is, a part of functions corresponding to the plan promotion component cannot be displayed. The electronic device may set or update the dependent parameters of the plan promotion component based on the on-demand update dependent data method so that the foregoing steps 301-303 may be performed to determine the target plan promotion component.
Specifically, referring to fig. 13, a schematic diagram of a display interface of a target component according to an embodiment of the present application is shown. As shown in fig. 13, the delivery mode display unit includes a standard delivery sub-display unit and an accelerated delivery sub-display unit; and the planning daily budget comprises an unlimited sub-presentation unit and a specified daily budget sub-presentation unit.
Therefore, the electronic equipment sets at least one application scene for the component to be developed based on the method for updating the dependent data according to the requirement, so that different product forms of the component to be developed can be set quickly, and development of different product forms of the component to be developed is realized.
Step 304: performing function debugging on the target component to obtain a debugging result; and outputting the debugged target component when the debug result meets the preset condition.
In the embodiment of the application, after the electronic device obtains the target component, the target component can be packaged into the target component which accords with the production environment deployment, the target component which accords with the production environment deployment is debugged to obtain the debug file, then the save path of the debug file is switched to the save path in the production environment, and development and debugging are performed on the target component in the production environment to obtain the debug result.
By way of example, the electronic device may run the case directory of the target component through the front-end resource modular management and packaging tool, thereby generating a corresponding debug file under the case directory. The front-end resource modularization management and packaging tool is, for example, wepbackjs, but may be other, which is not limited in this application. Specifically, the path for saving the debug file is, for example: component/demo/index. Further, the electronic device can proxy the corresponding debugging file under the production environment path through the preset tool, namely, the storage path of the debugging file is switched to the storage path under the production environment, so that development and debugging of the target component under the production environment can be realized, and a debugging result is obtained. The preset tool may be a whistle grabbing tool, or may be a wepbackjs, or may be another tool, which is not limited in the embodiment of the present application.
In the embodiment of the application, considering that user authentication is generally involved when a real CGI request is invoked in a production environment, the authentication method can be used as pre-dependent data of a component to be developed, and is dynamically injected into the component to be developed in advance through a dependent object, so that the component authentication mode can be kept consistent with the production environment, and the authentication mode adopted in case operation corresponding to a subsequent target component is no different from that of a real page. It should be noted that, other production environment dependency methods can be used as dependency data, and the dependency data is dynamically injected into the component to be developed in advance through the dependency object, so that the running environment of the subsequent target component is consistent with the actual production environment.
In this embodiment of the present application, when the electronic device performs function debugging on the target component based on the foregoing manner, after obtaining the debug result, it is further required to determine whether the debug result meets a preset condition, and when it is determined that the debug result meets the preset condition, output the debugged target component. It should be noted that, the preset condition may be updated based on the corresponding setting actually implemented, which is not limited in the embodiment of the present application.
Referring to fig. 14, an interface diagram of the target component of the embodiment of the present application is shown in fig. 14, which is developed in a production environment. Therefore, the embodiment of the application provides a component development scheme for associating independent development of the components with real use scenes, the components can be directly developed in a production environment through the scheme, development and debugging cost of the components is effectively reduced, and the same dependence of the components can be subjected to inductive management in a dynamic dependence injection mode, so that scene construction and capability customization of the components are facilitated, and further efficiency of component development is improved.
Based on the same inventive concept, the embodiment of the application also provides a device for component development. As shown in fig. 15, which is a schematic structural diagram of an apparatus 1500 for component development, may include:
A first obtaining unit 1501, configured to obtain dependency data corresponding to a component to be developed, where the dependency data includes: the universal attribute corresponding to the component to be developed and the method for processing the attribute;
a second obtaining unit 1502, configured to obtain the dependent object when determining that there is a pre-stored dependent object that matches the dependent data, where the dependent object is generated based on the dependent data corresponding to the preset component function usage requirement;
a first obtaining unit 1503, configured to save the pre-stored dependent object under a component source code file corresponding to the component to be developed, obtain a new component source code file, and operate the new component source code file to obtain a corresponding target component;
a second obtaining unit 1504, configured to perform function debugging on the target component, to obtain a debugging result; and outputting the debugged target component when the debug result meets the preset condition.
Optionally, the second obtaining unit 1504 is specifically configured to:
packaging the target components into target components which accord with the production environment deployment, and debugging the target components which accord with the production environment deployment to obtain a debugging file;
Switching the storage path of the debugging file into the storage path in the production environment, and developing and debugging the target component in the production environment to obtain the debugging result.
Optionally, the pre-stored dependent object is determined based on the following manner:
based on the use requirement of the preset component function, corresponding dependent data are obtained;
constructing a data cache class based on the dependent data; the data cache class is used for supporting the storage of the dependent data;
based on a preset object establishment method, obtaining dependent data in the data cache class;
and generating and storing a corresponding dependent object based on the dependent data and the object identification.
Optionally, the dependent object includes an object identifier, an attribute, and a method for supporting setting of dependent data at the time of initialization, a method for updating the dependent data on demand, and a method for acquiring the dependent data on demand.
Optionally, the apparatus further comprises a processing unit, configured to:
and setting at least one application scene for the component to be developed based on the method for updating the dependent data on demand.
Optionally, the second acquiring unit 1502 is further configured to:
when determining that a pre-stored dependent object matched with the dependent data corresponding to the component to be developed does not exist, constructing a new data cache class based on the dependent data corresponding to the component to be developed; the new data cache class is used for supporting the storage of dependent data corresponding to the component to be developed;
Based on a preset object establishment method, obtaining the dependent data in the new data cache class, and generating and storing a corresponding new dependent object based on the dependent data corresponding to the component to be developed and a new object identifier.
Optionally, before the obtaining the dependency data corresponding to the development component, the apparatus further includes a processing unit, configured to:
determining a component identifier and a target template corresponding to the component to be developed;
initializing the component to be developed by using the target template through a script command to obtain the component to be developed containing a file corresponding to the target template; the to-be-developed component containing the target template corresponding file at least comprises a single file directory, a case file directory, a source code file and a function export file.
In the embodiment, a scheme for realizing the association of independent development and real use scenes of the components is provided, the components can be directly developed in a production environment through the scheme, the development and debugging cost of the components is effectively reduced, and the same dependence of the components can be subjected to inductive management in a dynamic dependence injection mode, so that the scene construction and capability customization of the components are facilitated.
For convenience of description, the above parts are described as being functionally divided into modules (or units) respectively. Of course, the functions of each module (or unit) may be implemented in the same piece or pieces of software or hardware when implementing the present application.
Having described methods and apparatus for component development of exemplary embodiments of the present application, next, an electronic device according to another exemplary embodiment of the present application is described.
Those skilled in the art will appreciate that the various aspects of the present application may be implemented as a system, method, or program product. Accordingly, aspects of the present application may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
The specific implementation manner of each module in the apparatus in the above embodiment has been described in detail in the embodiment related to the method, and will not be described in detail herein.
The principle of solving the problem of the electronic device is similar to that of the method of the above embodiment, so that the implementation of the electronic device can be referred to the implementation of the method, and the repetition is omitted.
Referring to fig. 16, fig. 16 is a block diagram of an electronic device 1600 according to an exemplary embodiment, where the electronic device in the embodiment of the present application includes at least one processor 1601 and a memory 1602 connected to the at least one processor 1601, a specific connection medium between the processor 1601 and the memory 1602 is not limited in the embodiment of the present application, and in fig. 16, a connection between the processor 1601 and the memory 1602 is taken as an example, and in fig. 16, a connection manner between other components is shown by a bold line, and the connection manner between other components is merely illustrative and not limitative. Bus 1600 may be divided into address bus, data bus, control bus, etc., and is represented by only one thick line in fig. 16 for ease of illustration, but does not represent only one bus or one type of bus.
In the embodiment of the present application, the memory 1602 stores instructions executable by the at least one processor 1601, and the at least one processor 1601 may perform steps included in the method for component development described above by executing the instructions stored in the memory 1602.
The processor 1601 is a control center of the electronic device, and may use various interfaces and lines to connect various parts of the entire fault detection device, and by executing or executing instructions stored in the memory 1602 and invoking data stored in the memory 1602, various functions of the electronic device and processing the data, thereby performing overall monitoring of the electronic device. Alternatively, the processor 1601 may include one or more processing units, and the processor 1601 may integrate an application processor and a modem processor, where the processor 1601 primarily processes an operating system, user interface, application program, etc., and the modem processor primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 1601. In some embodiments, the processor 1601 and the memory 1602 may be implemented on the same chip, and in some embodiments they may be implemented separately on separate chips.
The processor 1601 may be a general purpose processor such as a Central Processing Unit (CPU), digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, and may implement or perform the methods, steps and logic blocks disclosed in the embodiments of the present application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in the processor for execution.
Memory 1602 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 1602 may include at least one type of storage medium, which may include, for example, flash Memory, hard disk, multimedia card, card Memory, random access Memory (Random Access Memory, RAM), static random access Memory (Static Random Access Memory, SRAM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read-Only Memory (ROM), electrically erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory), magnetic Memory, magnetic disk, optical disk, and the like. Memory 1602 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1602 in the present embodiment may also be a circuit or any other device capable of implementing a memory function for storing program instructions and/or data.
Based on the same inventive concept, the embodiment of the present application also provides a further schematic diagram of an electronic device, referring to fig. 17, the electronic device 100 includes a display unit 1740, a processor 1780, and a memory 1720, where the display unit 1740 includes a display panel 1741 for displaying information input by a user or information provided to the user, and various object selection interfaces of the electronic device 100, and the like, and in the embodiment of the present application is mainly used for displaying related operation interfaces, shortcut windows, and the like of social software installed in the electronic device 100. Alternatively, the display panel 1741 may be configured in the form of an LCD (Liquid Crystal Display) or an OLED (Organic Light-Emitting Diode) or the like.
The processor 1780 is configured to read the computer program and then execute a method defined by the computer program, for example, the processor 1780 reads an application program of the social software, so as to run the social software on the electronic device 100, and display a relevant operation interface of the social software on the display unit 1740. The processor 1780 may include one or more general-purpose processors and may also include one or more DSPs (Digital Signal Processor, digital signal processors) for performing related operations to implement the solutions provided by the embodiments of the present application.
Memory 1720 typically includes memory and external memory, and memory may be Random Access Memory (RAM), read Only Memory (ROM), CACHE memory (CACHE), etc. The external memory can be a hard disk, an optical disk, a USB disk, a floppy disk, a tape drive, etc. Memory 1720 is used to store computer programs, including applications corresponding to respective software, etc., and other data, which may include data generated after an operating system or application is run, including system data (e.g., configuration parameters of the operating system) and user data. Program instructions in the embodiments of the present application are stored in memory 1720 and processor 1780 executes the program instructions stored in memory 1720 to perform the functions of the methods of component development discussed previously.
In addition, the electronic device 100 may further include a display unit 1740 for receiving input digital information, character information, or touch operation/noncontact gestures, and generating signal inputs related to user settings and function controls of the electronic device 100, etc. Specifically, in the embodiment of the present application, the display unit 1740 may include a display panel 1741. The display panel 1741, e.g., a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of a target object on the display panel 1741 or on the display panel 1741 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a predetermined program. Alternatively, the display panel 1741 may include two parts, a touch detection device and a touch controller. The touch detection device comprises a touch controller, a touch detection device and a touch control device, wherein the touch detection device is used for detecting a touch direction of a user, detecting a signal brought by touch operation and transmitting the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 1780, and can receive commands from the processor 1780 and execute them. In this embodiment of the present application, if the user performs the selection operation on the associated subroutine, the touch detection device in the display panel 1741 detects the touch operation, and then the touch controller sends a signal corresponding to the detected touch operation, the touch controller converts the signal into contact coordinates and sends the contact coordinates to the processor 1780, and the processor 1780 determines the associated subroutine selected by the user according to the received contact coordinates, and controls the display panel 1741 to display an interface for inputting the login account number and the login password, or controls the display panel 1741 to display an interface for successfully logging in the associated subroutine.
The display panel 1741 may be implemented by various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the display unit 1740, the electronic device 100 may further include an input unit 1730, and the input unit 1730 may include, but is not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc. In fig. 17, an example is shown in which the input unit 1730 includes an image input device 1731 and other input devices 1732.
In addition to the above, the electronic device 100 may also include a power supply 1790 for powering other modules, audio circuitry 1760, a near field communication module 1770, and RF circuitry 1710. The electronic device 100 may also include one or more sensors 1750, such as acceleration sensors, light sensors, pressure sensors, and the like. The audio circuit 1760 specifically includes a speaker 1761, a microphone 1762, and the like, and for example, the user can use voice control, the electronic device 100 can collect the sound of the user through the microphone 1762, can control the sound of the user, and play a corresponding prompting sound through the speaker 1761 when the user needs to be prompted.
In an exemplary embodiment, a storage medium is also provided that includes operations, such as memory 1602 including operations that are executable by processor 1601 of electronic device 1600 to perform the above-described method. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
Various aspects of the method of component development provided herein, as well as the above method embodiments, may also be implemented in the form of a program product comprising program code for causing an electronic device to carry out the steps of the method of component development according to the various exemplary embodiments of the present application described herein above, when the program product is run on an electronic device, e.g. the electronic device may carry out the steps as shown in fig. 3, based on the same inventive concept.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product of embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and include program code and may run on a server. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with a command execution system, apparatus, or device.
The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with a command execution system, apparatus, or device.
Program code embodied on a 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.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (15)

1. A method of component development, the method comprising:
obtaining dependency data corresponding to a component to be developed, wherein the dependency data comprises: the universal attribute corresponding to the component to be developed and the method for processing the attribute;
when a pre-stored dependent object matched with the dependent data exists, acquiring the dependent object, wherein the dependent object is generated based on the dependent data corresponding to the preset component function use requirement;
storing the pre-stored dependent object under a component source code file corresponding to the component to be developed to obtain a new component source code file, and operating the new component source code file to obtain a corresponding target component;
Performing function debugging on the target component to obtain a debugging result;
and outputting the debugged target component when the debug result meets the preset condition.
2. The method of claim 1, wherein performing the function debugging on the target component to obtain a debugging result comprises:
packaging the target components into target components which accord with the production environment deployment, and debugging the target components which accord with the production environment deployment to obtain a debugging file;
switching the storage path of the debugging file into the storage path in the production environment, and developing and debugging the target component in the production environment to obtain the debugging result.
3. The method according to claim 1 or 2, wherein the pre-stored dependent objects are determined based on:
based on the use requirement of the preset component function, corresponding dependent data are obtained;
constructing a data cache class based on the dependent data; the data cache class is used for supporting the storage of the dependent data;
based on a preset object establishment method, obtaining dependent data in the data cache class;
and generating and storing a corresponding dependent object based on the dependent data and the object identification.
4. The method of claim 1 or 2, wherein the dependent objects include object identifications, attributes, and methods to support setting dependent data at initialization, updating dependent data on demand, and retrieving dependent data on demand.
5. The method of claim 4, wherein the method further comprises:
and setting at least one application scene for the component to be developed based on the method for updating the dependent data on demand.
6. The method of claim 1, wherein after the obtaining the dependency data corresponding to the component to be developed, the method further comprises:
when determining that a pre-stored dependent object matched with the dependent data corresponding to the component to be developed does not exist, constructing a new data cache class based on the dependent data corresponding to the component to be developed; the new data cache class is used for supporting the storage of dependent data corresponding to the component to be developed;
based on a preset object establishment method, obtaining the dependent data in the new data cache class, and generating and storing a corresponding new dependent object based on the dependent data corresponding to the component to be developed and a new object identifier.
7. The method of claim 1, wherein prior to the obtaining the dependent data corresponding to the development component, the method further comprises:
determining a component identifier and a target template corresponding to the component to be developed;
initializing the component to be developed by using the target template through a script command to obtain the component to be developed containing a file corresponding to the target template; the to-be-developed component containing the target template corresponding file at least comprises a file directory for a functional debugging case file, a source code file containing realization dependency capability and a file for exporting the to-be-developed component.
8. An apparatus for component development, the apparatus comprising:
the first obtaining unit is configured to obtain dependency data corresponding to a component to be developed, where the dependency data includes: the universal attribute corresponding to the component to be developed and the method for processing the attribute;
the second acquisition unit is used for acquiring the dependent object when the pre-stored dependent object matched with the dependent data exists, wherein the dependent object is generated based on the dependent data corresponding to the preset component function use requirement;
The first obtaining unit is used for storing the pre-stored dependent object under the component source code file corresponding to the component to be developed to obtain a new component source code file, and operating the new component source code file to obtain a corresponding target component;
the second obtaining unit is used for performing function debugging on the target component to obtain a debugging result; and outputting the debugged target component when the debug result meets the preset condition.
9. The apparatus according to claim 8, wherein the second obtaining unit is specifically configured to:
packaging the target components into target components which accord with the production environment deployment, and debugging the target components which accord with the production environment deployment to obtain a debugging file;
switching the storage path of the debugging file into the storage path in the production environment, and developing and debugging the target component in the production environment to obtain the debugging result.
10. The apparatus of claim 8 or 9, wherein the pre-stored dependent object is determined based on:
based on the use requirement of the preset component function, corresponding dependent data are obtained;
Constructing a data cache class based on the dependent data; the data cache class is used for supporting the storage of the dependent data;
based on a preset object establishment method, obtaining dependent data in the data cache class;
and generating and storing a corresponding dependent object based on the dependent data and the object identification.
11. The apparatus of claim 8 or 9, wherein the dependent objects include object identifications, attributes, and methods to support setting dependent data at initialization, updating dependent data on demand, and retrieving dependent data on demand.
12. The apparatus of claim 11, wherein the apparatus further comprises a processing unit to:
and setting at least one application scene for the component to be developed based on the method for updating the dependent data on demand.
13. The apparatus of claim 8, wherein the second acquisition unit is further configured to:
when determining that a pre-stored dependent object matched with the dependent data corresponding to the component to be developed does not exist, constructing a new data cache class based on the dependent data corresponding to the component to be developed; the new data cache class is used for supporting the storage of dependent data corresponding to the component to be developed;
Based on a preset object establishment method, obtaining the dependent data in the new data cache class, and generating and storing a corresponding new dependent object based on the dependent data corresponding to the component to be developed and a new object identifier.
14. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any of claims 1-7 when the program is executed.
15. A computer readable storage medium, characterized in that it comprises a program code for causing an electronic device to perform the steps of the method according to any one of claims 1-7, when the program product is run on said electronic device.
CN202111373794.2A 2021-11-19 2021-11-19 Method and device for developing components, electronic equipment and storage medium Pending CN116149639A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111373794.2A CN116149639A (en) 2021-11-19 2021-11-19 Method and device for developing components, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111373794.2A CN116149639A (en) 2021-11-19 2021-11-19 Method and device for developing components, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116149639A true CN116149639A (en) 2023-05-23

Family

ID=86339381

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111373794.2A Pending CN116149639A (en) 2021-11-19 2021-11-19 Method and device for developing components, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116149639A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117170889A (en) * 2023-11-01 2023-12-05 沐曦集成电路(上海)有限公司 Heterogeneous non-blocking data packet synchronous processing system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117170889A (en) * 2023-11-01 2023-12-05 沐曦集成电路(上海)有限公司 Heterogeneous non-blocking data packet synchronous processing system
CN117170889B (en) * 2023-11-01 2024-01-23 沐曦集成电路(上海)有限公司 Heterogeneous non-blocking data packet synchronous processing system

Similar Documents

Publication Publication Date Title
CN110020292B (en) Webpage content extraction method and terminal equipment
CN105940654B (en) Franchise static web application in trust
CN101866299B (en) Method and system for modifying the execution of a native application running on a portable electronic device
CN108549568B (en) Application entry processing method and device, storage medium and electronic equipment
US11797273B2 (en) System and method for enhancing component based development models with auto-wiring
CN109408136A (en) Information processing method, device, storage medium and electronic equipment
CN104704468A (en) Cross system installation of WEB applications
CN114327688B (en) Data processing method, frame, storage medium and terminal equipment based on micro front end
CN108418797B (en) Webpage access method and device, computer equipment and storage medium
CN105243407A (en) Method and device for reading and writing smart card
CN108605220A (en) A kind of application processing method and device of universal embedded integrated circuit card
CN103605527A (en) System and method for realizing cloud computing application interface integration and unified style display
US20180101574A1 (en) Searching index information for application data
CN112882709A (en) Rendering method, device and equipment based on container engine system and storage medium
CN110168496A (en) The method and system presented for application
CN111078424A (en) Information interaction method and device, computer equipment and storage medium
CN114461223A (en) Code generation method and device and terminal equipment
CN116149639A (en) Method and device for developing components, electronic equipment and storage medium
CN112764746A (en) Data processing method and device, electronic equipment and storage medium
CN109145598B (en) Virus detection method and device for script file, terminal and storage medium
CN112448909A (en) Electronic lock management method, device, system and storage medium
CN114661274A (en) Method and device for generating intelligent contract
CN114489698A (en) Application program installation method and device
CN111865936A (en) Intelligent contract implementation method and device, computer equipment and storage medium
CN111666581A (en) Data protection method, device, equipment and medium

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