Taking advantage of the micro channel small program just out of the pot of hot energy, looked at a lot of praise and hot, as a “will be unemployed” iOS mobile developers, also picked up the once unwinding “H5” old spoon followed the taste. After trying out the flavors, I just wanted to take Native mobile development to the extreme.
Wechat Mini program (MINA) is a pioneer
I thought it was a coincidence that I would try MINA(MINA IS NOT APP) because I was NOT qualified for the internal test. Isn’t it like watching Ali-branded moon cakes when I’m browsing Github and suddenly discovering a little program called “eapp-ide-crack”? Get it built!
Wechat small program development tool
This is the IDE for developing wechat apts. Next, with the memory of H5 not so long ago, we will look at the code for this demo sample following the leaked [MINA development document].
app.js
App.js is the script code for a small program. This file allows you to listen to and process applets’ lifecycle functions, declare global variables, and call the rich apis provided by MINA.
app.json
App. json is the global configuration of the entire applet. In this file we can configure which pages the applet consists of, the background color of the applet window, the style of the navigation bar, and the default title. Note that you cannot add any comments to this file.
Js and app.json files are required in a wechat applet, so there is another app. WXSS file in the root directory besides these two files.
app.wxss
App.wxss is a common style sheet for the entire applet. We can use the style rules declared in app.wxSS directly on the class property of the page component
Now that you’ve looked at the key files in the root directory, let’s look at how to create a page.
Pages directory
Each applet page is composed of four different files with the same name in the same path, such as index.js, index.wxml, index.wxss, and index.json.
Micro channel small program development source code
Index. WXML is the structure file of the page, or HTML
Micro channel small program development source code
Index.js is the script file for the page
Micro channel small program development source code
Index. WXSS is a style sheet, or CSS, for a page
Each page can also have a separate.json configuration file that can independently configure properties in Windows that are different from app.json.
This is a micro channel small program structure framework, have to say, micro channel really play to the extreme strength, avenue to simple, for developers to consider a lot of, save a lot of tedious. Indeed, with the API documents and various components provided by wechat, and a little Web front-end development foundation, it is very easy to get started to develop a small application.
However, I just want to take mobile development to the extreme
It has to be said that front-end technology has always had the advantage of being lightweight and easy to use, ready-to-use and ready-to-go. From the light application a few years ago, to the existing development capabilities opened by wechat public account, they can actually be regarded as “small programs”. For example, the various services accessed from the custom menu at the bottom of Logic.com, especially the mall homepage, the user experience and interaction have been very consistent with the original App “obtained”.
In fact, this mini program “MINA IS NOT APP” IS NOT really a micro-application. It IS just a “small” upgrade of wechat’s original platform development capabilities, adding some official front-end frameworks and components to empower more developers. Relying on wechat’s strong user base and traffic distribution ability, the scope of its platform services and service ability to expand some of it. It’s an unrealistic assumption: If Alibaba hadn’t been banned from wechat, Tencent might not have been the driving force behind the story.
Although the small program is actually just a small upgrade of wechat’s open platform, it is clear that this upgrade is a success. Many people joked that the “mini program” was just an empty fire, but there is no denying that it did catch fire. It made more people realize that wechat platform is not only limited to the content distribution ability of public accounts, but also has the powerful development ability of its own, and even started to resemble Google, Apple and Facebook. Can cause many developers a burst of carnival. What is different is that wechat can also make many “bosses” and investors who know or don’t know technology carnival together, which has a great influence on the Internet industry with Chinese characteristics “led by HR and capital”.
Therefore, as an iOS native app developer, it’s impossible not to feel a sense of crisis. After all, a lot of simple business logic can be realized through Web technology, and the wechat platform can reach target users. As for how many 800 million users can reach, it is all up to kung fu to compete with each other. After all, no one can say that native applications must have more advantages in this level. Speaking of which, it’s possible that many acoustic app developers are actually starting to think about switching careers. But here are a few things that make me want to do mobile app development to the extreme.
MINA is more beautiful than Native
Apple’s pursuit of beauty is as always. Therefore, it provides many frameworks such as QuartzCore, Core Graphics and CoreAnimation to facilitate the realization of various intuitive, cool and smooth interactive experiences.
MINA is no faster than Native
It goes without saying that Apple, huawei, Samsung and others are constantly introducing more and more powerful hardware devices, paired with iOS and Android operating systems, and constantly optimizing them to maximize the capabilities of the hardware. While wechat runs on these two platforms, even if it can really achieve a variety of functions, it will waste a layer of computing power anyway.
MINA is no match for Native
Swift on Github
Android on Github
Apple and Google are the platforms of two world-class companies, and are also actively embracing open source, gathering the strength of developers all over the world, challenged by the closed wechat small program? Moreover, Apple is no more simple than wechat, and Swift, as a modern programming language, is really not too elegant to describe.
Above, all is an iOS native developer quibble. Well, just sauce ~, went to see Swift.
conclusion
Finally, hopefully we can grow into a mobile app native Michelin star chef before MINA opens up everywhere.