微信小程序应用号开发体验

作者:段隆贤 时间:2022-03-12 12:56:02 

昨天微信小程序(应用号)内测的消息把整个技术社区炸开了锅,我也忍不住跟了几波,可惜没有内测资格,听闻破解版出来了,今天早上就着原来的项目资源试开发了一下,总结一 * 验.

总体体验

  1. 开发效率高,6:40左右破解完IDE,7:20左右点做完了首页和导航栏的布局,微信把觉见的布局都做了封装,比传统的前端开发效率高。

  2. 前端可以快速上手:熟练的前端可以很快上手,可能只要一小时读文档的时间加一个官方的例子。

  3. 开发工具难用,很多目录的操作和IDE常见的格式化代码,html配对等功能暂不支持。

  4. 开发限制了很多前端常见的Dom,window操作,开发的灵活度和难度降低。

  5. 我没有内测资格,小程序还不能上传体验,只能下载代码本地体验。

本文代码放在github

上截图

微信小程序应用号开发体验

微信小程序应用号开发体验

相关资源

破解的IDE

开发资源集合

IDE技术栈:NodeWebkit + React

进入的安装目录:微信web开发者工具\package.nw\app
这个*.nw就能十有八九猜出是NodeWebkit封装的Web应用,
详看依赖node_modules证实了猜想。
在package.json "main": "app/html/index.html"定义了入口。

所有的组件本质是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中创建组件的方法吗?


"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,对缓存和本地文件应该也有控制,这相对原生应用动不动几十兆上百兆的大小来说,绝对是一个亮点,给网上很多人说装微信小程序同样会占用手机存储的人一个响亮的耳光。

 微信小程序应用号开发体验

总结

总的来说,对前端来说绝对是一个好消息,短期内前端待遇可能上涨,但小程序开发门槛较低(比前端的低),有一部开发人员是面向工资编程,随着开发人员的流动,长期还是会和其它相关的的技术岗持平。所以,少年,不要激动,还要是把基础知识打扎实。

来源:http://www.cnblogs.com/etoah/p/5898619.html

标签:微信,小程序
0
投稿

猜你喜欢

  • 微信小程序实现图片轮播及文件上传

    2023-09-05 00:12:52
  • python3实现简单飞机大战

    2022-11-11 02:27:18
  • python爬虫用request库处理cookie的实例讲解

    2023-07-26 03:57:53
  • Python Series从0开始索引的方法

    2021-07-17 19:20:38
  • Python常用GUI框架原理解析汇总

    2021-05-02 05:13:35
  • python对象及面向对象技术详解

    2023-05-14 00:04:16
  • asp 延时 页面延迟的三种方法

    2011-03-31 11:04:00
  • Python urllib3软件包的使用说明

    2023-08-04 13:51:31
  • Python基于FTP模块实现ftp文件上传操作示例

    2024-01-02 00:04:38
  • Python实现 版本号对比功能的实例代码

    2022-07-22 05:53:59
  • LINUX下Oracle数据导入导出的方法详解

    2023-07-06 15:20:32
  • python中xrange和range的区别

    2023-03-14 05:54:35
  • Python使用win32com.client的方法示例

    2021-03-22 14:32:48
  • Django中的CACHE_BACKEND参数和站点级Cache设置

    2022-03-19 11:54:47
  • 在Python的Django框架中使用通用视图的方法

    2023-07-19 05:50:45
  • Python数字比较与类结构

    2023-07-29 13:33:51
  • 一个输入框提示列表效果

    2008-03-09 18:53:00
  • 全面分析Python的优点和缺点

    2023-11-09 11:00:07
  • Python实现自定义异常堆栈信息的示例代码

    2021-10-29 14:27:47
  • Python实现邮件发送功能的方法详解

    2021-02-02 10:34:58
  • asp之家 网络编程 m.aspxhome.com