Backend logic container for front-end developers.
The front-end framework of the WeChat applet is officially named MINA; then our unofficial back-end will echo the same and is tentatively named NAMI.
NAMI provides support for all services required by a mini program server, including but not limited to processing request requests, receiving and processing websockets, interacting with the WeChat server and maintaining access_token, processing WeChat server login authentication, sending template messages, and receiving WeChat payment events , etc.
For small applications: You only need to find a computer (whether windows, mac or linux), a cloud virtual machine, or even a docker instance to install NAMI; NAMI provides a complete set of small program back-end solutions. We will take care of all the issues related to the back-end development of small programs for you.
For large applications: Maybe small programs are only part of your entire IT architecture; maybe you also need to consider load balancing, multi-instance deployment, and caching; NAMI can be used as a pure JAVA open source framework to simplify your JAVA development and help you Solve problems related to mini programs more efficiently.
More exquisite introductions (thanks to the company’s front-end partners for the page): http://riversoft.com.cn/nami.html
No need to know JAVA, PHP or other back-end languages;
There is no need to install TOMCAT and LAMP;
Use the JavaScript language you are most familiar with to write back-end logic , use imperative statements to directly operate the database, and call WeChat background services ( have you tried using JavaScript to send template messages? )
Maybe you are an experienced JAVA or PHP programmer, but the leader does not have much time for you to develop small programs;
Faced with authentication login, payment, template messages, using unionid to open a service account , and looking at the access token heartbeat maintenance, encryption and decryption of WeChat official documents, your head will be big;
Maybe you are better at demand modeling and business logic development, but don’t want to get bogged down in technical details;
NAMI adopts script development. As long as you can write if (judgment) and for-each (loop) , your problems can be solved quickly and efficiently.
NAMI is developed using pure JAVA language and has clear encapsulation and external API;
NAMI has a built-in dynamic script engine that fully encapsulates the WeChat official server API;
NAMI can also become one of the open source independent JAR packages for your JAVA project , helping you solve problems more efficiently and quickly.
//==================NAMI HELLO WORLD begin =================
//第一个NAMI小程序调用
wx . request ( {
url : 'http://localhost:8080/request/hello.js' ,
data : {
a : 'hello' ,
b : 2
} ,
complete : function ( res ) {
console . log ( "调用完成" ) ;
console . log ( res . data ) ;
}
} )
//==================NAMI HELLO WORLD end =================
( function ( ) {
var a = request . getString ( "a" ) || 'none' ;
var b = request . getInteger ( "b" ) || 0 ;
return {
a : a ,
b : b
}
} ) ( ) ;
NAMI adopts functional development. Regardless of function or request, a file represents a function (or request). NAMI agreement:
Download the running version (Baidu Cloud Disk): http://pan.baidu.com/s/1bJmUtg
Online documentation: https://hyhcoder.gitbooks.io/namiapi/content/
Build with maven and execute in the root directory:
mvn clean install
The packaging result is in /package/target/nami-pack-<platform>.zip, platform = nojdk|win32|win64|linux32|linux64
woden (http://github.com/wodenwang) BPMT WeChat rapid development platform core development, WeChat public account: full stack ginger head .
borball (http://github.com/borball) is the initiator of the open source project WeChat JavaSDK (https://github.com/borball/weixin-sdk).