Coder Social home page Coder Social logo

wechat.el's Introduction

wechat.el

wechat.el是一个微信公众平台开发框架,但使用的是Emacs Lisp编程语言!利用Lisp语言强大的可定制性,使得开发一个公众平台的应用犹如编写一段剧本一样简单!

wechat.el使用了状态模式和责任链模式:

  1. 把整个应用抽象成一张大的地图
  2. 每一种状态都看作一个独立的房间,房间之间有很多扇门连接
  3. 进入房间时自动输出提示语,即返回给用户的信息
  4. 用户的输入就是钥匙,依次与该房间的门匹配,如果能开启,就通过这一扇门进入下一个房间,即状态迁移

wechat-5x5.el

一个样例,微信小游戏——开窗。展示了如何基于wechat.el开发自己的公众平台应用。

launch.el

启动脚本。下载elnode等必要的Emacs插件,载入并启动服务器。

启动方法

  1. git clone https://github.com/redraiment/wechat.el.git
  2. emacs launch.el
  3. M-x
  4. eval-current-buffer 之后,你就能访问 http://localhost:26870/game/5x5.el?echostr=hello 来测试。 你还可以改变默认的端口(26870)或与Nginx等Web服务器集成(方法参见launch.el的注释)。

运行界面

Screenshot

微信二维码

2D-Code

wechat.el's People

Contributors

redraiment avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wechat.el's Issues

应用内部的共享

应用级别(Application scope):提供wechat-app-scope函数,应用内部共享;

全局级别共享

全局级别(Global scope):提供wechat-scope函数,全局共享。

微信版Try Clojure

把Try Clojure翻译成中文,并且基于教程框架开发微信版的Clojure教程。

应用之间独立的会话

会话级别(Session scope):确保session内容在应用之间相互独立的。
在session保存目录下,为每个应用创建独立的子目录,保证每个session在app之间相互独立。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.