You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 19, 2018. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+15-11Lines changed: 15 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Hyperloop TodoMVC Tutorial
2
2
3
-
In this tutorial you will build the classic TodoMVC application using Hyperloop
3
+
In this tutorial you will build the classic [TodoMVC](http://todomvc.com) application using Hyperloop
4
4

5
5
6
6
The finished application will
@@ -15,7 +15,7 @@ You will write less than 100 lines of code, and the tutorial should take about 1
15
15
16
16
### Chapter 1: Setting Things Up
17
17
18
-
If you do not already have Ruby, Rails, and bundler setup on your development machine then the easiest way to get started doing full stack development with Hyperloop is to use [Cloud9](http://c9.io).
18
+
If you do not already have Git, Ruby, Rails, and bundler setup on your development machine then the easiest way to get started doing full stack development with Hyperloop is to use [Cloud9](http://c9.io).
19
19
20
20
Even if you are an experienced Rails developer there are some advantages to doing your first experiments on Cloud 9:
21
21
@@ -25,7 +25,7 @@ Even if you are an experienced Rails developer there are some advantages to doin
25
25
26
26
Once you are comfortable with Hyperloop, transitioning your app back to your normal development environment is as easy as doing a git pull of your saved repo.
27
27
28
-
**If you want to go ahead as setup hyperloop on your development machine follow these [instructions.](https://github.com/ruby-hyperloop/rails-clone-and-go)**
28
+
**If you want to go ahead and setup hyperloop on your development machine (not using Cloud9) follow these [instructions.](https://github.com/ruby-hyperloop/rails-clone-and-go)**
29
29
30
30
Continue for Cloud9 setup:
31
31
@@ -41,15 +41,13 @@ Make sure to Connect your Cloud9 account to your github account by going to sett
41
41
42
42
You will be invited to create your first workspace. Cloud9 gives you one private workspace and any number of public workspaces. We recommend you use the public option for your first experiments.
43
43
44
-
Put `git@github.com:ruby-hyperloop/rails-clone-and-go.git` into the field titled titled Clone from Git or Mercurial URL (optional).
44
+
Put "`git@github.com:ruby-hyperloop/rails-clone-and-go.git`" into the field titled **"Clone from Git or Mercurial URL"**.
45
45
46
-
Select the "Ruby on Rails" template type, and
46
+
Select the "Ruby on Rails" template type, and click the **[Create workspace]** button.
47
47
48
-
Create Your Workspace!
48
+
**Step 3: Choose Your Branch**
49
49
50
-
**Step 3: Choose Your Branch
51
-
52
-
The hyperloop clone and go repo has two branches: `master` and `thin`. If you are running on the default Cloud9 512MB workspace
50
+
The Hyperloop clone and go repo has two branches: `master` and `thin`. If you are running on the default Cloud9 512MB workspace
53
51
then you should switch the `thin` branch before proceeding. This will use a lot less resources (but will be using polling
54
52
instead of ActionCable) for push communications. To checkout the `thin` branch run
55
53
```bash
@@ -81,6 +79,14 @@ We are going to add our Todo Model, and discover that Hyperloop models are in fa
81
79
+ Changes to models on the server are synchronized with all participating browsers.
82
80
+ Data access is is protected by a robust *policy* mechanism.
83
81
82
+
>*What is Model? ActiveRecord models are Ruby classes that are backed by a database.
83
+
Rails automatically generates the necessary SQL code for you. So when you say `Todo.active` Rails generates the appropriate SQL
84
+
and turns the result of the query into appropriate Ruby data structures.*
85
+
86
+
87
+
>*Hyperloop Models are extensions of ActiveRecord models that synchronize the data between the client and server
88
+
automatically for you. So now when you say `Todo.active` it works the same whether you are executing on the server or the client.*
89
+
84
90
Okay lets see it in action:
85
91
86
92
1.**Add the Todo Model:**
@@ -881,8 +887,6 @@ Rails.application.routes.draw do
881
887
end
882
888
```
883
889
884
-
885
-
886
890
### General troubleshooting
887
891
888
892
1: Wait. On initial boot it can take several minutes to pre-compile all the system assets.
0 commit comments