CN116610385A - Application generation method, apparatus, computer device, storage medium, and program product - Google Patents

Application generation method, apparatus, computer device, storage medium, and program product Download PDF

Info

Publication number
CN116610385A
CN116610385A CN202310627193.2A CN202310627193A CN116610385A CN 116610385 A CN116610385 A CN 116610385A CN 202310627193 A CN202310627193 A CN 202310627193A CN 116610385 A CN116610385 A CN 116610385A
Authority
CN
China
Prior art keywords
application
configuration information
module
generating
page
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
CN202310627193.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.)
Industrial Bank Co Ltd
CIB Fintech Services Shanghai Co Ltd
Original Assignee
Industrial Bank Co Ltd
CIB Fintech Services Shanghai 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 Industrial Bank Co Ltd, CIB Fintech Services Shanghai Co Ltd filed Critical Industrial Bank Co Ltd
Priority to CN202310627193.2A priority Critical patent/CN116610385A/en
Publication of CN116610385A publication Critical patent/CN116610385A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The present application relates to an application generating method, apparatus, computer device, storage medium and computer program product. The method comprises the following steps: receiving configuration information of a target application, generating an application framework of the target application according to the configuration information, acquiring local static resources used by the target application, loading the local static resources into the application framework, generating application service functions according to the description of the configuration information, and constructing an application installation package of the target application according to the application framework loaded with the local static resources and the application service functions. The method simplifies the generation process of the application installation package, simplifies the application development process, reduces repeated development, shortens the development period and improves the development efficiency of the application.

Description

Application generation method, apparatus, computer device, storage medium, and program product
Technical Field
The present application relates to the field of computer software development, and in particular, to an application generating method, an apparatus, a computer device, a storage medium, and a computer program product.
Background
With the continuous development and popularization of mobile applications in the financial industry, various financial products and services are gradually expanded to mobile terminals. Functional iterations of mobile applications in the financial industry and standardized developments in enterprise-level application design have led to many applications having similar page components and standardized business processes.
Although these applications have a certain commonality, their development still requires a lot of repeated work, resulting in a long development cycle.
Disclosure of Invention
In view of the foregoing, it is desirable to provide an application generating method, apparatus, computer device, computer-readable storage medium, and computer program product that can simplify the application development process and shorten the development cycle of mobile applications.
In a first aspect, the present application provides an application generation method. The method comprises the following steps:
receiving configuration information of a target application;
generating an application framework of the target application according to the configuration information;
acquiring a local static resource used by the target application, and loading the local static resource into the application framework;
generating an application service function according to the description of the configuration information;
and constructing an application installation package of the target application according to the application framework loaded with the local static resource and the application service function.
In one embodiment, after the receiving the configuration information of the target application, the method further includes:
processing a static resource path in the configuration information;
judging whether a remote data source is used according to the configuration information, if so, clearing the local data source in the configuration information, and if not, reserving the local data source in the configuration information. In one embodiment, the method comprises: traversing the fields in the configuration information, finding out the fields representing the static resource paths, and uniformly converting the static resource paths corresponding to the fields into standard static resource paths;
and/or converting the static resource address of the relative path or the absolute path into a resolvable expression mode of the target application.
In one embodiment, the method comprises:
loading a prefabricated application template;
replacing corresponding variables in the application template by using the data in the configuration information;
and generating an application framework through the replaced application template, wherein the application framework comprises at least one of a basic application framework, a public component and public service.
In one embodiment, the method comprises:
Loading a business module template;
analyzing the service module configuration in the configuration information, and generating a service module according to the service module template and the service module configuration;
determining the routing information of the service module;
loading a page template;
generating a structure, a style and a business logic flow of the page according to the configuration information and the page template;
determining the route information of the page;
and generating an application service function according to the service module and the corresponding routing information, the structure and style of the page, the service logic flow and the routing information of the page.
In one embodiment, the method comprises: the configuration information includes at least one of application basic information, environment variables, module information, page description information, page service logic description information, and client component description information.
In a second aspect, the application further provides an application generating device. The device comprises:
the configuration information receiving module is used for receiving the configuration information of the target application;
the application framework generation module is used for generating an application framework of the target application according to the configuration information;
the static resource processing module is used for acquiring local static resources used by the target application and loading the local static resources into the application framework;
The service function generating module is used for generating an application service function according to the description of the configuration information;
and the application construction module is used for constructing an application installation package of the target application according to the application framework loaded with the local static resource and the application service function.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor executing the method according to any of the implementations of the first aspect described above.
In a fourth aspect, there is provided a computer readable storage medium storing computer readable program instructions which, when run on a computer, cause the computer to perform a method as described in any one of the implementations of the first aspect above.
In a fifth aspect, there is provided a computer program product comprising computer readable program instructions which, when run on a computer, cause the computer to perform the method as described in any of the implementations of the first aspect above.
The application generating method, the device, the computer equipment, the storage medium and the computer program product are used for generating an application framework of the target application according to the configuration information by receiving the configuration information of the target application, acquiring local static resources used by the target application, loading the local static resources into the application framework, and generating application service functions according to the description of the configuration information; and finally, constructing an application installation package of the target application according to the application framework loaded with the local static resources and the application service function, generating the application framework through configuration information, adding the local static resources into the application framework, and constructing the application installation package according to the application framework and the application service function, thereby simplifying the generation process of the application installation package, simplifying the application development process, reducing repeated development, shortening the development period and improving the development efficiency of the application.
Drawings
FIG. 1 is an application environment diagram of an application generation method in one embodiment;
FIG. 2 is a flow diagram of an application generation method in one embodiment;
FIG. 3 is a flow diagram of the steps of an application generating business function in one embodiment;
FIG. 4 is a flow diagram of application generation in another embodiment;
FIG. 5 is a block diagram of an application generating device in one embodiment;
FIG. 6 is an internal block diagram of a computer device in one embodiment when the computer device is a server;
fig. 7 is an internal configuration diagram of a computer device in one embodiment when the computer device is a terminal.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The application generation method provided by the embodiment of the application can be applied to an application environment shown in figure 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
FIG. 2 is a flow diagram of an application generation method in one embodiment. As shown in fig. 2, the application generating method includes steps 202 to 210.
Step 202, receiving configuration information of a target application.
The configuration information refers to some parameters or attributes which need to be predefined in the application development or deployment process and are used for specifying the behavior and characteristics of the application. When an application is generated, some necessary information is often required, such as the name of the application, version number, developer information, application description, interface design, etc. This information, commonly referred to as application configuration information, is used to describe the basic properties and features of the application and is the basis in the application generation process. The target application is an application to be generated.
In this embodiment, after receiving the configuration information of the mobile application, the configuration information is initialized and optimized, so as to meet the application generation requirements in different scenarios, so that the subsequent application generation flow can be efficiently and accurately performed.
Optionally, the configuration information includes application basic information, environment variables, module information, page description information, page service logic description information, and client component description information. Wherein:
Basic information: refers to basic information of an application, such as an application name, an application version, an application icon, and the like.
Environmental variable: refers to parameters that the application needs to configure in different environments, such as server address, API (Application Programming Interface ) interface address, debug mode, etc.
Module information: refers to modules in an application, such as a login module, a personal center module, an order module, and the like. Each module contains an associated set of functional pages and business logic.
Page description information: refers to pages in an application, such as a top page, item detail page, order list page, etc. The page description information includes layout, style, components, etc. of the page.
Page business logic description information: business logic of pages in the application comprises page jump logic, page data processing logic, user interaction logic and the like.
Client component description information: refers to client components used in applications, including UI (USER INTERFACE Module, user interface components) components, business logic components, and the like. The client component description information includes names, versions, dependencies, etc. of the components.
The application configuration information is passed to the application generating means for generating the application from the information. Typically, the configuration information may be provided via some configuration file, template, or other data source. Upon receiving the configuration information, the application generating device needs to ensure that it can properly parse and process the configuration information in order to be able to generate the correct application.
And 204, generating an application framework of the target application according to the configuration information.
The application framework is an application infrastructure and comprises an application infrastructure, public components, public services and the like. Specifically, some application templates may be preset according to the configuration information, where the application templates include a base frame template, a common component template, and a common service template. The application template can be designed in advance, can be a well-designed page layout, can be an implemented business logic flow, and the like. Some variables, such as application names, application icons, etc., are preset in the application template, and the values of these variables need to be replaced according to the configuration information of the target application.
In this embodiment, in the process of generating the application skeleton of the target application according to the configuration information, a preset application template needs to be loaded first, then corresponding variables in the template are replaced according to data in the configuration information, and finally the application skeleton is generated through the replaced template. The generated application skeleton may include a basic application skeleton, a public component, a public service, etc., which is an infrastructure of the target application, and the subsequent business logic and page design are performed based on the basic application skeleton and the public component.
Step 206, obtaining the local static resources used by the target application, and loading the local static resources into the application skeleton.
The local static resources mainly refer to pictures, audio, video and font files. When an application runs, various resources, such as pictures, style sheets, scripts, etc., need to be loaded, including local resources and remote resources, and for local resources, the local resources are typically packaged into an application installation package for offline access.
In this embodiment, after the application skeleton is generated, local static resources required by the target application need to be acquired and loaded into the application skeleton, where in general, these static resources are packaged into one or more files and loaded into the memory when the application is started. The process of loading the static resource may be accomplished in various ways, such as by requesting the static resource from a server via HTTP (Hyper Text Transfer Protocol ) or by directly reading the static resource file via a local file system. The target application can be correctly displayed and run on the terminal equipment, and meanwhile, the loading speed and performance of the application are improved.
Some problems, such as caching policy of resources, compression of resources, path of files, file names, etc., need to be noted in the process of loading local static resources. In order to improve the application performance, some optimization measures, such as caching resources, compressing resources, etc., are generally adopted, so as to ensure that the file can be correctly found and loaded, and improve the performance and user experience of the application. In addition, the size and the number of static resources are required to be paid attention to, and the efficiency of application loading and running is ensured.
And step 208, generating application service functions according to the description of the configuration information.
In this embodiment, after receiving configuration information of a mobile application, according to module information and page description information in the configuration information, a system automatically loads a preset service module and page template, and generates specific service functions and page contents by analyzing the service module configuration and page description information in the configuration information. Specifically, the system generates a corresponding service module according to the service module template and the service module configuration, and declares the routing information of the service module. Then, the system generates specific page structure, style and business logic flow according to the page template and the page description information, and determines the routing information of the page. Finally, the system constructs the application service function according to the generated service module, the page content and the routing information thereof. In this way, in the whole application development process, the developer only needs to provide the required configuration information, and the system can automatically complete the generation of the application service function, so that the development efficiency and the working efficiency of the developer are greatly improved.
And 210, constructing an application installation package of the target application according to the application framework loaded with the local static resource and the application service function.
Where the application installation package may be deployed on a mobile device for installation and use by a user, the processor may optionally package the application framework and business functions into an executable file or otherwise into a format recognizable and installable by the mobile device, such as APK (Android Package) or IPA (iOS App Store Package), etc.
In the method for generating the application, the configuration information of the target application is received, and an application framework of the target application is generated according to the configuration information; acquiring a local static resource used by the target application, and loading the local static resource into the application framework; generating an application service function according to the description of the configuration information; and constructing an application installation package of the target application according to the application framework loaded with the local static resource and the application service function, thereby improving the development efficiency of the application program, reducing the development cost and bringing convenience to a developer.
In one embodiment, after the receiving the configuration information of the target application, the method further comprises: processing a static resource path in the configuration information; judging whether a remote data source is used according to the configuration information, if so, clearing the local data source in the configuration information, and if not, reserving the local data source in the configuration information.
Wherein the static resource path is used to refer to static resources used in a website or application program, such as images, CSS files, javaScript files, etc. By using static resource paths, websites or applications can more efficiently load and manage these resources, thereby improving performance and user experience. Typically, the static resource path is relative to the root directory of the website or application, so these resources can be easily referenced in the code.
In this embodiment, with Angular as an example, angular is a popular front end framework that is widely used to construct dynamic and efficient single page applications. It provides rich features such as data binding, modularization, route management, etc., so that developers can construct complex applications more conveniently.
In angular, the static resource path in the project is configured using an angular. Json file. In this file, the assets attributes can be defined to specify the static resource folder path that needs to be packaged. For example:
"assets":[
"src/favicon.ico",
"src/assets"
]
in the above example, all files in the src/favicon. Ico and src/packages folders would be packaged.
When these static resources are used in an application, they can be accessed through the relative path. For example, if there is a file named logo. Png in the src/views folder, it can be displayed in the HTML page using the following code:
<img src="./assets/logo.png">
Wherein/in the path represents the path relative to the current file. If the resource is used in other folders, the path needs to be changed accordingly.
Judging whether a remote data source is used according to the configuration information, when the remote data source is used, clearing a local data source in the configuration information, ensuring the accuracy of the data source, and if the remote data source is not used, reserving the local data source in the configuration information, and ensuring the existence of the data source.
Optionally, if information about components of the remote data source (e.g., database, cache, etc.) is used in the configuration file, including connection address, user name, password, etc. The sensitive data can be cleared when the configuration information is optimized, so that the safety of the system is ensured.
If not only sensitive data but also necessary component data are cleared in the process of clearing configuration information, the system may not operate normally. Thus, care needs to be taken to preserve the necessary component data to ensure that the system can access and operate properly from the remote data source when the configuration information is cleaned.
In this embodiment, by processing the static resource path in the configuration information, it is ensured that the target application can correctly process the key information during generation, thereby improving the usability and stability of the application program. And then, generating a basic framework of the target application according to the processed static resource path and the component data, wherein the basic framework comprises an overall structure, a style, preset public components, preset services and the like. The basic framework provides an extensible and easy-to-maintain application structure for subsequent business function generation, thereby realizing efficient and reliable application program development.
In one embodiment, the processing the static resource path in the configuration information includes:
traversing the fields in the configuration information, finding out the fields representing the static resource paths, and uniformly converting the static resource paths corresponding to the fields into standard static resource paths; and/or converting the static resource address of the relative path or the absolute path into a resolvable expression mode of the target application.
In this embodiment, the processing related to the static resource path flow in the processing configuration information generally includes two processing logics:
in one aspect, there may be multiple static resource paths in the configuration information transmitted from each platform, such as "photo/a.png", "images/a.png", where processing logic determines that these are static resource paths and then uniformly converts them to "/resources/images/a.png" by string replacement.
On the other hand, because of the need for application parsing, the static resource address of the relative path or absolute path is converted into an application-parsable expression, such as "/resources/images/a.png" into "request ('/resources/images/a png')".
In one embodiment, generating the application skeleton of the target application according to the configuration information includes: loading a prefabricated application template; replacing corresponding variables in the application template by using the data in the configuration information; and generating an application framework through the replaced application template, wherein the application framework comprises at least one of a basic application framework, a public component and public service.
First, a pre-made application template is loaded. An application template is a predefined file containing the basic structure and elements of an application program, which can be customized according to different application requirements. Loading the prefabricated application template is beneficial to improving the development efficiency and ensuring that the structure and design of the application program accord with the unified standard.
Second, the data in the configuration information is used to replace the corresponding variables in the application template. This process replaces placeholders or variables in the application template with actual data and information to generate an application that meets the particular requirements. This flexibility enables the generated application framework to meet a variety of different business scenarios.
And finally, generating an application framework through the replaced application template. An application framework is an application structure that contains at least one element of a basic application framework, a public component, a public service, and the like. The basic application framework provides a stable foundation for the whole application program, and ensures that the core functions of the application program are realized. The common components and common services provide some common functions and services for the application programs to meet common business requirements.
In this embodiment, an application skeleton may be generated that meets specific requirements and scenarios. The application framework can be used as a basis for subsequent development work, and the expandability, the maintainability and the stability of the application program are ensured. Meanwhile, the method is also beneficial to improving the development efficiency of the application program and reducing unnecessary repeated work.
FIG. 3 is a flow diagram of the steps of generating an application business function in one embodiment. As shown in fig. 3, the application generation method includes steps 302 to 314.
Step 302, a business module template is loaded.
Firstly, a business module template is a preset business logic structure and comprises a series of standard functions and processing flows, and the templates comprise various template types, such as templates for different business scenes such as data display, data input, data processing or transfer modules and the like. By loading the business module template, the target business module can be quickly constructed on the basis.
And step 304, analyzing the service module configuration in the configuration information, and generating a service module according to the service module template and the service module configuration.
Therein, configuration information is read, which is typically stored in JSON format. The processor parses portions of the configuration information about the business modules to facilitate understanding and extracting key information therein, such as module names, functions of the modules, user interface designs, user interactions, relationships between the modules, and the like.
The processor merges the service module template and the service module configuration to generate a corresponding service module. The service module comprises a series of specific functions and processing flows, and can meet specific service requirements.
Step 306, determining the routing information of the service module.
The routing information is key information for guiding a user to navigate in the application, and comprises access paths of various pages or functional modules and the like. The processor reads a file path of a file where the service module is located, and determines routing information of the service module according to the file path. The routing information of the service module is determined, so that a user can be helped to operate in the application more conveniently.
Step 308, loading the page template.
The page template is a preset page design structure containing a series of standard layouts and styles. By loading the page template, a target page can be quickly constructed on the basis.
And step 310, generating the structure, style and business logic flow of the page according to the configuration information and the page template.
Wherein, the structure: generally referred to as HTML (HyperText Markup Language); style: generally CSS (Cascading Style Sheets); business logic: typically JavaScript or TypeScript code; business logic defines what happens when a user interacts with a page, such as when the user clicks a button or submits a form.
The step fuses the configuration information and the page template to generate a corresponding page. This page will contain a series of specific layouts, styles, and business logic flows that can meet specific page requirements.
Step 312, determining the routing information for the page.
The routing information is key information for guiding a user to navigate in a page, and comprises access paths of various elements or functional modules and the like. Determining routing information of a page can help a user to operate in the page more conveniently by defining routing paths in the decorator of the component.
Wherein, the decorator is a way to add metadata to code in JavaScript language. They are a special type of declaration that can be attached to class declarations, methods, properties or parameters. When decorators are attached, they can modify or enhance the behavior of the decorated elements.
In Angular, the decorator is used to communicate metadata to the Angular framework itself, such as which component is associated with which template, or which method should act as an event handler, etc.
And step 314, generating an application service function according to the service module and the corresponding routing information, the structure and style of the page, the service logic flow and the routing information of the page.
Where HTML provides the basic structure of a page, defining the head, body, footer, title, paragraph, list, etc. of the page by elements and tags. In Angular, your component templates are typically composed of HTML. CSS is responsible for visual manifestations of the page, such as color, font, spacing, layout, etc. The style of the component may be specified in the decorator of the Angular component by style earls or styles attributes. Business logic: this is often referred to as JavaScript or TypeScript code. Business logic defines what happens when a user interacts with a page, such as when the user clicks a button or submits a form. In Angular, business logic is typically written in component classes.
And finally, integrating all the elements to generate a final application service function. The application business function comprises a series of specific business processing flows and user interaction interfaces, and can meet specific application requirements.
In this embodiment, the application service function can be generated according to the description of the configuration information, so that the efficiency and flexibility of application development are further improved. Meanwhile, the application development is carried out by adopting a template and configuration information mode, so that the development process is more standard and standardized, errors and inconsistencies caused by manual programming are avoided, and the quality and stability of the application are improved. More specifically, the business module and page generation process is essentially an automatic programming process based on configuration information and templates. This process includes not only code generation but also determination of routing information and design of business logic. The business modules and pages meeting different requirements can be quickly generated according to different configuration information, and the efficiency of application development is greatly improved. And determination of routing information, which is key to enabling a user to navigate through an application. By determining the routing information of the service module and the page, the navigation structure meeting the use habit of the user is realized, and the user experience is improved.
In this embodiment, adjustment and optimization can be performed according to actual requirements. For example, different business module templates and page templates can be selected as required to meet different business requirements; the analysis mode of the configuration information can also be adjusted to adapt to different configuration formats and structures.
In general, the configuration information and the template are utilized in the embodiment, so that automation and standardization of application development are realized, the efficiency and quality of application development are greatly improved, and better user experience is provided.
FIG. 4 is a flow diagram of an application generation method in one embodiment, as shown in FIG. 4, including.
Step 402, static resource path preprocessing.
In connection with Angular, for example, angular is a popular front end framework that is widely used to construct dynamic and efficient single page applications. It provides rich features such as data binding, modularization, route management, etc., so that developers can construct complex applications more conveniently.
After receiving the configuration information of the generation target application, initializing and optimizing the configuration information, specifically, firstly processing a static resource path in the configuration information, and simultaneously cleaning remote data source component data used in the configuration information.
Wherein static resource paths provided in the configuration information, such as "photo/a.png", "images/a.png", are obtained, at which time processing logic determines that these are static resource paths, and then converts them uniformly to "/resources/images/a.png" in a string replacement manner, ensuring that these paths are standard and accessible. Static resources may include images, style sheets, and JavaScript files, etc., that are typically stored in the assets folder. At this step, the specific paths of resource loads can be validated and ensure that the paths of the resources remain properly accessible after project construction.
Step 404, determining whether to use the remote data source according to the configuration information, if yes, executing step 406, and if not, executing step 408.
After the static resource path is preprocessed, the data source needs to be determined, and whether the data source is a local data source or a remote data source is judged.
Step 406 clears the local data source and continues with step 408.
In step 408, the configuration information of the application is checked.
Where, for the first time an application is built, if the system needs to use remote data sources, it will filter out local data sources to avoid resource conflicts. If the system does not use a remote data source, the process continues to the next step.
The system checks the application configuration information to ensure that the configuration information of all applications is correct and adapted.
Step 410, loading an application template.
In Angular, the structure and appearance of the application is largely determined by the assembly and the template. This step involves loading a predefined Angular component and template.
Step 412, replace the variable.
The system will replace the variables in the application template with the actual values in the configuration information. For example, "{ appName }" in the template would be replaced with "a bank branch".
In step 414, an application skeleton is generated.
And generating an application framework according to the replaced template, wherein the application framework comprises a navigation bar, a bottom menu and other basic structures.
Step 416, static resource provisioning.
Static resources, such as application icons, pictures, etc., are acquired and loaded according to the configuration information.
In step 418, the service module configuration is legal.
The system will check if the business module configuration is legal, e.g., if the "account" module contains the necessary pages. In the case of the combination of an Angular framework, it is mainly the verification of the correctness of the Angular module configuration. Each module in the Angular framework has a decorator named NgModule that receives a metadata object that tells Angular how to compile and launch the module. The metadata object includes the following attributes:
declaration: the view classes inside the modules are listed here. Angular has three view categories: components, instructions, and pipes.
exports: a subset of the reusable components, instructions, and pipes stated in this module are listed here, and these reusable components can be used in templates for other modules.
Portals: some export classes that the module wants to use are listed here, from other modules.
providers: this is the creator of the set of services provided by this module. These services may be used by any part of the application (possibly any module or part of any component).
bootstrap: this is the main application view, called the root component, which hosts all other views in the application. Only the root module should set this bootstrap attribute.
In this step, the system will check whether all of these attributes of the module configuration exist, are in the correct format and type, refer to valid components, instructions or services, etc. If all checks pass, the module configuration can be considered legal and the next step can be performed; otherwise, an error will be thrown indicating an illegal place.
Step 420, load the business module template.
Corresponding module templates, such as templates of "account" modules, are loaded.
In step 422, a business module is generated.
A business module is generated, e.g., an "account" module, based on the business module template and the business module configuration.
In step 424, the page configuration is legal.
It is checked whether the configuration of each page is legal, e.g. whether the "account overview" page contains the necessary elements.
At step 426, the page template is loaded.
Corresponding page templates, e.g., templates of an "account overview" page, are loaded.
At step 428, a page component is generated.
Components of the page are generated from the page template and configuration information, such as components of an "account overview" page.
Step 430, generating a page routing configuration.
The target application generation system will generate a routing configuration for each page so that the user can access this page through the navigation bar or bottom menu.
In step 432, the application is built and the application is generated.
The system combines all modules, pages, components and routing configurations together to build and generate the final mobile application. Through this process, a bank branches to a mobile application that is tailored to its own needs and configuration information. This application not only contains all the required business functions, but also a suitable user interface and user experience.
All static resources of the application are already loaded into the application framework, and whether application icons, pictures or other static resources can be accessed without network connection. If there are certain pages or components that require the use of remote data sources, the information of these data sources has also been embedded into the application, ensuring that the data can be retrieved and updated normally in the presence of a network connection.
In the process, the system performs a plurality of validity checks to ensure that all module configuration and page configuration are legal and accord with the specification. This ensures that the resulting application not only operates properly, but also complies with all design and development specifications.
Finally, the system builds the final application from all modules, pages, components and routing configurations. This application contains all business functions and has a suitable user interface and user experience. The user can access all pages and functions through the navigation bar or bottom menu, while the developer can manage and update through the configuration information of this application.
In the embodiment, whether a remote data source is used is judged by preprocessing a static resource path, and if so, a local data source is filtered; if the application information is not used, continuing to judge and check the application information, if the application information is not used, loading an application template, replacing variables, generating an application skeleton, preparing static resources, judging whether the module configuration is legal or not, if the module configuration is legal, loading the module template, generating the module, judging whether the page configuration is legal or not, if the module configuration is legal, loading the page template, generating a page assembly, generating the page route configuration and constructing the application, thereby greatly simplifying the development and management of the mobile application, improving the development efficiency, and ensuring the quality and the stability of the application. Meanwhile, the application generated by the method has high expandability and maintainability, and convenience is provided for future updating and upgrading.
In one embodiment, a mobile application needs to be created for a branch of a bank. It is first necessary to obtain application configuration information for this branch. Such information may include the name, description, icons, function modules, page structures, static resource paths, etc. of the application. For example, we may have the following configuration information: "appName": "a bank branch", "description": "provide comprehensive banking services"; "name" account "," pages "[" account overview "," transfer "," deposit "]; "name" loan "," pages "i.e." loan application "," loan status ", and then, based on these configuration information, the application will start to be generated.
First, an application skeleton is generated. This skeleton includes the basic structure of the application, such as navigation bars, bottom menus, etc.
The static resources are then processed. This may include icons, pictures, audio, etc. of the application. These resources may be loaded into the application framework. Next, our system will generate application business functions as described by the configuration information. In our example, this may include an "account" module and a "loan" module. Each module may have multiple pages, for example, an "account" module has three pages of "account overview", "transfer" and "deposit".
Finally, our system will integrate these business functions into the application framework and then build the application installation package. The installation package is the final mobile application and can be directly installed and used.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides an application generating device for realizing the application generating method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiment of one or more application generating devices provided below may refer to the limitation of the application generating method hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 5, there is provided an application generating apparatus including: the system comprises a configuration information receiving module, an application framework generating module, a static resource processing module, a service function generating module and an application construction module, wherein:
the configuration information receiving module 502 is configured to receive configuration information of a target application.
And the application skeleton generating module 504 is configured to generate an application skeleton of the target application according to the configuration information.
The static resource processing module 506 is configured to obtain a local static resource used by the target application, and load the local static resource into the application skeleton.
And the service function generating module 508 is configured to generate an application service function according to the description of the configuration information.
And the application construction module 510 is configured to construct an application installation package of the target application according to the application skeleton loaded with the local static resource and the application service function.
In one embodiment, the device further comprises a path processing module and a cleaning module.
The path processing module is used for processing the static resource path in the configuration information;
cleaning component data using a remote data source in the configuration information;
The application skeleton generation module 504 is further configured to generate a base skeleton of the target application according to the processed static resource path and the component data.
In one embodiment, the path processing module is further configured to traverse the fields in the configuration information, find a field that represents the static resource path, and uniformly convert the static resource path corresponding to the field into a standard static resource path; and/or converting the static resource address of the relative path or the absolute path into a resolvable expression mode of the target application.
In one embodiment, the application skeleton generating module 504 is further configured to load a prefabricated application template, replace a corresponding variable in the application template with the data in the configuration information, and generate an application skeleton through the replaced application template, where the application skeleton includes at least one of a basic application skeleton, a public component, and a public service.
In one embodiment, the service function generating module 508 is further configured to load a service module template, parse the service module configuration in the configuration information, and generate a service module according to the service module template and the service module configuration; determining the routing information of the service module; loading a page template; generating a structure, a style and a business logic flow of the page according to the configuration information and the page template; determining the route information of the page; and generating an application service function according to the service module and the corresponding routing information, the structure and style of the page, the service logic flow and the routing information of the page.
In one embodiment, the configuration information includes at least one of application base information, environment variables, module information, page description information, page business logic description information, and client component description information.
In general, in this embodiment, a complete mobile application may be quickly generated according to preset configuration information. The method greatly improves the development efficiency and simultaneously ensures the quality and consistency of the application.
The respective modules in the above-described application generating apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing data. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an application generation method.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement an application generation method. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by persons skilled in the art that the structures shown in fig. 6 and 7 are block diagrams of only portions of structures associated with the present inventive arrangements and are not limiting of the computer device to which the present inventive arrangements are applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. An application generation method, the method comprising:
receiving configuration information of a target application;
generating an application framework of the target application according to the configuration information;
acquiring a local static resource used by the target application, and loading the local static resource into the application framework;
generating an application service function according to the description of the configuration information;
And constructing an application installation package of the target application according to the application framework loaded with the local static resource and the application service function.
2. The method of claim 1, wherein after the receiving the configuration information of the target application, the method further comprises:
processing a static resource path in the configuration information;
judging whether a remote data source is used according to the configuration information, if so, clearing the local data source in the configuration information, and if not, reserving the local data source in the configuration information.
3. The method of claim 2, wherein the processing the static resource path in the configuration information comprises:
traversing the fields in the configuration information, finding out the fields representing the static resource paths, and uniformly converting the static resource paths corresponding to the fields into standard static resource paths;
and/or converting the static resource address of the relative path or the absolute path into a resolvable expression mode of the target application.
4. The method of claim 1, wherein the generating an application skeleton of the target application from the configuration information comprises:
Loading a prefabricated application template;
replacing corresponding variables in the application template by using the data in the configuration information;
and generating an application framework through the replaced application template, wherein the application framework comprises at least one of a basic application framework, a public component and public service.
5. The method of claim 1, wherein said generating application service functions in accordance with the description of the configuration information comprises:
loading a business module template;
analyzing the service module configuration in the configuration information, and generating a service module according to the service module template and the service module configuration;
determining the routing information of the service module;
loading a page template;
generating a structure, a style and a business logic flow of the page according to the configuration information and the page template;
determining the route information of the page;
and generating an application service function according to the service module and the corresponding routing information, the structure and style of the page, the service logic flow and the routing information of the page.
6. The method of any one of claims 1 to 5, wherein the configuration information includes at least one of application base information, environment variables, module information, page description information, page business logic description information, and client component description information.
7. An application generating apparatus, the apparatus comprising:
the configuration information receiving module is used for receiving the configuration information of the target application;
the application framework generation module is used for generating an application framework of the target application according to the configuration information;
the static resource processing module is used for acquiring local static resources used by the target application and loading the local static resources into the application framework;
the service function generating module is used for generating an application service function according to the description of the configuration information;
and the application construction module is used for constructing an application installation package of the target application according to the application framework loaded with the local static resource and the application service function.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202310627193.2A 2023-05-30 2023-05-30 Application generation method, apparatus, computer device, storage medium, and program product Pending CN116610385A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310627193.2A CN116610385A (en) 2023-05-30 2023-05-30 Application generation method, apparatus, computer device, storage medium, and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310627193.2A CN116610385A (en) 2023-05-30 2023-05-30 Application generation method, apparatus, computer device, storage medium, and program product

Publications (1)

Publication Number Publication Date
CN116610385A true CN116610385A (en) 2023-08-18

Family

ID=87681569

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310627193.2A Pending CN116610385A (en) 2023-05-30 2023-05-30 Application generation method, apparatus, computer device, storage medium, and program product

Country Status (1)

Country Link
CN (1) CN116610385A (en)

Similar Documents

Publication Publication Date Title
US11561846B2 (en) API notebook tool
US10248634B2 (en) Model-driven data entry validation
JP7316349B2 (en) Customizable enterprise automation test framework
CN110806863A (en) Interface document generation method and device, electronic equipment and storage medium
US20150293764A1 (en) Method and system to compose and execute business rules
US9626351B2 (en) Status viewer
US20170102925A1 (en) Automatch process and system for software development kit for application programming interface
US11797273B2 (en) System and method for enhancing component based development models with auto-wiring
WO2014160107A2 (en) Systems and methods for creating or updating an application using a pre-existing application
US20140281859A1 (en) Enhanced mobilization of existing web sites
US8756407B2 (en) Configuration rule prototyping tool
EP3640817A1 (en) System and method to convert a webpage built on a legacy framework to a webpage compatible with a target framework
CN113721910A (en) Interface code generation method and device, electronic equipment and computer readable medium
Penberthy Beginning ASP. NET for Visual Studio 2015
US20230004477A1 (en) Providing a pseudo language for manipulating complex variables of an orchestration flow
CN116610385A (en) Application generation method, apparatus, computer device, storage medium, and program product
CN111367515B (en) Page card development method, device, computing equipment and storage medium
Bui E-commerce mobile application
Miguel et al. Magento 2-Build World-Class online stores
CN116991377A (en) Financial APP page generation method, device, system and storage medium
CN117193728A (en) Development method and device of software as-a-service platform
CN117270847A (en) Front-end page generation method and device, equipment and storage medium
CN116225394A (en) Method, device, electronic equipment and storage medium for creating cloud development environment
CN117348871A (en) Page control generation method and device based on template
Del Sole et al. Creating ASP. NET Core Web Applications

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