阿里云赞助

Weex Page Architecture

Weex Page Architecture

A Weex page is a independent mobile page which includes UI, interaction logic, device power, lifecycle management etc.

UI

Native DOM Model

Weex page has its HTML-like DOM model to manage UI. It will be decomposed into a DOM tree which consists of some DOM nodes.

Links

Components

Weex supports many kinds of components. Some of them are content components such as text, image and videos. Some of them are container components such as div, list, scroller. Also there are some special components like slider, input, textarea, and switch.

Links

Layout System

Weex use some CSS properties to layout every nodes in the DOM tree together. It includes:

  • Box model: Describe the width, height, padding, margin and border of a component node.
  • Flexbox: Describe the relations between different nodes with CSS Flexbox Spec.
  • Supportting absolute, relative, fixed and sticky value of CSS position property.

Features

Weex supports lots of device features through modules such as storage, navigation, modals etc. Each of them exposes some JS APIs.

Links

Lifecycle

Every Weex page has its lifecycle which is defined and implemented in WeexSDK. All Weex pages will go through the whole process, from being created and last to being destroyed.

Apache Incubator
Disclaimer: Apache Weex is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.


ApacheCopyright(c) 2017 The Apache Software Foundation. Licensed under the Apache License, Version 2.0