Reapp 混合应用 - 帮助构建前所未所的强大应用(Reapp Hybrid apps - help you build powerful apps like never before)

Reapp 混合应用 - 帮助构建前所未有的强大应用

(Reapp Hybrid apps -  help you build powerful apps like never before)

太阳火神的美丽人生 (http://blog.csdn.net/opengl_es)

本文遵循“署名-非商业用途-保持一致”创作公用协议

转载请保留此句:太阳火神的美丽人生 -  本博客专注于 敏捷开发及移动和物联设备研究:iOS、Android、Html5、Arduino、pcDuino,否则,出自本博客的文章拒绝转载或再转载,谢谢合作。

Git 托管

reapp

Hybrid apps, fast

React, Webpack, ES6 and our platform help you build powerful apps like never before.

npm install -g reapp

reapp new app

cd app && reapp run

Get StartedGithubTwitter

Kitchen SinkHacker News

Try it live

What is it?


React UI Kit


npm Modules


Webpack Build System


Easy CLI

  Reapp Ionic Touchstone Supersonic
Platform React Angular React Angular
Routing react-router Angular Angular
CLI
Docs
Animations Interactive JS CSS CSS CSS
Build System Webpack Gulp Gulp
Hot Reload
Themes Customizable JS CSS CSS CSS
Layout Flexbox Block Flexbox Block
Icons SVG Icon Font Icon Font Icon Font
  Views Views Views Views
Interactive
Customizable

The UI Kit »


Animations

Dynamic & fully interactive JavaScript-powered animations.


Styles

JavaScript + Flexbox. Composable, dynamic, with a declarative interface.


Themes

Constants, styles and animations. Mix and match them all to make your theme.


Views

Views, ViewLists, even nested ViewLists. Build your own!


Components

Load individually for optimal load & build times.


Mixins

Use all our animation and styling mixins externally.

Example

import React from 'react';
import { DottedViewList, View, List } from 'reapp-ui/all';

export default React.createClass({
  render() {
    return
      <DottedViewList>
        <View title="Hot Articles">
          <List wrap>
            {HotArticles.map(a => a.title)}
          </List>
        </View>

        <View title="Other">
          <p>Second view contents</p>
        </View>
      </DottedViewList>
  }
});

DottedViewLists show Views side-by-side with a dot indicator, just like the Twitter app.

Reapp has NestedViewList and DottedViewList, but you can use the ViewListMixin to make your own.

Lists can automatically wrap an array of items with ListItem components using the wrap property.

Read the docs

What else?

A set of optional packages. Once generated, mix and match them as you like.

reapp-component

A decorator and dependency injector

reapp-pack

Generate & run webpack configs

reapp-platform

Some mixins and helpers for React apps

reapp-reducer

A tiny reducer for use with flux apps

reapp-request

Superagent + bluebird + promises

reapp-routes

DRY route to require w/react-router

reapp-server

Express assets for Reapp-structured apps

reapp-object-assign

A polyfill, for Object.assign

Why?

A new stack, designed for software instead of documents, is needed.@lkrubner

having everybody in need of transportation buy the necessary spareparts to build a car is insane.@jballanc

React enables incredible boosts of both productivity and performance. It's declarative components with lifecycles are the future of making apps.

JavaScript has grown up as well. We have amazing build tools that bring us new features. Webpack and 6to5 give you ES6/7, JSX and more. With react-hot-loader you have insanely fast development.

We want to get you running without locking you into a framework. So we built a simple CLI that bootstraps you in minutes. It even runs your server and builds out of the box.

Enjoy flexibility without needing all the glue. We're making hybrid apps, fast.

DocsModules

GithubTwitter

Copyright 2015 reapp.Icons from flaticon.com under CC 3.0nate@reapp.io

What is it?

Reapp is everything you need to build amazing hybrid apps with React: a collection of modules that work together, a UI kit, and our CLI that bootstraps your app and has a pre-configured build server.

Help

Examples

We have two example apps you can check the source to:

Installation

Installation is done through npm, though you can pick and choose any pieces you'd like and roll your own stack. To get the reapp CLI:

npm install -g reapp

Once that's done you can generate a new base reapp stack with:

reapp new [name]

Where [name] is the name you'd like to give your new stack.

CLI

The CLI has two main functions that it helps you with. The first is creating new apps. For now, it simply makes a bare clone of a repo we keep updated with the current best-practice. The goal is eventually to have a variety of baseline repo's to choose from.

It also lets you run your app, using reapp-server, a simple express server that works well with the default app structure.

CLI Usage:

Usage: reapp [options] [command]

Commands:

  new [name]  creates a directory with a new reapp-starter scaffold
  run         runs a reapp application with express/webpack-dev-server
  build       builds a reapp application to a bundle in ./build
  debug       use this to for opening issues!
  help [cmd]  display help for [cmd]

Running & Building Reapp

The run command has a few options to help you out. You can do:

  • reapp run -d (debug) to output information on how it's running your app
  • reapp run -e production (env=production) to run your app in production mode, which is much faster
  • reapp run -t source-map (tool=source-map) to have full sourcemaps rather than the "eval" style sourcemaps we default to

The build command is used once you're ready to deploy your app (to either the web or to cordova). For now, we provide two types of builds:

  • reapp build targets the web for mobile sites.
  • reapp build ios targets cordova ios devices.

You also have the same flags available as the run commands, to adjust tools and envs.

When you run reapp build you'll notice a new ./build folder where your assets have been copied to. We're working on adding more documentation soon on how to get those assets into a Cordova/Phonegap app.

Structure of your applications

You can see the exact app that's generated through the reapp-starter repo. Only the /app/app.jsentrypoint and /assets/layout.html is "necessary". In the future, we could have a config file to make this completely custom. For now, it's very simple:

/app
  /components
  /theme
  app.js
  routes.js
/assets
  layout.html
/config (optional)

/app/app.js is your entry point. Everything in the app folder should be pretty self-explanatory. /assets contains static assets, with a layout.html that is used to serve your app within. In general, you should't have to touch the layout, even for adding styles.

The /theme folder is reapp-ui specific. You can find docs for it in the repo, but it also should be pretty easy to understand.

If you place a build.webpack.js or run.webpack.js in your /config dir, the reapp CLI will use these configs when you run reapp build or reapp run. To see some example configs, check out the files in the ./config folder of the reapp-pack repo.

Your First App

There are a number of pieces we've included in a reapp. Let's explore a few of them in order of when you'll encounter them in your codebase. Think of this as a tour of a reapp app, giving an introduction to packages as we encounter them.

You can check out the reapp project on Github for more info.

To start, you'll want to open ./package.json. Notice we have the following packages:

You also have an entry point defined as app/app.js. This starts your app. The most important part here is the routing. Lets start there.

reapp-routes (Routes generator)

reapp-routes is a DRY nested route-to-directory mapping system. As long as your routes map to your component file structure, you can save lots of time and enforce consistency in your app, a win-win.

Notice how the import looks for reapp-routes/react-router. The first import in app.js is your router. We love react-router, so we included a reapp-routes generator for that by default, but you could write your own.

You'll notice that the pre-defined routes all perfectly map to the structure of ./app/components. To see more about how this works, check out reapp-routes.

This is the reapp-routes syntax. The key to note here is the require that is passed to the routes function at the top level, which is how it dynamically requires your components based on the route tree.

reapp-ui (UI Kit)

The next theme we require is the ./app/theme.js file. reapp-ui has it's own documentation, but themes are the core of reapp-ui. They have three things they need: constants, styles, and animations. You can just use the included iOS theme, but we've included the ./app/theme folder as an example of how you can easily customize themes.

Other packages

Why

Reapp wasn't built purposefully to be a framework. Instead, it started as a UI kit. From that kit, two apps were built. While this isn't a lot, it was enough to see repetition between the two that could be extracted.

From those two apps, over a period of months, we extracted a set of packages, ensuring to keep each of them completely independent. It was an experiment in seeing if a framework was necessary.

What we found was this: if you can subscribe to a certain file structure, you can avoid the framework. With that file structure, we can provide helpers via a CLI. Bootstrap your app in one command and you have a mature build system built in, without having to do anything.

Really, Reapp is simple. You could even just use the UI kit and roll your own app. We just went through that headache, and decided to make it easier to avoid it if you like how we make apps.

Roadmap

Our initial goals are simple: focus on completeness, consistency, and performance. Also, a theme for Android.

Down the road we'd like to achieve the following:

  • Isomorphic - Render first on server, pass data over to client to continue from there (easily achievable).
  • Responsive - Support for tablet style interfaces and JS-powered responsive styling.
  • Physics - A spring based physics library into the animation library with an easy syntax.
  • Interaction - A simple, declarative interaction library that can be composed well with reapp

Development Environment

Sublime users, some helpful plugins for you to install:

reapp

Hybrid apps, fast

React, Webpack, ES6 and our platform help you build powerful apps like never before.

npm install -g reapp

reapp new app

cd app && reapp run

Get StartedGithubTwitter

Kitchen SinkHacker News

Try it live

What is it?


React UI Kit


npm Modules


Webpack Build System


Easy CLI

  Reapp Ionic Touchstone Supersonic
Platform React Angular React Angular
Routing react-router Angular Angular
CLI
Docs
Animations Interactive JS CSS CSS CSS
Build System Webpack Gulp Gulp
Hot Reload
Themes Customizable JS CSS CSS CSS
Layout Flexbox Block Flexbox Block
Icons SVG Icon Font Icon Font Icon Font
  Views Views Views Views
Interactive
Customizable

The UI Kit »


Animations

Dynamic & fully interactive JavaScript-powered animations.


Styles

JavaScript + Flexbox. Composable, dynamic, with a declarative interface.


Themes

Constants, styles and animations. Mix and match them all to make your theme.


Views

Views, ViewLists, even nested ViewLists. Build your own!


Components

Load individually for optimal load & build times.


Mixins

Use all our animation and styling mixins externally.

Example

import React from 'react';
import { DottedViewList, View, List } from 'reapp-ui/all';

export default React.createClass({
  render() {
    return
      <DottedViewList>
        <View title="Hot Articles">
          <List wrap>
            {HotArticles.map(a => a.title)}
          </List>
        </View>

        <View title="Other">
          <p>Second view contents</p>
        </View>
      </DottedViewList>
  }
});

DottedViewLists show Views side-by-side with a dot indicator, just like the Twitter app.

Reapp has NestedViewList and DottedViewList, but you can use the ViewListMixin to make your own.

Lists can automatically wrap an array of items with ListItem components using the wrap property.

Read the docs

What else?

A set of optional packages. Once generated, mix and match them as you like.

reapp-component

A decorator and dependency injector

reapp-pack

Generate & run webpack configs

reapp-platform

Some mixins and helpers for React apps

reapp-reducer

A tiny reducer for use with flux apps

reapp-request

Superagent + bluebird + promises

reapp-routes

DRY route to require w/react-router

reapp-server

Express assets for Reapp-structured apps

reapp-object-assign

A polyfill, for Object.assign

Why?

A new stack, designed for software instead of documents, is needed.@lkrubner

having everybody in need of transportation buy the necessary spareparts to build a car is insane.@jballanc

React enables incredible boosts of both productivity and performance. It's declarative components with lifecycles are the future of making apps.

JavaScript has grown up as well. We have amazing build tools that bring us new features. Webpack and 6to5 give you ES6/7, JSX and more. With react-hot-loader you have insanely fast development.

We want to get you running without locking you into a framework. So we built a simple CLI that bootstraps you in minutes. It even runs your server and builds out of the box.

Enjoy flexibility without needing all the glue. We're making hybrid apps, fast.

DocsModules

GithubTwitter

Copyright 2015 reapp.Icons from flaticon.com under CC 3.0nate@reapp.io

时间: 2025-01-19 08:22:10

Reapp 混合应用 - 帮助构建前所未所的强大应用(Reapp Hybrid apps - help you build powerful apps like never before)的相关文章

思变赢机遇科技创未来 —— 绝佳时机,前所未遇——思科解决方案全国巡展苏州站盛大揭幕

北京,2016年9月21日--以"思变赢机遇科技创未来"为主题的思科解决方案全国巡展苏州站在希尔顿逸林酒店盛大揭幕.活动中,思科向当地的企业客户和渠道合作伙伴展示了全新数据中心解决方案和技术创新方面的成果,让广大企业客户能够近距离感受全数字化转型如何推动行业变革.思科如何帮助企业客户通过业务转型成就商业成功.同时,思科深入介绍了在制造.零售.金融.医疗等行业的全球成功实践,与客户.合作伙伴.业界人士共同探讨如何把握前所未遇的全数字化转型绝佳时机,重新定义商业模式和企业价值.     网

黑莓平板电脑PlayBook前路未卜

[财新网](记者 陈璐)比iPad轻.比iPad快,比iPad安全--PlayBook就像是冲着iPad而来. 9月27日,全球第二大智能手机厂商RIM(Research In Motion Ltd)推出了首款平板电脑PlayBook. 单从目前RIM透露的参数,PlayBook几乎把iPad比在了脚下,但是悬而未决的价格,以及对应用开发者来说,全然陌生的操作系统却给PlayBook的前路画上了一个大大的问号. 剑指iPad 美国东部时间,9月27日下午4时,RIM公司在旧金山召开发布的新品发布

山河智能高管股权激励梦碎转型前路未卜

5月18日,山河智能(002097.SZ)完成对1000万股激励股票的回购注销,高管股权激励计划,因经营业绩不达标而成"镜花水月". 知情人士透露,股权激励落空,山河智能人心思动,部分当初冲着股权激励而来的高管或挂冠而去."副总经理刘升福去职后,也许还会有高管辞职."内部人士称. 祸不单行的是,山河智能董事长何清华的"左膀右臂".公司董事龚进因卷入同业"间谍"风波而被控制,即将开庭审理,可能面临数年刑罚. 山河智能2006年I

绝佳时机,前所未遇,拯救濒危物种

2007年,13头犀牛被非法猎杀: 2015年,纳米比亚有80头犀牛惨遭非法猎杀: 同年,津巴布韦至少有50头犀牛被非法猎杀,该数据是2014年的两倍: 仅 2015 年一年时间,就有1,175 头犀牛从地球上消失-- 在非洲大陆上,80% 的犀牛生活在南非,而其中很大一部分又栖息在著名的克鲁格国家公园内,如果按照平均 8 小时就会有一头犀牛消失的速度来看,到 2025 年犀牛就会从南非灭绝. 作为世界上最古老的物种之一,憨态可掬的犀牛因其珍贵的犄角饱受生命威胁,然而并没有任何研究表明,犀牛角可

华君系终止入主 *ST海润前路未卜

去年巨亏近12亿元,今年一季度资产负债率升至80%以上,对外担保总额超过72亿元,占到上市公司最近一期经审计净资产的190.08%,甚至因被出具"非标"意见再度戴帽,最终跌至一元股的行列,这是*ST海润所面临的现状. 迫在眉睫的还有其内部管理的问题.去年控制的"华君系"谋划以参与定增的方式入主ST海润,其实际控制人孟广宝在未有股权的情况下已经先行成为公司董事长兼总裁.但目前该方案终止,未来管理层如何变动,企业发展前路如何还未卜,不过一季度的业绩情况不太乐观,有消息称

GrouponCEO上市前访华未接受采访匆匆离场

本报讯 (记者 阳淼) 世界估值最高的团购网站Groupon CEO 安德鲁·梅森在公司上市前夕来到中国,在视察其合资公司高朋网后对管理层表示了肯定.一贯低调的高朋网高管亦公开回应了微博抽奖造假处理.与腾讯和Groupon的关系等外界关注的问题. 梅森未接受采访,匆匆离场 安德鲁·梅森于昨日上午在高朋位于北京东三环的公司总部与媒体见面.他表示,虽然与腾讯在高朋上的合作仅有两个半月,但"合作非常愉快".在发言之后,梅森未接受媒体采访即匆匆离开. 在梅森来华之前不久,高朋网刚刚爆发微博抽奖

绝佳时机,前所未遇,开创全新购物体验

随着移动互联的不断演进,电子商务正在以纷繁的商品.较低的价格.快捷的支付.灵活的时间等独特优势不断冲击着传统零售业的霸主地位.对此,虽然有许多零售商尝试通过建立更多渠道(全渠道)等方式来争取市场,但这些投资有时还会增加运营复杂性,造成成本浪费! 传统的线下零售商究竟该如何是好? 调查显示,在五年之内,消费者将要求在实体店内进行情景化和个人化的互动.从大件商品到精品小物,从服装到视频,从家庭到商场,任何时间,任何地点,全数字化和移动革命正在改变我们的购物体验,无法满足消费者需求的零售商必将落伍.加

绝佳时机,前所未遇,让艰巨作业全自动化

数字技术正在改变全球的企业,没有行业能够免受其影响.移动性.物联网.大数据分析和云计算都在推动全数字化转型.IMD-CBT 的预测显示,未来五年,任何行业的十大领导者中,都将有四位在全数字化革命中被替代. "全数字化业务转型" 意味着什么? 在人们的印象中,采矿业的卡车司机是一个"高危职业"!假想他们开着重达 200 吨的重型卡车,满载价值数百万美元的矿石,在布满炸药物和重型机械的道路上行驶,一旦出现故障,不仅公司财务受损,还有可能危及生命! 然而,在南半球澳大利亚

使用Hive工具构建数据库为你提供功能强大的解决方案

如果一家公司没有资源构建一个复杂的大数据分析平台,该怎么办?当业务智能 (BI).数据仓库和分析工具无法连接到 Apache Hadoop 系统,或者它们比需求更复杂时,又该怎样办?大多数企业都有一些拥有关系数据库管理系统 (RDBMSes) 和结构化查询语言 (SQL) 经验的员工.Apache Hive 允许这些数据库开发人员或者数据分析人员使用 Hadoop,无需了解 Java 编程语言或者 MapReduce.现在,您可以设计星型模型的数据仓库,或者常态化的数据库,而不需要挑战 MapR