preface
As an ordinary Android programmer, I was assigned by the company to do small program development due to demand reasons. I have studied small programs for about two months, and also completed a small tool of the company, which can be regarded as a beginner. I also published in front of the public small program learning articles.
Next I’ll planning to write a small program, personal eyes as a learning project, the foundation is very important, especially for me this front-end weak foundation, learn little program is not easy, so suggest you study before the small program, it’s best to learn the basis of the front-end related, this small program development will be very easy to use.
One, small program development preparation
Do small application development requires a APPID, so want to go to WeChat public platform https://mp.weixin.qq.com/ registered developers account, binding their WeChat as an administrator, and then in the developer background can view their own APPID, a developer background can publish only a small program, Subsequent releases can be overwritten;
Developer tools
Wechat small program has its own special development tools, support small program and public number development. Find a small program in small application development document development tools download page, or directly enter https://mp.weixin.qq.com/debug/wxadoc/dev/devtools/download.html according to its own operating system to download the corresponding installation package for installation.
Start my personal project
With the previous two steps in place, you are ready to develop your applets project
**1.** Open the small program development tool and log in using the wechat scan code used to register the small program before. Select the applets project
**2.** Create a new project named XXX, enter APPID and check “Create QuickStart project”, click OK, then the first applet project is created successfully.
**3. The code composition of ** project can be divided into: configuration code JSON file, template code WXML file, style code WXSS file and logic code JavaScript file.
**JSON file: ** plays the role of static configuration in the applet code, determines some of the performance of the applet before it runs, it should be noted that the applet is unable to dynamically update the JSON configuration file in the process of running the corresponding changes.
The full name of WXML is WeiXin Markup Language, which is a set of tag Language designed by the small program framework. Combining the basic components and event system of the small program, the structure of the page can be constructed.
WXSS (WeiXin Style Sheets) is a Style language for applets that describes the component styles, that is, the visual effects, of WXML. WXSS is similar to CSS in Web development. WXSS makes some additions and changes to CSS to make it more suitable for small program development.
WXML is like front-end HTML, WXSS is like front-end CSS, so I said it’s best to have a front-end related foundation, so it’s very easy to start small program development.
Next, I will start my project — Life Little Assistant Project. The overall framework is as follows:
The renderings are as follows:
Divided into three modules:
Weather forecasts,
Selected articles,
Personal center,
Here I only build the overall framework, switch from the bottom menu, later have time to continue module development, small program creation bottom menu is very simple, you can configure in the app.json file.
The json field pages in app.json file is equivalent to the activity page registered in AndroidMainfest. XML developed by Android. All new pages should be registered here.
The json field window in the app.json file, which is equivalent to the Styles. XML file developed by Android, is actually the style Settings, such as window color, status bar background color, global title and so on.
Json file inside the JSON field tabBar, here is to set the bottom menu, using more simple and convenient than Android development, today is the introduction, summed up here, there are a lot of basic will not be described one by one.
Next, I will use my spare time to complete this small program project of my own. Welcome to pay attention to this public account and study together. Thank you!
Project Address:
Github.com/zsml2016/Li… If you support me, you can pay attention to my public account, and welcome everyone to contribute ~ Scan my wechat public account: programmer in Guangdong