### Problem

The current implementation of Vanilla framework is quit old:
https://github.com/apache/incubator-weex/blob/master/html5/frameworks/vanilla/index.js#L69

and it lacks some features provided in Weex in newer versions:
requireModule, global `weex` variable. Also it exposed `id` `options`
variables to the global scope which makes scripting apps with Vanilla
framework not as safe.

### Proposed solution

Since I don't know every detail of how Weex works, I think reusing code
from Vue is much easier. By removing Vue related code I got a first version
that's workable
https://gist.github.com/jiyinyiyong/39b8e319b7078dd613f7e5b0c7191369 which
is based on
https://github.com/vuejs/vue/blob/dev/src/platforms/weex/framework.js .

Higher level features of js framework is documented at
http://weex.apache.org/references/advanced/extend-jsfm.html but I still got
some confusions, a new function `reset` is added, while `prepareInstance`
`registerMethods` are removed in the Vue code.

Just need to to confirm the details since I just simply removed Vue-related
code to get the first version.

### Benefit

In Eleme(github id: eleme) we are experimenting Weex online, and some of
our code are `*.js` files which does analytics works. A Vanilla Weex
environment would easily simplify our development of small libraries that
are not related to Vue or any other framework. I think that bring
convenience to others to.

And personally I think it brings more help to people who want to use other
self-created frameworks. However, currently I'm the only one I know who
want to do it for real. Also by offering such a framework, it can be
helpful in debugging too since we can be sure less code is involved.

Reply via email to