# Logic Layer App Service

At the logic layer of the Mini Program development framework, the JavaScript engine is used to provide a Mini Program with features specific to Weixin Mini Programs and an environment for running JavaScript code written by developers.

The logic layer processes data and sends processed data to the view layer, and receives event feedback from the view layer.

All code written by developers will be packaged into a JavaScript file, which runs when the Mini Program is started until the Mini Program is destroyed. This behavior is similar to ServiceWorker. Therefore, the logic layer is also referred to as an App Service.

Based on JavaScript, we have added some features to facilitate the development of Mini Programs:

  • App and Page methods used for Program Registration and Page Registration
  • getApp and getCurrentPages methods, respectively used to obtain the App instance and the current page stack
  • Rich API, such as Weixin user data, Scan, WeChat Pay, and other Weixin-specific capabilities
  • Modularization capability, allowing each page to have an independent [Scope](./module.md#File Scope)

Note: The logic layer of the Mini Program development framework does not run on browsers. Therefore, web-based capabilities of JavaScript, such as window and document, are unavailable.