DEV Community

张传辉
张传辉

Posted on

JOKER LOWCODE PLATFORM 20250204 UPDATED LOG

This update of the JOKER Low - Code Platform covers optimizations and new features in multiple key areas, including code generation, environment variables, and visual development tools. It is dedicated to providing developers with a more efficient, secure, and convenient development experience. Meanwhile, the official release of server - side functions and core upgrades further enhance the overall performance and competitiveness of the platform.

I. Function Updates and Optimizations

(1) Code Generation Function Optimization

In previous development, the repeated appearance of "?" and "undefined" in the type declarations of null - valued variables often made the code chaotic and increased the probability of errors. This update deeply optimizes this pain point. When developers deal with complex data structures, such as objects nested in arrays where the arrays contain variables of different types, the optimized code generation function can accurately determine null - value situations and reasonably declare types. This not only makes the code structure clearer but also enables the discovery of potential errors during the compilation phase, reduces runtime exceptions, lowers developers' maintenance costs, and improves the overall quality and readability of the code.

Image description

(2) New Environment Variable Function

Customization of multi - environment configuration files: In actual project development, different environments have significantly different configuration requirements. Developers can now easily create multiple different environment configuration files according to project needs. For example, in the development environment, detailed log output may be required for debugging; in the test environment, real - production data needs to be simulated without using real sensitive information; and in the production environment, more emphasis is placed on performance and security. By customizing multi - environment configuration files, developers can achieve fine - grained management of different environments and ensure the stable operation of the project at all stages.

Image description

Image description

Convenient environment variable invocation: On the front - end side, with the help of import.meta.define, when building front - end pages, developers can quickly obtain variables corresponding to different environments. For example, they can get API addresses in different environments and dynamically load different resource files. On the server - side, through process.env, when handling business logic, developers can flexibly configure database connection parameters, cache server addresses, etc. This convenient invocation method realizes differential configuration in multiple environments and greatly improves development flexibility and deployment efficiency.

Data desensitization protection: When non - organizational members access the public repository, the platform will automatically desensitize environment variables. For example, sensitive information such as database passwords and API keys will be replaced with specific desensitization identifiers. This function provides a solid guarantee for enterprise data security, preventing the leakage of sensitive information due to access to open - source repositories and reducing the security risks faced by enterprises.

Generation of different configuration files: During the process of repository code generation, configuration files suitable for different environments will be automatically generated. In the past, developers needed to manually copy and modify configuration files, which was not only cumbersome but also error - prone. Now, whether it is the local configuration for the development environment or the server configuration for the production environment, it can be generated with one click, reducing the cumbersome work of manual configuration and improving development efficiency.

(3) Visual Development Tool Optimization

Optimization of if - judgment nodes: In complex business logic, conditional judgment is a very common operation. Previously, if - judgment nodes were forcibly restricted to the boolean type, which brought a lot of inconvenience to developers. For example, when judging whether a user is logged in, in addition to simple true or false, there may also be a state where the user is not logged in but is in the process of login redirection. After this optimization, a more user - friendly experience in null - value judgment has been achieved. It is no longer forcibly restricted to the boolean type, allowing developers to perform conditional judgments more flexibly, meet the requirements of complex business logic, and reduce code redundancy and errors caused by type restrictions.

Default settings for deeply nested object properties: In the type design panel, when creating properties of deeply nested objects, they are set to non - null by default. For example, when designing an e - commerce order data structure, the order object contains a product list, and each product in the list has detailed properties. Setting these deeply nested properties to non - null by default can effectively reduce potential risks caused by null values, such as null pointer exceptions, improve the reliability and stability of data, and make developers more confident when dealing with complex data structures.

(4) NPM Service Upgrade

Differentiation between web and nodejs: The NPM service has added a differentiation between web and nodejs. In development, the front - end (web) and the server - side (nodejs) have very different requirements for dependent packages. For example, the web - end may need some packages for page rendering and interaction, while the server - side needs packages for database connection and network request handling. By differentiating between web and nodejs, more accurate package query and extension functions are provided for the server - side, enabling developers to more conveniently manage and use different types of dependent packages and avoid development problems caused by mistakenly introducing incompatible packages.

Operation history record: When performing operations such as package reference, uninstallation, and update, the platform will actively record the operation history. When compatibility issues occur in a project after a developer updates a certain package, they can quickly locate which package update caused the problem by checking the operation history. At the same time, these operation histories also provide detailed reference information for version releases. The development team can clearly understand the changes in dependent packages in each version, improving the traceability of project management.

(5) Enhancement of the Type Design Panel Function

Addition of validation condition design: When designing the types of input items in the controller, a new validation condition design function has been added. When designing a user registration interface, validation conditions such as length restrictions and format requirements can be set for input items such as usernames and passwords. In this way, data security and access security can be better managed at the interface design stage, effectively preventing the input of illegal data and malicious access, and improving the security and stability of the system.

Image description

Image description

Type import function: A function for importing existing types has been provided. Developers can directly import other pre - designed types into the existing types. When developing multiple related projects, there may be some common data types, such as user information types and address types. Through the type import function, duplicate type design work can be avoided, development efficiency can be improved, and code reusability can be promoted, reducing code redundancy.

(6) Visual Operation Panel Optimization

Optimization of running and debugging: When encountering abnormal problems during the development and debugging process, the visual editor will directly pop up a window to prompt error information and provide a function to quickly locate the source of the problem by clicking on the error. In the past, developers might have spent a lot of time searching for the error location in the code during debugging. Now, when syntax errors or logical errors occur, the error code line can be quickly located, greatly shortening the problem - solving time, improving development efficiency, and making the development process more smooth.

Image description

(7) Expansion of the Type Design Function

Addition of File and Date types: File upload and date - type functions have been provided for the server - side. When developing a file management system, operations such as file upload, download, and storage can be conveniently handled through the File type. When developing business such as schedule management and order processing, the Date type can accurately handle date calculations, comparisons, formatting, etc., meeting the requirements of more business scenarios and enabling developers to more conveniently handle business logic related to files and dates.

(8) Replacement of the Online Text Editor

The replacement of the online text editor in the main network has been completed, replacing the rich - text editor with the Markdown mode. The Markdown mode, with its simple syntax (for example, using "#" to represent headings and "*" to represent lists), allows developers to quickly write structured text. Moreover, when displaying code, it supports the code - block syntax, which has good support for code display, is more in line with the usage habits of developers, and can better support developers in writing content. It is more convenient for writing documents, annotating code, or recording development ideas.

II. Official Release of Server - Side Functions

(1) Database Model Design

Through the visual function, developers can quickly design database tables. When designing an e - commerce database, complex table relationships among product tables, user tables, and order tables, as well as design functions such as composite indexes set to improve query efficiency, can all be easily achieved. This lowers the threshold for database design. Even developers with limited knowledge of databases can quickly get started. At the same time, it improves the efficiency and accuracy of database design, laying a solid foundation for subsequent business development.

Image description

(2) Data Caching Function

Active data cache design: In high - concurrency scenarios, the frequent access to hot data can put a huge strain on the database. Developers can actively design data caches according to business needs. For example, they can cache popular product information, users' common configurations, etc. In this way, when users request this data, it can be directly retrieved from the cache, effectively avoiding the frequent access of hot data to the database, reducing the database load, improving system performance, and enhancing the user experience.

Image description

Dual - mode switching: It supports dual - mode switching between in - memory caching and Redis caching. In - memory caching is fast and suitable for scenarios with extremely high requirements for response speed and small data volumes. Redis caching, on the other hand, supports distributed deployment and is suitable for scenarios with large data volumes and the need to share cached data among multiple servers. Developers can choose the most suitable caching method according to the actual scenario, improving the flexibility and adaptability of the system and meeting the requirements of different business scales and architectures.

(3) Visual Database Operations

Visual operations for database creation, deletion, modification, query, grouped query, and aggregated statistical query are provided. When developing a reporting system, complex grouped queries and aggregated statistical queries on a large amount of data are required. Through intuitive interface operations, developers can quickly build query conditions and achieve complex business operations, such as complex table - related queries. This reduces the difficulty of database operations. Even developers without in - depth database knowledge can complete complex data operations, improving development efficiency and accelerating the project development progress.

Image description

III. Core Upgrades

(1) Front - End Core Library Optimization

For virtual node query methods such as find and closest, an active terminal query operation has been added. When building complex front - end pages, such as single - page applications with a large number of dynamic components, the previous query methods may perform many ineffective operations when searching for virtual nodes, wasting performance. After the optimization, when querying a specific virtual node, it can actively determine the query boundary, avoid ineffective query operations, improve front - end query efficiency, optimize front - end performance, make page loading and interaction more smooth, and bring a better experience to users.

(2) Release of the Server - Side Core

The server - side core @joker.server/core has been officially released. This core library integrates the basic functions and key modules required for server - side operation, such as route management, middleware processing, and error handling. It provides a solid foundation for the stable operation and efficient development of the server - side, helps to improve the performance and reliability of the entire server - side architecture, and enables developers to more quickly and stably build server - side applications based on it to meet various complex business requirements.

Top comments (0)