A method, system, device, and medium for application development

By using the full-stack programming model of the Micro View system, front-end and back-end logic can be developed simultaneously using a single code file. The code is automatically generated and runs collaboratively, solving the problems of high complexity and communication costs in front-end and back-end development, and achieving efficient application development.

CN122152279APending Publication Date: 2026-06-05GUANGZHOU YUNBIAO NETWORK TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU YUNBIAO NETWORK TECH CO LTD
Filing Date
2026-02-02
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In current application development, the division of labor between front-end and back-end development leads to problems such as complex development processes, high communication costs, and slow project progress.

Method used

It adopts the full-stack programming model of the Micro View system, uses a single code file to develop both front-end and back-end logic, automatically generates front-end and back-end code through the compiler, and runs collaboratively through a communication protocol.

Benefits of technology

It simplifies the development process, reduces collaboration difficulties and communication costs, improves development efficiency, and ensures rapid application deployment and verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122152279A_ABST
    Figure CN122152279A_ABST
Patent Text Reader

Abstract

The application discloses a kind of for application development method, system, equipment and medium, with following beneficial effects: the present application provides a set of development mode based on OSE language, and the front-end logic and the back-end logic of application are developed simultaneously by using single code file through the full-stack programming model provided by Micro View system, so that the front-end and back-end code can be completed by one person, and the traditional development process is optimized, that is, the entire application development can be completed independently by the main developer, the Micro View system of the application realizes the function of developing on the basis of unified language, automatically separating during compilation, and decoupling front-end and back-end during runtime, solving the complex collaboration problem in traditional front-end and back-end development, that is, not only simplifying the development process, but also reducing the collaboration difficulty and communication cost, thereby greatly improving the development efficiency, reducing the development cost, and better ensuring the rapid online and verification release of the application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of application development technology, specifically to a method, system, device, and medium for application development. Background Technology

[0002] With the rapid development of internet technology, the demand for application design and development is increasing daily. In existing application development processes, the development workflow is typically divided into front-end and back-end, each with distinct responsibilities. Front-end development is responsible for implementing the user interface presentation and interaction logic, while back-end development is responsible for data storage, business logic, and API services. To ensure the normal operation of the entire application system, collaborative development between the front-end and back-end is crucial.

[0003] Currently, application development generally follows this development process: 1. Front-end and back-end functional requirements analysis and implementation logic design: Front-end and back-end developers identify their respective business scenarios based on project requirements, and organize the implementation logic of the front-end and the implementation logic of the back-end interfaces. 2. Define front-end and back-end interface conventions: Front-end and back-end developers jointly define the interface specifications for integration in advance. 3. Front-end and back-end functional development and integration debugging: Front-end and back-end developers perform functional coding development separately, followed by interface integration and debugging. 4. System integration verification and online testing: After integration is completed, overall verification and online testing are conducted. 5. Final online release: After verification, the product is released online for actual use.

[0004] In the above development process, steps 1, 2, and 3 are particularly crucial, their success or failure largely determining whether the development project can be successfully completed and ultimately launched. However, since front-end and back-end development are usually handled by different teams or individuals, communication and collaboration among team members become important factors affecting project progress and results. Synchronizing and coordinating consistency between the front-end and back-end in understanding requirements, defining interfaces, and debugging often requires significant time and manpower. Therefore, the existing development model, to some extent, reduces development efficiency and increases the complexity of communication and collaboration.

[0005] In addition, the front-end and back-end separation development model also has the following problems: high labor costs: front-end and back-end development generally require multiple personnel, which increases the overall development cost of the project; efficiency is constrained by communication quality: front-end and back-end development separation leads to too many requirements transmission and interface docking links, and misunderstandings and inconsistencies in communication may cause requirement deviations and rework; long development cycle: multi-step collaboration between front-end and back-end makes the entire development process more time-consuming. Summary of the Invention

[0007] (a) Technical problems to be solved To address the shortcomings of existing technologies, this invention provides a method, system, device, and medium for application development, which can solve the problems of complex development processes, high communication costs, and slow project progress caused by the division of labor and collaboration between front-end and back-end development in existing application development processes.

[0008] (II) Technical Solution To address the aforementioned technical problems, the present invention provides the following first aspect of the technical solution: a method for application development, comprising: simultaneously developing the front-end logic and back-end logic of an application using a single code file through a full-stack programming model provided by the Micro View system, wherein the Micro View system is based on the OSE language; automatically generating front-end code and back-end code by analyzing the single code file through a compiler; and cooperating in running the front-end code and back-end code through a communication protocol.

[0009] Preferably, the front-end code is split into independent runnable entities, and the front-end code and back-end code are deployed separately.

[0010] Preferably, a component object is received by the compiler, and the component object is parsed, transformed, and code generated sequentially to automatically generate front-end code.

[0011] Preferably, the process of receiving a component object through the compiler and sequentially parsing, transforming, and generating code for the component object includes the following steps: creating an instance of the component in the application, wherein the component code corresponding to the component is written into a single code file; the application calls the compiler to compile the component; the compiler calls the parser to parse the passed component code; the parser extracts the child nodes in the component; a loop operation is performed on each child node: the parser parses each child node until all child nodes are parsed; the parser generates a complete component tree to obtain the parsing result; the compiler passes the parsing result to the converter for further syntactic transformation of the component code; the converter uses the component tree to process and transform the MVC syntax inside the component; the converter processes and transforms the MVC syntax of each child node until the loop of processing and transforming all child nodes ends, to obtain the transformation result; the compiler passes the transformation result to the code generator; the code generator uses the transformation result to generate front-end code; the code generator writes the generated front-end code into a file; the code generator generates front-end code for each child node until the loop of generating front-end code for all child nodes ends.

[0012] Preferably, the method for application development also includes: annotating OSE functions and View functions in the application with controller annotations.

[0013] Preferably, annotating OSE functions and View functions in an application with the `@Controller` annotation specifically includes the following steps: Loading the `@Controller` annotation class in the View module; triggering functions in the `@Controller` annotation class when OSE functions in the application have the `@Controller` annotation; storing target object data in the object repository, including OSE functions annotated as controller functions and their related variables; generating corresponding code for functions using the `@Controller` annotation in the `@Controller` annotation class; sending the generated function code to the View module; dynamically replacing the original OSE function code with the generated function code in the View module; using the `@Controller` annotation in View functions in the application; calling the object repository and storing the View function information using the `@Controller` annotation in the object repository; generating applicable function code based on the View function information; and returning the generated function code to the View module. The View module dynamically replaces the original functions defined in the application with the returned function code; the converter extracts and retrieves variable information related to the OSE module from the object repository; the converter extracts and retrieves controller annotation information related to the OSE module from the object repository; the converter retrieves controller annotation information related to the View module from the object repository; the converter converts the extracted variable information related to the OSE module, controller annotation information, and controller annotation information related to the View module into code snippets that follow the MVC syntax structure; the code generator reads and retrieves variable information related to the OSE module from the object repository; the code generator reads and retrieves controller annotation information related to the OSE module from the object repository; the code generator extracts controller annotation information related to the View module from the object repository; the code generator generates standardized JavaScript variable code based on the variable information related to the OSE module; the code generator constructs standardized JavaScript function code based on the controller annotation information related to the OSE module; the code generator generates corresponding standardized JavaScript function code based on the controller annotation information related to the View module.

[0014] Preferably, the communication protocol includes API calls based on HTTP / HTTPS, WebSocket, or gRPC.

[0015] To address the aforementioned technical problems, the present invention provides the following second aspect of the technical solution: a system for application development, the system being a Micro View system, which is based on the OSE language. The Micro View system includes a full-stack programming model, a compiler, and a communication module; wherein, the full-stack programming model is used to develop the front-end logic and back-end logic of an application simultaneously using a single code file; the compiler is used to analyze the single code file to automatically generate front-end code and back-end code; and the communication module is used to enable the front-end code and back-end code to cooperate and run through a communication protocol.

[0016] To solve the above-mentioned technical problems, the present invention provides the following third aspect of the technical solution: an electronic device, including a memory and a processor coupled to each other, the memory storing program instructions, and the processor executing the program instructions to implement the method for application development as described in the first aspect of the technical solution above.

[0017] To solve the above-mentioned technical problems, the present invention provides the following fourth aspect of the technical solution: a computer-readable storage medium having program instructions stored thereon, wherein when the program instructions are executed by a processor, a method for application development as described in the first aspect of the technical solution above is implemented.

[0018] (III) Beneficial Effects Compared with existing technologies, this invention provides a method, system, device, and medium for application development, which has the following beneficial effects: This invention provides a development model based on the OSE language, which uses a single code file to develop both the front-end and back-end logic of an application through the full-stack programming model provided by the Micro View system. This allows the front-end and back-end code to be completed by one person, optimizing the traditional development process. The main developer can independently complete the development of the entire application. This improved approach not only simplifies the development process but also reduces the difficulty of collaboration and communication costs, thereby significantly improving development efficiency and reducing development costs while better ensuring the rapid launch and verification of the application. Attached Figure Description

[0019] Figure 1 This is a diagram of the layered architecture of the compiler of this invention; Figure 2 This is a timing diagram of the compilation operation of the compiler of this invention; Figure 3 This is a timing diagram of the parsing operation of the parser of the present invention; Figure 4 This is a timing diagram of the conversion operation of the converter of the present invention; Figure 5 This is a timing diagram of the code generation operation of the code generator of the present invention; Figure 6 This is a timing diagram of the controller annotations in this invention; Figure 7 This is a schematic diagram of the electronic device of the present invention; Figure 8 This is a schematic diagram of the framework of the computer-readable storage medium of the present invention. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] This invention provides a method for application development, comprising the following steps: During the development phase, the Micro View system, which provides a full-stack programming model, allows for the simultaneous development of both the application's front-end and back-end logic using a single code file. The Micro View system is based on the OSE language. Specifically, during development, the system receives code defined by the developer, which uniformly implements both the application's front-end and back-end logic. Developers perceive this as a single-code environment through function calls or controller bindings, without needing to be aware of Vimcalls (a type of remote call, encompassing calls from front-end nodes to back-end nodes, and calls between multiple back-end nodes) between the front-end and back-end.

[0022] During the compilation phase, the compiler analyzes the single code file to automatically generate front-end and back-end code. Preferably, the front-end code is split into independent runnable entities, and the front-end and back-end code are deployed separately. The back-end code can remain in the original source file (i.e., the single code file) or be converted into back-end executable bytecode.

[0023] During runtime, the front-end and back-end code collaborate via a communication protocol to achieve a front-end / back-end separation architecture for the application. Preferably, the aforementioned communication protocol includes, but is not limited to: API calls based on HTTP / HTTPS, WebSocket, gRPC, or other remote procedure call frameworks.

[0024] The OSE language of this invention, also known as the ObjectSense language, originated from the Codigger platform project and was developed under the leadership of Trotter. The first version was completed and put into platform use in January 2022. As an object-oriented scripting language, it is based on the Vim language for object-oriented encapsulation. Its core code is less than a thousand lines, combining highly refined features with excellent performance. It aims to simplify the construction of reliable and efficient software, helping developers quickly bring applications from concept to reality. OSE provides a cross-language development framework: the Micro framework (or Micro language framework for short). This Micro framework supports embedding and calling subroutines of other languages ​​(such as C, C++, Java, JavaScript, Python, etc.) within the OSE main program. It supports a mechanism similar to Lisp macros, allowing the embedding of other existing or custom languages, providing cross-language development capabilities and enabling interoperability.

[0025] The Micro View of this invention is a micro-language implemented based on the Micro framework of the aforementioned OSE language. It provides a unified full-stack programming model that allows for the simultaneous development of both the front-end and back-end logic of an application using a single code file. In other words, Micro View centralizes the front-end and back-end development processes into a single micro-language, eliminating the need for developers to switch programming languages ​​or toolchains. In other words, the Micro View system of this invention is a View framework for application development developed based on the Micro language framework (i.e., the Micro framework of the aforementioned OSE language), referred to simply as View. The View functions and OSE functions mentioned below are the development interfaces of the View framework.

[0026] Specifically, this invention receives a component object through a compiler and sequentially performs parsing, transformation, and code generation operations on the component object to automatically generate front-end code. For example... Figure 2 As shown, the above process of receiving a component object through the compiler and starting the compilation operation, followed by parsing, transforming and generating code for the component object, specifically includes the following steps (1)-(13): (1) Create an instance of a component (Widget) in the application (App), where the component code corresponding to the component is written into a single code file (this step can be understood as...). Figure 2 The step 1, "create widget instance," creates a component instance. The other steps below follow the same logic and correspond to the steps in the respective diagrams, so they will not be elaborated upon further below.

[0027] (2) The application calls the compiler to compile the components.

[0028] (3) The compiler calls the parser to parse the passed-in component code.

[0029] (4) Extract the child nodes (Children) in the component in the parser.

[0030] (5) Perform a loop operation on each child node: In the loop, the parser performs a parsing operation on each child node until all child nodes have been parsed.

[0031] (6) The parser generates a complete widget tree to obtain the parsing results.

[0032] (7) The compiler passes the parsing results to the transformer (also known as the transformer) to perform further syntactic transformations on the component code.

[0033] (8) The converter uses the component tree to process and convert the MVC (Model-View-Controller) syntax inside the component.

[0034] (9) Repeat the loop operation on all child nodes inside the component: The converter processes and transforms the MVC syntax of each child node until the loop of processing and transformation operation on all child nodes ends, so as to obtain the transformation result.

[0035] (10) The compiler passes the transformation results generated by the above converter to the code generator.

[0036] (11) The code generator uses the transformation results to generate front-end code.

[0037] (12) The code generator writes the generated front-end code to a file.

[0038] (13) The code generator generates front-end code for each child node until the loop operation of generating front-end code for all child nodes ends.

[0039] It is understandable that by using the above steps (1)-(13), the front-end code can be automatically generated from a single code file, while the back-end code can remain in the original source file, i.e., the single code file, or be further converted into bytecode that can be executed by the back-end; that is, the above single code file is analyzed during the compilation stage, and the front-end code and back-end code are automatically generated according to the predefined partitioning rules.

[0040] like Figure 1As shown in the figure, this diagram illustrates the layered architecture of the compiler of this invention. Each layer—Parser 1, Transformer 2, and Codegen 3—contains multiple core components of different types. These components collaborate to complete the business logic functions of their respective layers and jointly support the application's MVC framework code generation process. Specifically, Parser 1 collaborates with different sub-parsers, such as ArrangeParser 11, StructureParser 12, StyleParser 13, and WindowParser 14; Transformer 2 collaborates with different sub-transformers, such as ArrangeTransformer 21, StructureTransformer 22, StyleTransformer 23, and KidTransformer 24; and Codegen 3 collaborates with different sub-code generators, such as ArrangeCodegen 31, StructureCodegen 32, StyleCodegen 33, and AdditionalCodegen 34.

[0041] In the parsing operation of the parser described above, the input Widget object is first parsed to generate its corresponding child nodes (byte nodes). Then, the same parsing operation is recursively performed on each child node until the entire Widget object is recursively parsed, thus constructing a complete component tree, the Widget Tree. For example... Figure 3 As shown, this sequence diagram describes the working process of a parser, showing how it collaborates with different sub-parsers such as ArrangeParser, StructureParser, and StyleParser to parse the component Widget and finally generate a tree structure; the parsing process of the parser specifically includes the following steps (1)-(16): (1) The Parser calls the parse method of the ArrangeParser, passing in the parameter widget.

[0042] (2) ArrangeParser calls the widget.Arrange() method to process the layout / arrangement information of the widget.

[0043] (3) ArrangeParser calls the interpret method of the view to perform layout interpretation or rendering.

[0044] (4) Add child nodes to the object store: The View adds the parsed child nodes to the object store ObjectStore.

[0045] (5) Parser calls StructureParser: Parser calls StructureParser to parse the structure information of widget.

[0046] (6) Call the widget's structure method: StructureParser calls the widget.Structure() method to process the widget's structure information.

[0047] (7) The structure parser interprets the structure: The StructureParser calls the View to interpret or render the structure.

[0048] (8) Add child nodes to the object store: The View adds the parsed child nodes to the ObjectStore.

[0049] (9) Parser calls StyleParser: Parser calls StyleParser to parse the widget's style information.

[0050] (10) Call the widget's style method: StyleParser executes the widget.Style() method to process the widget's style information.

[0051] (11) Get child nodes in object storage: Parser calls ObjectStore to get child node information in storage.

[0052] (12) Parser calls WindowParser: Parser calls WindowParser to parse the input widget.

[0053] (13) Obtain the composer list from ComposerManager: Parser calls ComposerManager to query and obtain the composerList. Here, Composer is a tool used to manage dependency relationships.

[0054] (14) Traverse the composer list: Loop through composerList and perform the following steps for each composer: Call the composer parsing method: Parser calls ComposerManager, and the specific composer parses the widget until the composer list is traversed.

[0055] (15) Recursively parse child nodes: Iterate through all child nodes previously obtained from the ObjectStore. For each child, call Parser to recursively parse that child.

[0056] (16) Generate Widget Tree: After all parsing steps are completed, Parser calls itself to generate the final component tree.

[0057] Through the above steps (1)-(16), the entire parser completes the steps of recursively parsing and constructing the component tree for the layout, structure, style, and child nodes of the component.

[0058] Furthermore, in the conversion operation of the aforementioned converter, a recursive approach is used to traverse the constructed WidgetTree, performing MVC (Model View Controller) syntax conversion processing on each node, gradually completing the conversion of the WidgetTree. For example... Figure 4 As shown, the conversion operation of the converter specifically includes the following steps (1)-(15): (1) The Transformer calls the ArrangeTransformer and passes in the widget for transformation. The Transformer executes the transform(widget) method and hands the task over to the ArrangeTransformer for processing.

[0059] ArrangeTransformer performs a series of transformation operations as follows (2)-(5): (2) transform i18n: handles transformations related to internationalization (i18n).

[0060] (3) transform pinia: handles transformations in state management (pinia).

[0061] (4) transform realm: handles transformations related to the Realm database.

[0062] (5) transform MVC syntax: handles the transformation of MVC syntax.

[0063] (6) The Transformer calls the StructureTransformer and passes in the widget for transformation. The Transformer also executes the transform(widget) method, handing the task over to the StructureTransformer for processing.

[0064] StructureTransformer executes a series of transformation operations as follows (7)-(9): (7) transform i18n: handles internationalization (i18n) related transformation logic.

[0065] (8) transform realm: handles transformations related to the Realm database.

[0066] (9) transform MVC syntax: handles transformations related to MVC syntax.

[0067] (10) The Transformer calls the StyleTransformer and passes in the widget for transformation. The Transformer executes the transform(widget) method, which calls the StyleTransformer to perform style transformation.

[0068] (11) The Transformer calls the sub-transformer KidTransformer and passes in the widget for transformation. The Transformer executes the transform(widget) method, handing the task over to KidTransformer for processing.

[0069] (12) KidTransformer handles transformations related to subtype syntax: transform kid syntax: handles specific subtype syntax transformations.

[0070] (13) Transformer calls ComposerManager to get the list of Composers: Transformer requests the list of Composers from ComposerManager through the get composerList method.

[0071] (14) Process each Composer in the Composer list in a loop: The Transformer calls the ComposerManager in sequence and uses the composer transform(widget) method to process each Composer of the widget.

[0072] (15) Looping through child elements: The Transformer iterates through its list of child elements, and for each child, it calls its own transform(child) method again to recursively transform each child element.

[0073] As shown in steps (1)-(15) above, it describes how to execute a series of Transformer calls and process the input data (e.g., widget) layer by layer through recursion and loops, and transform and parse its various parts.

[0074] Furthermore, in the code generation operation of the aforementioned code generator, the transformed Widget Tree is recursively traversed to generate corresponding front-end code node by node; finally, the generated code is output to a specified file. For example... Figure 5 As shown, the code generation operation of the code generator specifically includes the following steps (1)-(20): (1) Iterate through visitors: For each visitor in the visitors list, execute the widget.Accept(visitor) operation.

[0075] (2) Traverse child elements: For each child element in the children list, add the corresponding widget's JavaScript and CSS imports for each child element.

[0076] (3) The code generator Codegen sends a request to the ComposerManager to obtain composerList (composer list).

[0077] (4) Traverse the composer list: For each composer in composerList, Codegen calls ComposerManager to execute the composer.codegen(widget) operation to generate code related to the composer for the current widget.

[0078] (5) Call StructureCodegen to generate structured code: Codegen calls the gen(widget) method of the structure code generator StructureCodegen to generate structured code associated with the current widget.

[0079] (6) Check if dynamic attributes exist: If dynamic attributes are not empty, StructureCodegen will add JavaScript imports related to the widget.

[0080] (7) Return HTML code: StructureCodegen returns the generated HTML code to Codegen.

[0081] (8) Codegen calls the ArrangeCodegen module: The Codegen module sends instructions to the ArrangeCodegen module to generate code for the widget.

[0082] (9) ArrangeCodegen internal operations - Generate JavaScript import code: The ArrangeCodegen module generates the JavaScript import code required for the corresponding widget.

[0083] (10) ArrangeCodegen internal operation - convert OSE controller variables into JavaScript variables: ArrangeCodegen converts OSE (which may be a "controller variable" of some front-end framework) into equivalent JavaScript variables for later use.

[0084] (11) ArrangeCodegen internal operation - converting OSE controllers into JavaScript functions: ArrangeCodegen converts the logic of OSE controllers into JavaScript functions.

[0085] (12) ArrangeCodegen internal operation - converting view controllers into JavaScript functions: ArrangeCodegen converts the controllers that handle view logic into JavaScript function implementations.

[0086] (13) ArrangeCodegen returns JavaScript code: After completing the above steps, ArrangeCodegen will return the generated JavaScript code to the Codegen module.

[0087] (14) Codegen calls StyleCodegen: The Codegen module sends instructions to the StyleCodegen module to generate style code for the widget.

[0088] (15) StyleCodegen internal operation - Generate CSS preprocessor code: StyleCodegen generates CSS preprocessor code (which may be SASS / LESS, etc.) based on the style requirements of the widget.

[0089] (16) StyleCodegen internal operations - Generate scoped CSS style code: StyleCodegen generates local CSS style code that applies to a specific widget.

[0090] (17) StyleCodegen internal operations - generate CSS import code: StyleCodegen generates the CSS import code required for widgets.

[0091] (18) StyleCodegen returns CSS code: After completing the style processing, StyleCodegen returns the generated CSS style code to the Codegen module.

[0092] (19) Codegen writes to file: Codegen writes the JavaScript and CSS code obtained from ArrangeCodegen and StyleCodegen to the generated file.

[0093] (20) Traversing Child (Child Node) Operations - Recursive Generation of Child Widget Code: Codegen traverses all child widgets of the current widget. For each child widget, Codegen recursively calls its own gen(child) method to generate the child widget's code. After the loop ends, the code for all child nodes will also be generated.

[0094] It is understandable that the above steps (1)-(20) describe the generation process of a component widget code. The processing flow includes visitor mode, resource processing of child elements, processing of composer; calling StructureCodegen to generate target HTML code; calling ArrangeCodeGen to generate JS code; calling StyleCodegen to generate CSS code; and looping through all child nodes and generating code.

[0095] In summary, the compilation process of the Micro View system of this invention includes the following three parts: Explanation: Micro View's parser is responsible for parsing the source code of a full-stack application into a widget tree. During this process, the program's business logic, front-end and back-end code structure, control flow, and dependencies are represented in a structured way to ensure interface consistency between the front-end and back-end code after compilation.

[0096] Transformation: Based on the component tree, Micro View's transformer processes the front-end and back-end related code and transforms it into MVC syntax.

[0097] Code Generation: Based on the transformed WidgetTree, Micro View's code generator generates front-end and back-end code separately. The front-end code can be deployed independently to client environments (such as browsers or mobile devices), while the back-end code can be generated into bytecode or executable files that run in a server environment.

[0098] Through the above three-step compilation process, the Micro View system of this invention achieves the functions of development based on a unified language, automatic separation at compile time, and decoupling of front-end and back-end at runtime, solving the complex collaboration problems in traditional front-end and back-end development and greatly improving development efficiency.

[0099] This invention proposes a micro-language for application development, featuring enhanced annotations specifically designed for front-end development and adapted to distributed system architectures with front-end and back-end development models. This includes the definition of special annotations such as "controller" and "i18n". The "controller" annotation is particularly crucial, as it enables a redesign of the Controller in the traditional front-end / back-end separated MVC (Model-View-Controller) architecture by supporting the integration of front-end and back-end logic within a unified language environment. With the support of the "controller" annotation, front-end and back-end functionality can be implemented by a single person, thereby improving development efficiency and fundamentally optimizing the Controller implementation in distributed system environments. This further simplifies complex system development processes. This implementation provides an innovative solution for multi-terminal collaboration in distributed systems, effectively enhancing the flexibility and maintainability of system development. The MVC architecture of this invention, namely Model-View-Controller, is a software architecture pattern.

[0100] The `@controller` annotation defined in this invention can be used to modify OSE and View functions in an application, turning them into controller functions. Both OSE and View functions are development interfaces for the Micro View system of this invention, i.e., the development interfaces for the aforementioned View framework. The Micro View of this invention replaces functions annotated with `@controller` in the application with new functions, with the new function internally calling the original function. Specifically, OSE functions are recompiled into functions that request JavaScript Vimcalls, providing services for Vimcalls at runtime (i.e., the backend function can directly affect the page display), and View functions are recompiled into JavaScript functions. Specifically, as shown... Figure 6 As shown, the present invention, through the use of controller annotations to modify OSE functions and View functions in an application, specifically includes the following steps (1)-(21): (1) Load the Controller annotation class in the View module. Here, the View module of this invention is the View in the MVC architecture, and the Controller is the Controller in the MVC architecture.

[0101] (2) When the OSE function in the application has the controller annotation, the function in the Controller annotated class is triggered.

[0102] (3) The Controller annotation class stores the target object data in the Object Store, which includes the OSE functions annotated as controller functions and their related variables.

[0103] (4) Generate the code corresponding to the function using the controller annotation in the Controller annotation class.

[0104] (5) The Controller annotation class sends the generated function code to the View module, which is linked with the original code.

[0105] (6) The View module dynamically replaces the original OSE function code with the function code generated in step (5) above.

[0106] (7) Use the controller annotation in the View function of the application: synchronous or asynchronous mode.

[0107] (8) The Controller annotation class calls the object repository and stores the View function information that uses the controller annotation in the object repository.

[0108] (9) The Controller annotation class generates applicable function code based on the View function information.

[0109] (10) The Controller annotation class returns the generated function code to the View module.

[0110] (11) The View module dynamically replaces the original View function code defined in the application with the returned function code.

[0111] (12) The converter extracts and obtains the OSE module-related variable information from the object repository, which corresponds to the OSE-related variables (ose variable) stored in step (3) above.

[0112] (13) The converter extracts and obtains the controller annotation information related to the OSE module from the object repository, which corresponds to the OSE function (ose controller) annotated as controller function stored in step (3) above.

[0113] (14) The converter retrieves the controller annotation information related to the View module from the object repository, which corresponds to the View function information (view controller) using the controller annotation stored in step (8) above.

[0114] (15) The converter converts the OSE module-related variable information extracted in step (12), the controller annotation information extracted in step (13), and the View module-related controller annotation information extracted in step (14) into code snippets that follow the MVC syntax structure.

[0115] (16) The code generator reads and retrieves variable information related to the OSE module from the object repository.

[0116] (17) The code generator reads and retrieves controller annotation information related to the OSE module from the object repository.

[0117] (18) The code generator extracts controller annotation information related to the View module from the object repository.

[0118] (19) The code generator generates standardized JavaScript variable code from the variable information related to the OSE module obtained in step (16) above.

[0119] (20) The code generator constructs standardized JavaScript function code based on the controller annotation information related to the OSE module obtained in step (17) above.

[0120] (21) The code generator generates the corresponding standardized JavaScript function code based on the controller annotation information related to the View module obtained in step (18) above.

[0121] This invention also provides a system for application development, which is the aforementioned Micro View system. The Micro View system is based on the OSE language and includes a full-stack programming model, a compiler, and a communication module. The full-stack programming model is used to develop both the front-end and back-end logic of an application using a single code file. The compiler analyzes the single code file to automatically generate front-end and back-end code. The communication module enables the front-end and back-end code to collaborate and run through a communication protocol. For a detailed description of the Micro View system of this invention, please refer to the description of the application development method above; it will not be repeated here.

[0122] like Figure 7As shown, the present invention also provides an electronic device 4, which includes a memory 41 and a processor 42 coupled to each other. The memory stores program instructions, and the processor 42 is used to execute the program instructions stored in the memory 41 to implement any of the above-described methods for application development. In a specific implementation scenario, the above-described electronic device 4 may include, but is not limited to, a microcomputer or a server. In addition, the electronic device 4 may also include mobile devices such as laptops and tablets, which are not limited here.

[0123] Specifically, the processor 42 controls itself and the memory 41 to implement any of the methods described above for application development. The processor 42 can also be referred to as a CPU (Central Processing Unit). The processor 42 may be an integrated circuit chip with signal processing capabilities. The processor 42 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. Furthermore, the processor 42 can be implemented using integrated circuit chips.

[0124] In addition, such as Figure 8 As shown, the present invention also provides a computer-readable storage medium 5, on which program instructions 51 are stored, which, when executed by a processor, implement any of the methods described above for application development. The storage medium 5 may include various media capable of storing program instructions, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0125] It is understood that, with the application development micro-language (Micro View) defined in this invention, developers can directly complete both front-end interface design and back-end business logic implementation using a unified language. That is, the micro-language unifies the front-end and back-end development processes at the code level, and the compiler generates independently runnable programs for the front-end and back-end during compilation. This allows developers to complete both front-end and back-end business logic development in a single file without explicitly handling the separation of front-end and back-end and data transfer between them. This new development model allows the main developer to independently complete the entire application development. This improvement not only simplifies the development process and reduces the number of steps, but also reduces collaboration difficulty and communication costs, significantly improving development efficiency. While reducing development costs, it ensures rapid application deployment and verification. The Micro View language implemented in this invention based on OSE can be used as an application tool for developing the Codigger system. It implements MVC functionality and provides a unified front-end and back-end development approach. Through the MicroView system of this invention, developers only need to focus on the business logic itself; front-end and back-end interaction is abstracted into a development experience consistent with ordinary method calls or controller bindings, completely shielding the details of the underlying Remote Procedure Call (RPC). After development, with the help of the Micro View compiler, the system of this invention can automatically separate the front-end code and the back-end code during the compilation stage, and generate independent front-end programs and back-end programs respectively, thereby supporting the operation mode of front-end and back-end separation deployment.

[0126] Compared with existing technologies, this invention has the following technical advantages: (1) Unified programming model: The Micro View of this invention provides a unified full-stack programming model, which concentrates the front-end and back-end development processes in a single micro-language, so that developers do not need to switch programming languages ​​or toolchains. (2) Shielding complex interaction details: This invention abstracts the front-end and back-end calls into a built-in language mechanism, so that developers do not need to pay attention to the underlying RPC implementation, thus improving the development experience. (3) Automated separation and generation: The compiler of this invention automatically separates and generates independent front-end and back-end code during compilation, supporting a decoupled operation mode between the front-end and back-end. (4) Cross-platform capability: The code generated by this invention can be deployed to the front-end client and the back-end server respectively, supporting multi-platform environments.

[0127] It should be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0128] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for application development, characterized in that, include: The Micro View system provides a full-stack programming model that allows for the simultaneous development of both the front-end and back-end logic of an application using a single code file. The Micro View system is based on the OSE language. The compiler analyzes the single code file to automatically generate front-end and back-end code; The front-end code and the back-end code work together through a communication protocol.

2. The method for application development according to claim 1, characterized in that: The front-end code is split into independent, runnable entities, and the front-end code and the back-end code are deployed separately.

3. The method for application development according to claim 1, characterized in that: The compiler receives a component object and sequentially performs parsing, transformation, and code generation operations on the component object to automatically generate the front-end code.

4. The method for application development according to claim 3, characterized in that, The process of receiving a component object through the compiler and sequentially parsing, transforming, and generating code from the component object specifically includes the following steps: An instance of a component is created in the application, wherein the component code corresponding to the component is written into the single code file; The application calls the compiler to compile the component; The compiler calls the parser to parse and process the passed-in component code; Extract the child nodes from the component in the parser; The parser performs a loop operation on each of the child nodes until all of the child nodes have been parsed. The parser generates a complete component tree to obtain the parsing result; The compiler passes the parsing result to the converter for further syntactic transformation of the component code; The converter uses the component tree to process and transform the MVC syntax within the component; The converter processes and transforms the MVC syntax of each child node until the processing and transformation operation loop for all child nodes is completed, so as to obtain the transformation result. The compiler passes the transformation result to the code generator; The code generator uses the transformation result to generate front-end code; The code generator writes the generated front-end code into a file; The code generator generates the front-end code for each child node until the loop operation of generating front-end code for all child nodes ends.

5. The method for application development according to claim 1, characterized in that, Also includes: The OSE and View functions in the application are annotated with the controller annotation.

6. The method for application development according to claim 5, characterized in that, The steps involved in annotating the OSE and View functions in the application with controller annotations are as follows: Load the Controller-annotated class in the View module; When the OSE function in the application has a controller annotation, the function in the controller annotated class is triggered. The Controller annotation class stores the target object data in the object repository, which includes OSE functions annotated as controller functions and their related variables; The code corresponding to the functions using the controller annotation is generated in the Controller annotated class; The Controller annotation class transmits the generated function code to the View module; The View module dynamically replaces the original OSE function code with the generated function code; The application uses the `@controller` annotation in the View function; The Controller annotation class calls the object repository and stores the View function information using the controller annotation into the object repository; The Controller annotation class generates applicable function code based on the View function information; The Controller annotation class returns the generated function code to the View module; The View module dynamically replaces the originally defined function in the application with the returned function code; The converter extracts and obtains variable information related to the OSE module from the object repository; The converter extracts and obtains controller annotation information related to the OSE module from the object repository; The converter obtains controller annotation information related to the View module from the object repository; The converter will extract the variable information, controller annotation information related to the OSE module, and the controller annotation information related to the View module into code snippets that follow the MVC syntax structure. The code generator reads and retrieves variable information related to the OSE module from the object repository; The code generator reads and obtains controller annotation information related to the OSE module from the object repository; The code generator extracts controller annotation information related to the View module from the object repository; The code generator will generate standardized JavaScript variable code from the variable information related to the OSE module; The code generator constructs standardized JavaScript function code based on the controller annotation information related to the OSE module; The code generator generates corresponding standardized JavaScript function code based on the controller annotation information related to the View module.

7. The method for application development according to claim 1, characterized in that: The communication protocols include API calls based on HTTP / HTTPS, WebSocket, or gRPC.

8. A system for application development, characterized in that: The system is a Micro View system, which is based on the OSE language and includes a full-stack programming model, a compiler, and a communication module. The full-stack programming model is used to develop both the front-end and back-end logic of an application using a single code file. The compiler is used to analyze the single code file to automatically generate front-end and back-end code; The communication module enables the front-end code and the back-end code to work together via a communication protocol.

9. An electronic device comprising a memory and a processor coupled to each other, the memory storing program instructions, characterized in that: The processor is used to execute the program instructions to implement the method for application development as described in any one of claims 1-7.

10. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by the processor, they implement the method for application development as described in any one of claims 1-7.