In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Most people don't understand the knowledge points of this article "What can Weixin Mini Programs (Mini) Development Libraries grace and wepy do?" Therefore, Xiaobian summarizes the following contents for you. The contents are detailed, the steps are clear, and they have certain reference value. I hope you can gain something after reading this article. Let's take a look at this article "What can Weixin Mini Programs Development Libraries grace and wepy do?"
Mini programs developer source
From front-end developers
So far, if it's a frontend, then it's likely that you've used one of Angular/React/Vue. First of all, if you haven't used Vue, then the learning cost of using wopy is close to the cost of learning Vue. Second, developers who believe strongly in Angular/React may ask, why do Mini programs have to be Vue when they are Mini programs? Authentic Vue is not used in web development, and will learn wepy again in order to develop Mini programs.
Non-frontend developers
After the release of Mini programs, most programmers will want to try it, not just front-end programmers. For these developers, the metropolis will adopt the native development of Mini programs, and they will hardly be able to learn a front-end framework of the same scale as Vue.
To sum up, from a developer's perspective, wopy adopts a Vue-like development style, which is both a strength and a weakness. The advantage is that it allows a significant number of Vue developers to transition easily, but the disadvantage is that it raises the threshold for other developers to use. Therefore, a light and easy-to-use help tool is necessary, and grace is such a tool.
Mini programs positioning
The positioning of Mini programs itself is "at your fingertips, go when you run out," solving the historical phenomenon that you have to do everything with the next APP. With Mini programs, you don't have to install too many apps, only spend a small amount of traffic to download when you use them for the first time. It can be seen that Mini programs still need to be downloaded when they are used for the first time. In order to reduce the waiting time for download and save user traffic, Mini programs set the package size to 4M, which is why "small" in Mini programs means. This limitation of WeChat determines that Mini programs are generally only used to realize core functions and will not be used as complex functions. This also determines that when developing most Mini programs, what we need is not a big frame that is strong and cool, but some simple help tools, and the positioning of grace is a delicate help tool. Many Mini programs I know, even most of them are developed natively.
Here is a summary of the main differences:
The positioning is different;grace positioning is a neat, easy-to-use Mini programs development assistance library, while wopy is a full-featured vue like framework.
Grace is easy to use, wopy has a lot of learning costs for developers who don't know Vue, and the development environment depends on many, and the configuration is more complex.
Grace is closer to native, wepy is closer to web.
Let's see what Grace does:
What Grace can do.
Let's look at the characteristics of grace:
Lightweight, compact and easy to use
Supports data responsiveness as elegant as Vue
Support automatic data update, change cache, batch update
Powerful network capabilities
Support for global event buses
Support cross-page value transfer
Support for Mixins
The main focus is exquisite, you can see that the current core functions mainly involve three aspects: data, network, events.
data
Mini programs are separated from page rendering, so there will be a lot of setData operations in development. Grace implements data responsiveness consistent with Vue to simplify this large number of explicit data updates-data can be updated directly by assignment. At the same time, in order to avoid the performance consumption caused by frequent setData, grace not only supports manual batch refresh, but also grace can automatically track the front and back background switching of the page. If the page is switched to the background, setData will not be called again, but the changes will be cached first. When the page is switched to the foreground, it will be uniformly refreshed, effectively avoiding unnecessary performance consumption.
network
Most Mini programs need to communicate with the background through http. For this reason, grace provides a powerful, flexible and good Promise API, and supports global request configuration, request/response interceptors, etc. More importantly, the Promise-style API supports ES7's async/await.
event
Mini programs are natively weak in cross-page communication, so grace provides a global event bus where you can register/trigger events on any page to communicate. Not only that, grace also implements a more friendly callback for page data return on top of the event bus.
In addition to these, grace also supports mixins, which provide a way to extend new functionality by adding features to the page globally that developers can do on their own.
The above is about the content of this article "Weixin Mini Programs (Mini) Development Library grace and wopy can do." I believe everyone has a certain understanding. I hope the content shared by Xiao Bian will be helpful to everyone. If you want to know more relevant knowledge content, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.