This article analyzes three aspects: how the data center and event center work according to the protocol, how vue2.x and vue3.x can be supported regardless of the environment, and how to locate problems on the production page.
1. Data center and event center design
Feima is a data-driven + event-driven product. Considering the Feima operating environment, Feima encapsulates the store itself.
Data center : There may be multiple Feima tags on the same page, and Feima implements the store through instantiation. See Figure 1 for details when accessing Feimao
The event center will trigger data changes in the data center, and the data center will trigger component-related UI changes. The relationship between them is detailed in Figure 4. The arrow pointing does not happen every time. For example, the page life cycle function does not necessarily have events configured. When the page is running, if there are no events configured in the life cycle function, the event center will not be triggered.
2. Design that does not depend on the environment
Differences in technology stacks of front-end projects. The current mainstream technology stacks include vue (vue2.x, vue3.x) and react. According to the department’s internal technology stack, Feima supports vue2.x and vue3.x. See Figure 5 for details
The components in the flying code running state are developed using the h function, and the environment is judged in the component. Each component is associated with a data center, which notifies components of updates. A component's events are associated with an event hub. Taking button as an example, use isV3() to determine whether the current running environment is vue3 for adaptation. See Figure 6 for details
Feima's design ideas for complex business scenarios are consistent with circuit diagram design. Feima itself is also a component, and Feima supports nesting itself. See Figure 7 for details
Question : Will Feima support react?
It will be supported. According to the current business scenario requirements, just add react capabilities to the data center and event center. The current model will not change.
3. Problem locating on the production page
FMHelper can monitor many problems on the page in the editing mode. When a problem is found after previewing the page, the builder needs to have front-end experience to locate the problem and then make changes in the editing mode to achieve the desired effect. If you don’t know much about the front-end knowledge, quickly locating and correcting it is one of the directions of flying code exploration.
Feima continues to explore in the direction of convenience, robustness, and zero testing.
Four: Summary
This chapter analyzes how Flying Code can be conveniently and quickly verified to achieve production and Flying Code exploration, focusing on three aspects: how the data center and event center work through protocols, how vue2.x and vue3.x can be supported independently of the environment, and how to locate problems on the production page. introduced in detail. The next chapter introduces [Flying Code LowCode front-end technology (7)] Introduction to Flying Code canvas technology.
Alibaba Cloud suffered a serious failure and all products were affected (restored). Tumblr cooled down the Russian operating system Aurora OS 5.0. New UI unveiled Delphi 12 & C++ Builder 12, RAD Studio 12. Many Internet companies urgently recruit Hongmeng programmers. UNIX time is about to enter the 1.7 billion era (already entered). Meituan recruits troops and plans to develop the Hongmeng system App. Amazon develops a Linux-based operating system to get rid of Android's dependence on .NET 8 on Linux. The independent size is reduced by 50%. FFmpeg 6.1 "Heaviside" is releasedAuthor: Wang Guanghui of JD Technology
Source: JD.com has a developer community. Please indicate the source when reprinting.