# Introduction
The goal of the Mini-Program development framework is to enable developers to create services with a native APP experience within WeChat in the simplest and most efficient way possible.
The entire Mini-Program framework system is divided into two parts: the App Service / Logic Layer and the View Layer. The Mini-Program provides its own view layer description languages FXML and FTSS, a JavaScript-based logic layer framework, and offers data transfer and event systems between the view layer and the logic layer, allowing developers to focus on data and logic.
# 1. Reactive Data Binding
The core of the framework is a reactive data binding system that makes it very simple to keep data and the view in sync. When making data modifications, you only need to modify the data in the logic layer, and the view layer will update accordingly.
Take a look at this simple example:
<!-- 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: 'FinClip'
}
// Register a Page.
Page({
data: helloData,
changeName: function(e) {
// sent data change to view
this.setData({
name: 'World'
})
}
})
- The developer binds the
namein the logic layer data with thenamein the view layer through the framework, so when the page opens, it displaysHello FinClip!. - When the button is clicked, the view layer sends a
changeNameevent to the logic layer, which finds and executes the corresponding event handler function. - After the callback function is triggered, the logic layer performs a
setDataoperation, changing thenameindatafromFinCliptoWorld. Because this data is already bound to the view layer, the view layer automatically changes toHello World!.
# 2. Page Management
The Framework manages the entire Mini-Program's page routing, enabling seamless transitions between pages and providing a complete lifecycle for each page. Developers only need to register the page's data, methods, and lifecycle functions with the Framework, and all other complex operations are handled by the Framework.
# 3. Basic Components
The Framework provides a set of basic components that come with unified styling and specific logic. Developers can create powerful FinClip Mini-Programs by combining these basic components.
# 4. Rich APIs
The Framework offers a rich set of native APIs, making it convenient to invoke the capabilities provided by the Mini-Program SDK.