# frame

The goal of the Weixin Mini Program development framework is to make it as simple and efficient as possible for developers to develop services with native app experiences in WeChat.

The entire Weixin Mini Program framework system is divided into two parts: ** ](app-service/index.md) ** (App Service)And ** View layer ** (View).Mini Program provides its own view layer description languageWXMLandWXSS,And a logic layer framework based onJavaScriptthat provides a data transfer and event system between the view layer and the logic layer, allowing developers to focus on data and logic.

# The data binding of the response

At the heart of the framework is a responsive data binding system that makes it very simple to keep the data in sync with the view. When you make data changes, you just need to modify the data in the logic layer, and the view layer will update it accordingly.

Take this simple example:

Preview with Developer Tool

<!-- This is our View -->
<view> Hello {{name}}! </view>
<button bindtap="changeName"> Click me! </button>
// This is our App Service.
// This is our data.
var helloData = {
  name: 'Weixin'
}

// Register a Page.
Page({
  data: helloData,
  changeName: function(e) {
    // sent data change to view
    this.setData({
      name: 'MINA'
    })
  }
})
  • The developer uses the framework to bind thenamein the logical layer data to thename]]in a view layer, so theappears when the page opens. Hello Weixin!
  • When the button is clicked, the view layer sendschangenameevents to the logic layer, and the logic layer finds and executes the corresponding event handler;
  • After the callback function is triggered, the logical layer executessetDataThe operation changes thenamefromWeixinto`` MINA, since the data and view layer are already bound, the view layer will automatically change toHello MINA!`。

# Page Management

The framework manages the entire Weixin Mini Program page routing, enabling seamless switching between pages and giving a complete lifecycle of pages.All developers need to do is to register the data, methods and life periodic function of the page in the framework, and all other complex operations are handled by the framework.

# Basic components

The Framework provides a set of foundational components that come with WeChat style styles and special logic that developers can combine to create powerful WeChat-]] components.** Weixin Mini Program** 。

# Rich API

The framework provides a rich native API, which can easily adjust WeChat's capabilities, such as access to user information, local storage, payment functions, etc.