Color Mode


    Language

Differences Between Mini Program Development and Web Development

May 6, 2020

Web development is built using HTML, CSS and JavaScript, where HTML describes the structure of the page, CSS determines the appearance of the page, and JS defines the interaction between the page and the user.

Mini program development is built using WXML, WXSS and JavaScript, where WXML is the equivalent of HTML, but more simple than HTML, mainly reflected in simplifying and standardizing the sticky notes.

WXSS has most of the features of CSS, but incorporates some new features and modifications for the Mini Program, JS Logic Interaction only uses the core of JavaScript.

From the above, Web development and Mini program development depend on JavaScript, but there are some differences, as follows:

DOM: Document Object Model

BOM: Browser Object Model

Because there are no DOM Objects and BOM Objects in the Mini Program, it is impossible for some libraries familiar to front-end developers, such as jQuery and Zepto, to run in Mini Programs.

Web development, rendering threads and scripting threads are mutually exclusive, so long-time script running may make a page unresponsive. In a Mini Program, rendering threads and scripting threads run separately.

The former runs in JSCore without a full browser object, thus lacking the relevant DOM and BOM APIs.

Meanwhile, the JSCore environment is different from the NodeJS environment, which means that some NPM packages cannot run in Mini Programs.

The differences between the three operating environments are as follows:

Web developers work with IE/Chrome/QQ browsers on PC, and Safari/Chrome browsers as well as various WebViews on iOS or Android systems on mobile devices.

Mini Program developers work with WeChat on iOS, Android, and WeChat DevTools.

The three operating environments of the Mini Program as follows:

Runtime EnvironmentLogic LayerRendering Layer
iOSJavaScriptCoreWKWebView
AndroidV8Chromium custom kernel
WeChat DevToolsNWJSChrome WebView

When developing web pages, Web developers only need to use browsers with some auxiliary tools or editors.

The development of Mini Programs involves applying for Mini Program accounts, installing WeChat DevTools, configuring projects, and so on.

Article Photo by baidu

mini programweb development

Author

Li Huang

Li Huang

Java Developer

👩🏼‍💻

You may also like

November 7, 2024

Introducing Shorebird, code push service for Flutter apps

Update Flutter apps without store review What is Shorebird? Shorebird is a service that allows Flutter apps to be updated directly at runtime. Removing the need to build and submit a new app version to Apple Store Connect or Play Console for review for ev...

Christofer Henriksson

Christofer Henriksson

Flutter

May 27, 2024

Introducing UCL Max AltPlay, a turn-by-turn real-time Football simulation

At this year's MonstarHacks, our goal was to elevate the sports experience to the next level with cutting-edge AI and machine learning technologies. With that in mind, we designed a unique solution for football fans that will open up new dimensions for wa...

Rayhan NabiRokon UddinArman Morshed

Rayhan Nabi, Rokon Uddin, Arman Morshed

MonstarHacks

ServicesCasesAbout Us
CareersThought LeadershipContact
© 2022 Monstarlab
Information Security PolicyPrivacy PolicyTerms of Service