To figure out what applets require, you need to know what applets are. Small Program we generally refer to the Wechat small Program, English name Mini Program, also known as the wechat application number. Different from the wechat subscription account or the public account, the wechat small Program is endowed with the ability of application. It is a kind of application that can be used without download and installation, and it realizes the dream of application at your reach. Users scan or search to open the app; It’s also a throwaway concept, where users no longer have to worry about installing too many apps. Applications will be everywhere, available anytime, anywhere, with no need to uninstall.

  

We circled a few keywords in the above small, application, do not need to download and install, a small character to prove that its function is refined, application on behalf of its direction, without downloading and installing did not think we browse the web has this feature, so the small program is actually in wechat open a web page like an application technology.

Since it is like a web page application technology, that is to learn the technology of the small program to have, that is to respond to the subject’s question, small program development need what knowledge?

A: Web technology, in the web, our main development language is JavaScript, the same small program main development language is JavaScript, small program development and ordinary web development compared to a lot of similarities. Moving from web development to applets is not expensive for front-end developers, but there are a few differences. For example, in the web page, the effect of the page is realized by HTML and CSS, and in the wechat applet, the view effect is written by WXML and WXSS. There is little difference between the two, but the prefix is a little different. Of course, the inside tag will be different from the browser’s native tag, for example:

<! — Small program –>

<view> {{message}} </view>

<! – page – >

<div> {{message}} </div>

<! — Small program –>

<text> {{message}} </text>

<! – page – >

<p> {{message}} </p>

Except that the syntax is basically the same.

JavaScript is also very similar to web JavaScript, but wechat applet gives the web side some built-in methods (APIS) that do not exist, such as calling wechat’s camera, photo albums, user information and location, etc. Because the running environment of the small program is wechat, we can use wechat to get more information.

wx.getLocation({

Type: ‘gcj02’, // returns the latitude and longitude that can be used for wx.openLocation

success (res) {

const latitude = res.latitude

const longitude = res.longitude

wx.openLocation({

latitude,

longitude,

scale: 18

})

}

})

In addition to the above knowledge, web developers need to face a variety of browsers, IE, Chrome, QQ browsers on the PC side, Safari, Chrome and various WebViews in iOS and Android system on the mobile side. In the process of small program development, we need to face the wechat client of the two major operating systems iOS and Android, as well as the small program developer tools for auxiliary development. So if the webpage how to use the development tools can be seamlessly compatible with wechat small program development habits.