-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion of page structure file extension #2
Comments
Related discussions: https://www.w3.org/2020/03/12-miniapp-minutes.html#t05 |
If it's not intented to be an XML file, and multiple root nodes is more acceptable by the developers, we should give it a different extension name like '.maml'. |
I think the miniapp implementation should follow the XML specification. And there should be a standard root node. why we need this no root xml file? What's the benefits of this? |
I think it's more about the developers' convension. I'm open to this, and let's see others' preferences. |
Related: w3c/miniapp#160 |
I think it is a good time to pick up this thread since this may impact some standards under developing or incubating, like packaging and UI components. At the last CG meeting, we have discussed some idea about the markup language, and here are some summarizations: How to define the MiniApp page elements and components? Ideas to reuse existing standards:
|
Thanks, @MichaelWangzitao. I'll complement this thread with some some additional thought on the challenges to be solved, raised in w3c/miniapp#161 (thanks @zhangking). Templating mechanismThe existing implementations use an MVVM approach with the following main features:
Data interpolationThe HTML spec already includes a There have been several attempts to create template interpolation mechanisms (for instance, Apple's proposal in 2017). Currently, there is also a discussion in WHATWG), based on {{ Moustache }}-style variables in Another option is using XSLT 3.0 and XPath 3.1. It would be feasible, but too complex and I think developers won't like it :) Event handlingThe standard way would be using DOM Event handlers (e.g., The MiniApp MVVM model to bind data and events is against the standard HTML/DOM approach:
Conditionals, loops for renderingAs far as I know, there are no standard ways to use conditionals, loops, and similar logic in the rendering process. Any idea? |
It's my opinion that we should be following the latest HTML standards including looking forward to what will be released on the horizon. I don't believe XML, XSLT, XPath would be acceptable as these technologies for the most part are now archaic and rarely used also not performant compared to alternatives. Wherever possible we should leverage all the Open UI and modern Web Standards that are in place or future features. I also, would like to understand the desire for multiple root element support? What problems or limitations exist with the current single root structure? |
@zhangyongjing could you elaborate on this?
I'm curious what type of developers we're speaking about? Native mobile developers? Web developers? etc? |
I was talking about mini-program/ mini-app/ quick-app developers working with 'Wechat mini-program', 'Baidu smart-programe', 'Alipay miniapps', 'Quick Apps' etc. Those frameworks are the technical bases (or pre-standard implementations) of W3C MiniApps. Some of them are defining their own markup languages (WXML, SWAN, AXML) for the page templating in a multi-root structure. For example:
While Quick App template requires single root sturcture, but the template is combined together with the scripts and style in a single file (like Vue):
|
Case 1: Including multiple root nodes, the page with template reference does not fit xml specs.
Reference:
https://developers.weixin.qq.com/miniprogram/dev/reference/wxml/import.html
https://smartprogram.baidu.com/docs/develop/framework/view_quote/
The text was updated successfully, but these errors were encountered: