@@ -222,23 +222,13 @@ <h2 id="1-luaviewsdk是什么?">1. LuaViewSDK是N
222
222
< p > LuaViewSDK目前已经在 Alibaba 整体开源框架下完整开源(MIT协议),欢迎大家使用、讨论。
223
223
开源地址:< a href ="https://github.com/alibaba/LuaViewSDK " target ="_blank "> https://github.com/alibaba/LuaViewSDK</ a > </ p >
224
224
< h2 id ="2-为什么选择lua "> 2. 为什么选择lua</ h2 >
225
- < blockquote >
226
- < p > lua的目标是成为一个很容易嵌入其它语言中使用的语言。lua体积小、启动速度快。</ p >
227
- </ blockquote >
228
- < ol >
229
- < li > < p > < strong > 小巧</ strong > </ p >
230
- < p > 一个完整的lua解释器不过200k</ p >
231
- </ li >
232
- < li > < p > < strong > 高效</ strong > </ p >
233
- < p > 在脚本引擎中,目前lua是最快的</ p >
234
- </ li >
235
- < li > < p > < strong > 已经被广泛使用</ strong > </ p >
236
- < p > 大量的游戏引擎,服务端应用均在使用lua</ p >
237
- </ li >
238
- < li > < p > < strong > 成熟</ strong > </ p >
239
- < p > 在Android、iOS平台已经有现成的Lua解释器。LuaJ和LuaC</ p >
240
- </ li >
241
- </ ol >
225
+ < p > 市面上有许多类似的方案,比如React Native和Weex,他们使用了JS框架,配合DSL来进行界面布局,使用JS引擎进行脚本动态解析,实现了动态化的Native界面渲染能力。LuaViewSDK使用lua虚拟机进行脚本解析,通过构建lua与native之间的一系列基础bridge功能,从另一个角度实现了动态化的native能力。相比于基于JS虚拟机的解决方案,LuaViewSDK选择的lua有如下优势:</ p >
226
+ < ul >
227
+ < li > lua虚拟机极为轻量高效。单个lua虚拟机只消耗大约200到300k的内存空间,同屏渲染几十个LuaView没有任何负担</ li >
228
+ < li > lua天生就是作为一个极其轻量、可嵌入的设计实现,它更适合做API的封装或是数据传输的中间层。在App的开发上,更适合作为胶水语言,来直接操作native对象</ li >
229
+ < li > lua语法精炼,直观,native开发人员上手基本没有难度</ li >
230
+ < li > 使用native开发人员更为熟悉的Native编程模式,直接创建和操作各种界面对象</ li >
231
+ </ ul >
242
232
< h2 id ="3-luaviewsdk基础架构 "> 3. LuaViewSDK基础架构</ h2 >
243
233
< blockquote >
244
234
< p > < strong > LuaView SDK主要由Lua Engine、UI Lib、Script Manager以及Security模块构成。</ strong > </ p >
@@ -297,7 +287,7 @@ <h1 class="search-results-title">No results matching "<span class='search-query'
297
287
< script >
298
288
var gitbook = gitbook || [ ] ;
299
289
gitbook . push ( function ( ) {
300
- gitbook . page . hasChanged ( { "page" :{ "title" :"LuaViewSDK概述" , "level" :"1.1" , "depth" :1 , "next" :{ "title" :"相关下载说明" , "level" :"1.2" , "depth" :1 , "path" :"downloads.md" , "ref" :"downloads.md" , "articles" :[ ] } , "dir" :"ltr" } , "config" :{ "gitbook" :"*" , "theme" :"default" , "variables" :{ } , "plugins" :[ "-sharing" , "-livereload" , "-mathjax" , "splitter" , "prism" , "toggle-chapters" ] , "pluginsConfig" :{ "splitter" :{ } , "prism" :{ } , "toggle-chapters" :{ } , "highlight" :{ } , "search" :{ } , "lunr" :{ "maxIndexSize" :1000000 , "ignoreSpecialCharacters" :false } , "fontsettings" :{ "theme" :"white" , "family" :"sans" , "size" :2 } , "theme-default" :{ "styles" :{ "website" :"styles/website.css" , "pdf" :"styles/pdf.css" , "epub" :"styles/epub.css" , "mobi" :"styles/mobi.css" , "ebook" :"styles/ebook.css" , "print" :"styles/print.css" } , "showLevel" :false } } , "structure" :{ "langs" :"LANGS.md" , "readme" :"README.md" , "glossary" :"GLOSSARY.md" , "summary" :"SUMMARY.md" } , "pdf" :{ "pageNumbers" :true , "fontSize" :12 , "fontFamily" :"Arial" , "paperSize" :"a4" , "chapterMark" :"pagebreak" , "pageBreaksBefore" :"/" , "margin" :{ "right" :62 , "left" :62 , "top" :56 , "bottom" :56 } } , "styles" :{ "website" :"styles/website.css" , "pdf" :"styles/pdf.css" , "epub" :"styles/epub.css" , "mobi" :"styles/mobi.css" , "ebook" :"styles/ebook.css" , "print" :"styles/print.css" } } , "file" :{ "path" :"README.md" , "mtime" :"2017-03-19T06:45:25.000Z" , "type" :"markdown" } , "gitbook" :{ "version" :"3.2.2" , "time" :"2017-03-19T13:02:58.090Z" } , "basePath" :"." , "book" :{ "language" :"" } } ) ;
290
+ gitbook . page . hasChanged ( { "page" :{ "title" :"LuaViewSDK概述" , "level" :"1.1" , "depth" :1 , "next" :{ "title" :"相关下载说明" , "level" :"1.2" , "depth" :1 , "path" :"downloads.md" , "ref" :"downloads.md" , "articles" :[ ] } , "dir" :"ltr" } , "config" :{ "gitbook" :"*" , "theme" :"default" , "variables" :{ } , "plugins" :[ "-sharing" , "-livereload" , "-mathjax" , "splitter" , "prism" , "toggle-chapters" ] , "pluginsConfig" :{ "splitter" :{ } , "prism" :{ } , "toggle-chapters" :{ } , "highlight" :{ } , "search" :{ } , "lunr" :{ "maxIndexSize" :1000000 , "ignoreSpecialCharacters" :false } , "fontsettings" :{ "theme" :"white" , "family" :"sans" , "size" :2 } , "theme-default" :{ "styles" :{ "website" :"styles/website.css" , "pdf" :"styles/pdf.css" , "epub" :"styles/epub.css" , "mobi" :"styles/mobi.css" , "ebook" :"styles/ebook.css" , "print" :"styles/print.css" } , "showLevel" :false } } , "structure" :{ "langs" :"LANGS.md" , "readme" :"README.md" , "glossary" :"GLOSSARY.md" , "summary" :"SUMMARY.md" } , "pdf" :{ "pageNumbers" :true , "fontSize" :12 , "fontFamily" :"Arial" , "paperSize" :"a4" , "chapterMark" :"pagebreak" , "pageBreaksBefore" :"/" , "margin" :{ "right" :62 , "left" :62 , "top" :56 , "bottom" :56 } } , "styles" :{ "website" :"styles/website.css" , "pdf" :"styles/pdf.css" , "epub" :"styles/epub.css" , "mobi" :"styles/mobi.css" , "ebook" :"styles/ebook.css" , "print" :"styles/print.css" } } , "file" :{ "path" :"README.md" , "mtime" :"2017-03-21T14:03:24.000Z" , "type" :"markdown" } , "gitbook" :{ "version" :"3.2.2" , "time" :"2017-03-21T14:16:23.917Z" } , "basePath" :"." , "book" :{ "language" :"" } } ) ;
301
291
} ) ;
302
292
</ script >
303
293
</ div >
0 commit comments