The epidemic suddenly happened around me. Today is the third day of the lockdown. Although I am still working, it is difficult to calm my mind when I lose my freedom. Do not write a small program for a long time, a lot of relevant knowledge point memory is weak, recently just reviewed, here to do a small program record series, deepen their impression, it is best to have time to write a small project out, to close to add some nutrition.
1, what is a small program (principle)?
Small program essence is a single page application, all page rendering and event processing, are carried out in a page, but also through the wechat client call native interfaces; It is a data-driven architectural pattern, UI and data separation, through the change of data to achieve the update of the page; Mainly using JS, WXML, WXSS three technologies to develop; The function can be divided into webView and appService. Webview displays UI, and appService is used to deal with business logic, data and interface invocation. The two parts are carried out in two processes.Copy the code
2. What are the differences between mini program and H5?
Different operating environments: small programs run in wechat, H5 run in the browser; Development costs vary: h5 needs to be compatible with different browsers; Different access to system permissions: system-level permissions can be seamlessly connected with small programs; Application smoothness in production: H5 requires constant project optimization to improve the user experienceCopy the code
3. What is the difference between applet and APP?
Wechat small program is a lightweight APP, limited in wechat, short development cycle, fewer functions, occupy less space; Apps take longer to develop and take up extra memoryCopy the code
4. What are the file types associated with small programs?
There are four file types: 1. WXML: template file, the tag language of small program, which combines the basic components and event system to build the structure of the page; 2. 2, WXSS: style file, used to describe WXML component styles; 3, JS: logical script, logical processing network request, app.js listening and processing small program life cycle function, declare all variables; Pages: All page paths Network Settings (network timeout) Interface display (page registration) Bottom TAB window{background color, navigation style, default title}Copy the code
Today I will write here first. As an aside, I hope the epidemic will pass quickly. I miss the freedom to breathe and the cool taste of watermelon in midsummer.