-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
363 lines (268 loc) · 12.7 KB
/
index.html
File metadata and controls
363 lines (268 loc) · 12.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Rev up your data-driven JS app development! RevJS is a suite of JavaScript modules designed to speed up development of data-driven applications. It allows you to easily define a relational data model with field types and validation, and automatically generate a GraphQL API and React user interface.">
<link rel="shortcut icon" href="./img/favicon.ico">
<title>Welcome to RevJS! - RevJS Guide</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="./css/theme.css" type="text/css" />
<link rel="stylesheet" href="./css/theme_extra.css" type="text/css" />
<link rel="stylesheet" href="./css/highlight.css">
<link href="./css/highlight.css" rel="stylesheet">
<link href="./css/style.css" rel="stylesheet">
<script>
// Current page data
var mkdocs_page_name = "Welcome to RevJS!";
var mkdocs_page_input_path = "index.md";
var mkdocs_page_url = "/";
</script>
<script src="./js/jquery-2.1.1.min.js"></script>
<script src="./js/modernizr-2.8.3.min.js"></script>
<script type="text/javascript" src="./js/highlight.pack.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-115939002-1', 'revjs.org');
ga('send', 'pageview');
</script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
<div class="wy-side-nav-search">
<a href="." class="icon icon-home"> RevJS Guide</a>
<div role="search">
<form id ="rtd-search-form" class="wy-form" action="./search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1 current">
<a class="current" href=".">Welcome to RevJS!</a>
<ul class="subnav">
<li class="toctree-l2"><a href="#revjs-rev-up-your-data-driven-js-app-development">RevJS - Rev up your data-driven JS app development!</a></li>
<ul>
<li><a class="toctree-l3" href="#what-is-revjs">What is RevJS?</a></li>
<li><a class="toctree-l3" href="#example">Example</a></li>
<li><a class="toctree-l3" href="#components">Components</a></li>
<li><a class="toctree-l3" href="#contributing">Contributing</a></li>
<li><a class="toctree-l3" href="#license">License</a></li>
</ul>
</ul>
</li>
<li class="toctree-l1">
<span class="caption-text">Working with Models</span>
<ul class="subnav">
<li class="">
<a class="" href="using_models/creating_models/">Defining Models</a>
</li>
<li class="">
<a class="" href="using_models/model_validation/">Adding Validation</a>
</li>
<li class="">
<a class="" href="using_models/revjs_backends/">Storage Backends</a>
</li>
<li class="">
<a class="" href="using_models/creating_data/">Creating Data</a>
</li>
<li class="">
<a class="" href="using_models/reading_data/">Reading Data</a>
</li>
<li class="">
<a class="" href="using_models/updating_data/">Updating Data</a>
</li>
<li class="">
<a class="" href="using_models/deleting_data/">Deleting Data</a>
</li>
<li class="">
<a class="" href="using_models/related_data/">Working with Related Models</a>
</li>
</ul>
</li>
<li class="toctree-l1">
<span class="caption-text">Creating a GraphQL API</span>
<ul class="subnav">
<li class="">
<a class="" href="creating_an_api/overview/">Creating an API</a>
</li>
</ul>
</li>
<li class="toctree-l1">
<span class="caption-text">Creating a User Interface</span>
<ul class="subnav">
<li class="">
<a class="" href="creating_a_ui/overview/">RevJS UI Overview</a>
</li>
<li class="">
<a class="" href="creating_a_ui/simple_list/">Simple ListView</a>
</li>
<li class="">
<a class="" href="creating_a_ui/custom_list/">Custom ListView</a>
</li>
<li class="">
<a class="" href="creating_a_ui/related_data/">Listing Related Model Data</a>
</li>
<li class="">
<a class="" href="creating_a_ui/searchable_list/">Searchable ListView</a>
</li>
<li class="">
<a class="" href="creating_a_ui/detail_view/">DetailViews</a>
</li>
</ul>
</li>
<li class="toctree-l1">
<span class="caption-text">RevJS Module Reference</span>
<ul class="subnav">
<li class="">
<a class="" href="components/rev-models/">rev-models</a>
</li>
<li class="">
<a class="" href="components/rev-api/">rev-api</a>
</li>
<li class="">
<a class="" href="components/rev-api-client/">rev-api-client</a>
</li>
<li class="">
<a class="" href="components/rev-ui/">rev-ui</a>
</li>
<li class="">
<a class="" href="changelog/">Change Log</a>
</li>
</ul>
</li>
</ul>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href=".">RevJS Guide</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href=".">Docs</a> »</li>
<li>Welcome to RevJS!</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/RevJS/revjs/edit/master/docs/mkdocs/src/index.md"
class="icon icon-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main">
<div class="section">
<h1 id="revjs-rev-up-your-data-driven-js-app-development">RevJS - Rev up your data-driven JS app development!<a class="headerlink" href="#revjs-rev-up-your-data-driven-js-app-development" title="Permanent link">¶</a></h1>
<h2 id="what-is-revjs">What is RevJS?<a class="headerlink" href="#what-is-revjs" title="Permanent link">¶</a></h2>
<p>RevJS is a suite of JavaScript modules designed to speed up development of
data-driven JS applications.</p>
<p>RevJS allows you to</p>
<ul>
<li>Define a relational <strong>data model</strong> using plain JS classes, and built-in or custom field types</li>
<li>Define custom <strong>validation logic</strong> directly in your models</li>
<li>Easily create a <strong>GraphQL API</strong> to make your models available over the network</li>
<li>Quickly build a <strong>user interface</strong> for the web or mobile, using our React higher-order components</li>
</ul>
<h2 id="example">Example<a class="headerlink" href="#example" title="Permanent link">¶</a></h2>
<p>The below example shows how to create a simple data model with RevJS's <code>rev-models</code> module:</p>
<pre><code class="ts">
import {
AutoNumberField, TextField, SelectField, IntegerField,
RelatedModel, ModelManager, InMemoryBackend
} from 'rev-models';
// Define models
export class City {
@AutoNumberField({ primaryKey: true })
id: number;
@TextField()
name: string;
constructor(data?: Partial<City>) {
Object.assign(this, data);
}
}
export class Customer {
@AutoNumberField({ primaryKey: true })
id: number;
@TextField()
first_name: string;
@TextField()
last_name: string;
@IntegerField()
age: number;
@SelectField({ selection: [['M', 'Male'], ['F', 'Female']] })
gender: string;
@RelatedModel({ model: 'City', required: false })
city: City;
constructor(data?: Partial<Customer>) {
Object.assign(this, data);
}
}
// Create ModelManager and register the models
export const modelManager = new ModelManager();
modelManager.registerBackend('default', new InMemoryBackend());
modelManager.register(City);
modelManager.register(Customer);
</code></pre>
<p>ResJS is designed for use with <strong>TypeScript</strong>, to give you all the
benefits of strong typing and intellisense, however it should work with
standard ES6+ too. (we're looking for someone interested in creating and
maintaining a revjs ES6+ guide!...)</p>
<h2 id="components">Components<a class="headerlink" href="#components" title="Permanent link">¶</a></h2>
<ul>
<li><strong><a href="components/rev-models/">rev-models</a></strong> - Define your Data Models and Validation,
and store and retrieve them from one of several <a href="using_models/revjs_backends/">backends</a>.</li>
<li><strong><a href="components/rev-api/">rev-api</a></strong> - Expose your data model via an automatically-generated GraphQL API</li>
<li><strong><a href="components/rev-api-client/">rev-api-client</a></strong> - Client-side wrapper for your API. Use your models
client-side in the same way you do on the server.</li>
<li><strong><a href="components/rev-ui/">rev-ui</a></strong> - Quickly build user interfaces with data from your RevJS backend using our
React higher-order components.</li>
</ul>
<h2 id="contributing">Contributing<a class="headerlink" href="#contributing" title="Permanent link">¶</a></h2>
<p>We are actively looking to build a team around RevJS. If you are interesting in
contributing, fork us on github or drop us a
<a href="mailto:russ@russellbriggs.co">mail</a>!</p>
<h2 id="license">License<a class="headerlink" href="#license" title="Permanent link">¶</a></h2>
<p>MIT</p>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="using_models/creating_models/" class="btn btn-neutral float-right" title="Defining Models">Next <span class="icon icon-circle-arrow-right"></span></a>
</div>
<hr/>
<div role="contentinfo">
<!-- Copyright etc -->
</div>
Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<div class="rst-versions" role="note" style="cursor: pointer">
<span class="rst-current-version" data-toggle="rst-current-version">
<a href="https://github.com/RevJS/revjs/" class="fa fa-github" style="float: left; color: #fcfcfc"> GitHub</a>
<span style="margin-left: 15px"><a href="using_models/creating_models/" style="color: #fcfcfc">Next »</a></span>
</span>
</div>
<script>var base_url = '.';</script>
<script src="./js/theme.js"></script>
<script src="./js/highlight.pack.js"></script>
<script src="./search/require.js"></script>
<script src="./search/search.js"></script>
</body>
</html>
<!--
MkDocs version : 0.17.3
Build Date UTC : 2018-06-21 02:49:47
-->