微信小程序應(yīng)用號開發(fā)體驗
昨天微信小程序(應(yīng)用號)內(nèi)測的消息把整個技術(shù)社區(qū)炸開了鍋,我也忍不住跟了幾波,可惜沒有內(nèi)測資格,聽聞破解版出來了,今天早上就著原來的項目資源試開發(fā)了一下,總結(jié)一下體驗.
總體體驗
- 開發(fā)效率高,6:40左右破解完IDE,7:20左右點做完了首頁和導(dǎo)航欄的布局,微信把覺見的布局都做了封裝,比傳統(tǒng)的前端開發(fā)效率高。
- 前端可以快速上手:熟練的前端可以很快上手,可能只要一小時讀文檔的時間加一個官方的例子。
- 開發(fā)工具難用,很多目錄的操作和IDE常見的格式化代碼,html配對等功能暫不支持。
- 開發(fā)限制了很多前端常見的Dom,window操作,開發(fā)的靈活度和難度降低。
- 我沒有內(nèi)測資格,小程序還不能上傳體驗,只能下載代碼本地體驗。
本文代碼放在github
上截圖


相關(guān)資源
IDE技術(shù)棧:NodeWebkit + React
進入的安裝目錄:微信web開發(fā)者工具\package.nw\app
這個*.nw就能十有八九猜出是NodeWebkit封裝的Web應(yīng)用,
詳看依賴node_modules證實了猜想。
在package.json "main": "app/html/index.html"定義了入口。
所有的組件本質(zhì)是React組件
在入口中可以看到直接引用了React 和React DOM

"use strict";
function init() {
tools.Chrome = chrome;
var n = require("../dist/lib/react.js"),
e = require("../dist/lib/react-dom.js"),
i = require("../dist/common/loadInit/init.js"),
o = require("../dist/components/ContainController.js"),
t = require("../dist/common/proxy/startProxy.js"),
r = require("../dist/actions/windowActions.js"),
s = require("../dist/actions/webviewActions.js"),
d = require("../dist/stroes/webviewStores.js"),
u = require("../dist/common/log/log.js"), c = require("../dist/common/shortCut/shortCut.js"), l = global.appConfig.isDev;
//...
}
看一下組件Dropdown的定義,這不就是我們熟悉的React在ES5中創(chuàng)建組件的方法嗎?
"use strict";
var React = require("../../lib/react.js"), Dropdown = React.createClass({
displayName: "Dropdown", render: function () {
return React.createElement("div", {className: "dropdown"}, React.createElement("div", {className: "dropdown-item"}, React.createElement("img", {
src: "https://mmrb.github.io/avatar/jf.jpg",
alt: "",
className: "dropdown-item-icon"
}), React.createElement("div", {className: "dropdown-item-info"}, React.createElement("p", null, "公眾號名稱啦")), React.createElement("div", {className: "dropdown-item-extra"}, React.createElement("img", {
src: "https://mmrb.github.io/avatar/jf.jpg",
alt: "",
className: "dropdown-item-extra-icon"
}))), React.createElement("div", {className: "dropdown-item dropdown-item-active"}, React.createElement("img", {
src: "https://mmrb.github.io/avatar/jf.jpg",
alt: "",
className: "dropdown-item-icon"
}), React.createElement("div", {className: "dropdown-item-info"}, React.createElement("p", null, "公眾號名稱啦公眾號名稱啦公眾號名稱啦"))), React.createElement("div", {className: "dropdown-item"}, React.createElement("img", {
src: "https://mmrb.github.io/avatar/jf.jpg",
alt: "",
className: "dropdown-item-icon"
}), React.createElement("div", {className: "dropdown-item-info"}, React.createElement("p", null, "公眾號名稱啦"))), React.createElement("div", {className: "dropdown-item"}, React.createElement("img", {
src: "https://mmrb.github.io/avatar/jf.jpg",
alt: "",
className: "dropdown-item-icon"
}), React.createElement("div", {className: "dropdown-item-info"}, React.createElement("p", null, "公眾號名稱啦"))))
}
});
module.exports = Dropdown;
微信限制了小程序的包大小
同時微信限制了小程序包的大小,為755kb,對緩存和本地文件應(yīng)該也有控制,這相對原生應(yīng)用動不動幾十兆上百兆的大小來說,絕對是一個亮點,給網(wǎng)上很多人說裝微信小程序同樣會占用手機存儲的人一個響亮的耳光。

總結(jié)
總的來說,對前端來說絕對是一個好消息,短期內(nèi)前端待遇可能上漲,但小程序開發(fā)門檻較低(比前端的低),有一部開發(fā)人員是面向工資編程,隨著開發(fā)人員的流動,長期還是會和其它相關(guān)的的技術(shù)崗持平。所以,少年,不要激動,還要是把基礎(chǔ)知識打扎實。
以上就是對微信小程序的資料整理,后續(xù)繼續(xù)補充相關(guān)資料,謝謝大家對本站的支持!
相關(guān)文章
cnpm不是內(nèi)部命令的解決方案:配置環(huán)境變量【推薦】
這篇文章主要介紹了cnpm不是內(nèi)部命令的解決方案:配置環(huán)境變量的相關(guān)知識,本文給大家介紹的非常詳細(xì),具有一定的參考借鑒價值,需要的朋友可以參考下2019-07-07
asp php 清空access mysql mssql數(shù)據(jù)庫的代碼
php清空mysql asp情況access或mssql2008-12-12
vs2019+cmake實現(xiàn)Linux遠(yuǎn)程開發(fā)的方法步驟
這篇文章主要介紹了vs2019+cmake實現(xiàn)Linux遠(yuǎn)程開發(fā)的方法步驟,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2021-04-04
卷積神經(jīng)網(wǎng)絡(luò)Inception?V3網(wǎng)絡(luò)結(jié)構(gòu)圖
這篇文章主要為大家介紹了卷積神經(jīng)網(wǎng)絡(luò)的網(wǎng)絡(luò)結(jié)構(gòu)圖Inception?V3的結(jié)構(gòu)圖層詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪2022-05-05

