守望者--AIR技术交流

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

搜索
热搜: ANE FlasCC 炼金术
查看: 952|回复: 1

[其他框架] Riot v3.0.0 发布,JavaScript 的 MVP 框架

[复制链接]
  • TA的每日心情
    擦汗
    2018-4-10 15:18
  • 签到天数: 447 天

    [LV.9]以坛为家II

    1742

    主题

    2094

    帖子

    13万

    积分

    超级版主

    Rank: 18Rank: 18Rank: 18Rank: 18Rank: 18

    威望
    562
    贡献
    29
    金币
    51817
    钢镚
    1422

    开源英雄守望者

    发表于 2016-11-28 13:37:00 | 显示全部楼层 |阅读模式
    ingFang SC", "Helvetica Neue", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; font-size: 16px;">

    Riot v3.0.0 发布了。

    Riot.js是一个客户端模型-视图-呈现(MVP)框架并且它非常轻量级甚至小于1kb.尽管他的大小令人难以置信,所有它能构建的有如下:一个模板引擎,路由,甚至是库和一个严格的并具有组织的MVP模式。当模型数据变化时视图也会自动更新。

    该版本暂未提供更新内容,您可点击此处了解修复情况

    下载地址:

    ingFang SC", "Helvetica Neue", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;">
    本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处,尊重他人劳动共创开源社区。
    转载请注明:文章转载自 开源中国社区 [http://www.oschina.net]
    本文标题:Riot v3.0.0 发布,JavaScript 的 MVP 框架

    守望者AIR技术交流社区(www.airmyth.com)
    回复

    使用道具 举报

  • TA的每日心情
    擦汗
    2018-4-10 15:18
  • 签到天数: 447 天

    [LV.9]以坛为家II

    1742

    主题

    2094

    帖子

    13万

    积分

    超级版主

    Rank: 18Rank: 18Rank: 18Rank: 18Rank: 18

    威望
    562
    贡献
    29
    金币
    51817
    钢镚
    1422

    开源英雄守望者

     楼主| 发表于 2016-11-28 13:38:00 | 显示全部楼层

    Riot logo

    Simple and elegant component-based UI library

    Build Status Riot Forum Join the chat at <a href=https://gitter.im/riot/riot" data-canonical-src="https://img.shields.io/badge/GITTER-JOIN_CHAT_%E2%86%92-1dce73.svg?style=flat-square" style="box-sizing: content-box; max-width: 100%;">

    NPM version NPM downloads MIT License Coverage Status Code Quality

    Sauce Test Status

    Framework Size Comparison

    FrameworkVersionMinified Size (gzip)
    Angular22too much
    Ember2.9.1110.30kb
    Angular1.5.856.28kb
    Polymer + Web Components Polyfill Lite1.7.050.25kb
    React15.4.045.05kb
    Web Components Polyfill0.7.2233.66kb
    Vue1.0.2826.83kb
    Vue2.1.025.44kb
    Riot3.0.19.75kb

    Browsers support

    Riot is supported by all modern browsers and it does not require any additional polyfill

    • IE 9+
    • Edge
    • Chrome
    • Safari 7+
    • Firefox
    • Chrome
    • Safari iOS
    • Android

    Custom tags • Concise syntax • Simple API • Tiny Size

    Riot brings custom tags to all modern browsers. Think React + Polymer but with enjoyable syntax and a small learning curve.

    Tag definition

    <timer>
    
      <p>Seconds Elapsed: { time }</p>
    
      this.time = opts.start || 0
    
      tick() {
        this.update({ time: ++this.time })
      }
    
      var timer = setInterval(this.tick, 1000)
    
      this.on('unmount', function() {
        clearInterval(timer)
      })
    
    </timer>

    Open this example on Plunker

    Mounting

    riot.mount('timer', { start: 0 })

    Nesting

    Custom tags lets you build complex views with HTML.

    <timetable>
      <timer start="0"></timer>
      <timer start="10"></timer>
      <timer start="20"></timer>
    </timetable>

    HTML syntax is the de facto language on the web and it's designed for building user interfaces. The syntax is explicit, nesting is inherent to the language and attributes offer a clean way to provide options for custom tags.

    Expressions Bindings

    • Absolutely the smallest possible amount of DOM updates and reflows.
    • One way data flow: updates and unmounts are propagated downwards from parent to children.
    • Expressions are pre-compiled and cached for high performance.
    • Lifecycle events for more control.

    Close to standards

    • No proprietary event system.
    • Event normalization.
    • The rendered DOM can be freely manipulated with other tools.
    • No extra HTML root elements or data- attributes.
    • Plays well with jQuery.

    Use your dearest language and tools

    CDN hosting

    Concise syntax

    • Power shortcuts: class={ enabled: is_enabled, hidden: hasErrors() }.
    • No extra brain load such as renderstate, or constructor.
    • Interpolation: Add #{ items.length + 1 } or class="item { selected: flag }"
    • Compact ES6 method syntax.

    Demos

    Tutorials

    Video Tutorials

    Libraries / Frameworks

    Components

    Resources

    Performance

    Miscellaneous

    Editors / Editor Plugins (Syntax highlighting, autcompletion, etc...)

    How to contribute

    If you are reading this it's already a good sign and we are thankful for it! We try our best working as much as we could on riot but your help is always appreciated.

    If you want to contribute to riot helping us maintaining the project please check first the list of our open issues to understand whether there is a task where you could help.

    Riot is mainly developed on UNIX systems so you will be able to run all the commands necessary to build and test the library using our Makefile. If you are on a Microsoft machine it could be harder to set up you development environment properly.

    Following the steps below you should be able to properly submit your patch to the project

    1) Clone the repo and browse to the riot folder

    $ git clone git@github.com:riot/riot.git && cd riot

    2) Set up your git branch

    $ git checkout -b feature/my-awesome-patch

    3) Install the npm dependencies

    $ npm i

    4) Build and test riot using the Makefile

    # To build and test riot
    $ make riot
    
    # To build without testing
    $ make raw
    
    # To build anytime you change a src file
    $ make watch
    
    # To bench riot ( it requires ctrl+c to exit )
    $ make perf

    5) Pull request only against the dev branch making sure you have read our pull request template

    6) Be patient

    Credits

    Riot is made with :heart: by many smart people from all over the world. Thanks to all the contributors
    It's actively maintained by:

    Buy us a coffee :coffee:

    Click here to lend your support to: Riot and make a donation at pledgie.com !

    http://riotjs.com/

    守望者AIR技术交流社区(www.airmyth.com)
    回复 支持 反对

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    
    关闭

    站长推荐上一条 /4 下一条

    QQ|手机版|Archiver|网站地图|小黑屋|守望者 ( 京ICP备14061876号

    GMT+8, 2019-12-7 04:37 , Processed in 0.055968 second(s), 32 queries .

    守望者AIR

    守望者AIR技术交流社区

    本站成立于 2014年12月31日

    快速回复 返回顶部 返回列表