Mini App Document Mini App Document
  • Start
  • Configuration
  • Framework
  • Custom Components
  • Basic ability
  • Configuration
  • Interface
  • FXML syntax
  • FXS syntax
API
Components
IDE
  • Developer
  • Operator
  • Start
  • Configuration
  • Framework
  • Custom Components
  • Basic ability
  • Configuration
  • Interface
  • FXML syntax
  • FXS syntax
API
Components
IDE
  • Developer
  • Operator
  • Start

  • Configuration

  • MiniApp Framework

    • Introduction
    • Logical layer
    • View
  • Custom component
  • Basic ability

  • Guide
  • MiniApp Framework
2022-08-05

Introduction

# Introduction

The entire Mini App framework system is divided into two parts: the 'Logical Layer (App Service)' and the 'View Layer'. The Mini App provides its own view layer description languages 'FXML' and 'FTSS', as well as a logical layer framework based on 'JavaScript', and provides a data transmission and event system between the view layer and the logic layer, allowing developers to focus on data and logic.

  1. Data binding for the response

At the heart of the framework is a responsive data binding system that allows data to be easily synchronized with views. When modifying the data, you only need to modify the data at the logical layer, and the view layer will make corresponding updates.

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: 'Neuxnet'
}

 Register a Page.
Page({
  data: helloData,
  changeName: function(e) {
     sent data change to view
    this.setData({
      name: 'World'
    })
  }
})
  • The developer binds the 'name' in the logical layer data to the 'name' of the view layer through the framework, so that 'Hello Neuxnet!' will be displayed when the page opens;
  • When the button is clicked, the view layer sends the 'changeName' event to the logic layer, which finds and executes the corresponding event handler function;
  • After the callback function is triggered, the logic layer performs the 'setData' operation, changing the 'name' in 'data' from 'Neuxnet' to 'World', because the data and view layers are already bound, so that the view layer automatically changes to 'Hello World!'.
  1. Page Management

The 'framework' manages the page routing of the entire Mini App, which can achieve seamless switching between pages and give the page a complete life cycle. All developers need to do is register the page's data, methods, and lifecycle functions with the 'framework', and all the other complex operations are handled by the 'framework'.

  1. Base components

The 'framework' provides a set of "basic components" with a unified style and special logic, and developers can create powerful Neuxnet MiniApps by combining basic components.

  1. Rich API

The 'framework' provides a rich set of native APIs that can easily call up the capabilities provided by the Mini App SDK.

Last update: 2022/08/16, 21:24:25
sitemap configuration
Logical layer

← sitemap configuration Logical layer→

Copyright © 2020-2024 Neuxnet
  • Follow System
  • Light Mode
  • Dark Mode
  • Reading Mode