Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Copyediting for increased readability.

  • Loading branch information...
commit d21415e03d77dada1ba9837f6102916fccc47239 1 parent ea424f9
Sam Charrington authored

Showing 1 changed file with 29 additions and 29 deletions. Show diff stats Hide diff stats

  1. +29 29 guides/basics/getting-started.md
58 guides/basics/getting-started.md
Source Rendered
@@ -7,48 +7,49 @@ title: "Getting started"
7 7
8 8 ### What is Joosy?
9 9
10   -Here is the typical transport flow for the Rails web application:
  10 +Here is the typical transport flow for a Rails web application:
11 11
12 12 ![Typical](http://f.cl.ly/items/322w1b1j2y2X0C212O1U/typical.png)
13 13
14   -Joosy moves HTML rendering, event handling and everything that is connected to the views right to your browser. During preloading, Joosy gets all the templates from the server and uses Rails backend as a REST data provider. And your application looks like this:
  14 +Joosy moves HTML rendering, event handling and everything that is connected to the views right to your browser. During preloading, Joosy gets all the templates from the server and uses the Rails backend as a REST data provider. And your application looks like this:
15 15
16 16 ![Joosy](http://f.cl.ly/items/0k3f1W2p1H0B1j0r231Z/joosy.png)
17 17
18   -With Joosy your views are truly ready for a massive client-side logic. You get application state, defined structure, lot of conventions for typical day-to-day problems and even DOM rendering control points.
  18 +With Joosy your views are transformed into robust client-side logic. You get application state, defined structure, lots of conventions for typical day-to-day problems and even DOM rendering control points.
19 19
20 20 ### ZOMG! Another MVC Framework...
21 21
22   -Joosy is not an MVC framework. It addresses the same problems as Backbone or Ember.js but it's not based clearly on a popular MVC paradigm. Nor it is an MVVM. Joosy is an active view for your server-side framework (mainly the [Rails](http://rubyonrails.org/)). It was created to complement and cooperate with backend. Not to be an abstraction. Therefore you'll probably like it if you are:
  22 +Joosy is not an MVC framework. It addresses the same problems as Backbone or Ember.js, but it's not based on the popular MVC paradigm. Nor it is an MVVM. Joosy is an active view for your server-side framework (mainly [Rails](http://rubyonrails.org/)). It was created to complement and cooperate with the backend. Not to be an abstraction. Therefore, you'll probably like it if you:
23 23
24   -* Rails developer
  24 +* Are a Rails developer
25 25 * Use CoffeeScript heavily
26   -* Like HAML (not really required)
  26 +* Like HAML (though this one's not really required)
27 27
28   -The first point is required to feel Joosy the right way. It was greatly inspired by the approach Rails promotes. Unlike most of alternatives we don't stay away from a real-life troubles. Nor we expect the community to decide on it's own. We try to give some kind of convention for each of them. Just like in Rails you should concetrate on what you do. Not how you do it.
  28 +The first point is required to experience Joosy the right way. It was greatly inspired by the approach Rails promotes. Unlike most alternatives, we don't shy away from real-world challenges. Nor do we expect the community to decide on it's own. We try to be opinionated, and provide some kind of convention for each situation. Just like in Rails, Joosy allows you to concentrate on what you do, not how you do it.
29 29
30   -[CoffeeScript](http://rubyonrails.org/) is an alma-mater of Joosy. In theory you can use Joosy with a plain JS but you won't be happy. We use the Coffee meta posibilities heavily. Joosy is class-based and relies on CoffeeScript static methods prototype magic. Without having requirement to stay JS-compatible we created an interface that is as clear as possible.
  30 +[CoffeeScript](http://rubyonrails.org/) and Joosy are like peas and carrots. In theory you can use Joosy with plain JS, but you won't be happy. We use the Coffee meta possibilities heavily. Joosy is class-based and relies on CoffeeScript's static methods and prototype magic. By loosening the requirement to stay JS-compatible we were able to create as clear an interface as possible.
31 31
32   -We've added some spice to the Rails+Coffee combo. Applause, the [Sugar.js](http://sugarjs.com/). This incredible library extends the JS the way you are used to with an ActiveSupport. All the comfortable features are here: `[].first`, `'foo'.camelize`, `'fluffy'.pluralize` and many-many more. This sauce really make the Coffee feel just like Ruby.
  32 +We've added some sweet spice to the Rails+Coffee combo. Applause! [Sugar.js](http://sugarjs.com/) is an incredible library that extends JS in ways you are used to with ActiveSupport. All the comfortable features are here: `[].first`, `'foo'.camelize`, `'fluffy'.pluralize` and many, many more. The sweetness of Sugar really makes Coffee feel just like Ruby!
33 33
34   -And last but no the least: viva la [HAML](http://haml.info/)! Joosy uses templaters abstraction so in theory you can use anything you are used to. But if you ever tried HAML and fell in love like we did, Joosy is shipped with amazing HAML-Coffee template engine.
  34 +And last but not least, viva la [HAML](http://haml.info/)! Joosy uses template abstraction so in theory you can use anything you are used to. But if you tried HAML and fell in love with it like we did, Joosy ships with an amazing HAML-Coffee template engine.
35 35
36   -### Not am MVC? But...
  36 +### Not an MVC? But...
37 37
38   -The idea is simple. REST in not SQL. Application Server is not an RDBMS. You can't have real logic inside your models. Therefore you don't have models. Inside your browser you don't need to be linked to REST structure since your only goal is the interaction with user. That's why you don't need controllers. Joosy operates with View terms. It has pages, layouts and widgets. Each of them works with templates, resources (doh... models) and forms. That's pretty much it, the typical separation for the View part.
  38 +The idea is simple. REST is not SQL. An application server is not an RDBMS. You can't have real logic inside your models. Therefore you don't have models. Inside your browser you don't need to be linked to a REST structure since your only goal is the interaction with user. That's why you don't need controllers. Joosy operates with View terms. It has pages, layouts and widgets. Each of them works with templates, resources (doh... models) and forms. That's pretty much it, the typical separation for the View part.
39 39
40 40 ![Scheme](http://cl.ly/1M470v24220L2e080h1L/scheme.png)
41 41
42   -Inside Rails you pass your data to your templates through controller and then get it back from forms or AJAX-queries. That's exactly how Joosy works.
43   -The central entity is a `Page`. Each time URL changes new page gets loaded. Joosy loads the layout for the first page or if the requested page requires another layout. After the container is prepared, you request your Resources and render the templates using it. Remeber, your templates are HAML with inline Coffee support. They even have mature helpers support.
  42 +In Rails, you pass your data to your templates through a controller, and then get it back from forms or AJAX-queries. That's exactly how Joosy works.
44 43
45   -Finally it looks like this:
  44 +The central entity in Joosy is a `Page`. Each time the URL changes, a new page gets loaded. Joosy loads the layout for the first page, or if the requested page requires it, another layout. After the container is prepared, you request your `Resources` and render the templates using it. Remember, your templates are HAML with inline CoffeeScript support. They even have mature helpers support.
  45 +
  46 +The page rendering flow looks like this:
46 47
47 48 ![Initialization](http://f.cl.ly/items/1K2W1w2N1g1h2O2v3r0V/initialization.png)
48 49
49 50 Note that most of this stuff is happening asynchronously!
50 51
51   -And here's the Page and a Template at a glance:
  52 +Here's a sample Page and Template at a glance:
52 53
53 54 {% assign gist_file = 'Page Sample.coffee' %}
54 55 {% include gist.html %}
@@ -56,24 +57,24 @@ And here's the Page and a Template at a glance:
56 57 {% assign gist_file = 'Template Sample.haml' %}
57 58 {% include gist.html %}
58 59
59   -To send data back Joosy has a `Form`. It wraps your basic HTML form and turns it into AJAXified thing. It works without page reload and interacts with your code using events. It even has an event for the "upload progress". `Forms` are magically linked to `Resources` so you don't write your code twice. Wait, even more! You have the `formFor` helper. Just like in Rails.
  60 +To send data back, Joosy has a `Form`. It wraps your basic HTML form and turns it into an AJAXified thing. It works without page reload and interacts with your code using events. (It even has an event for "upload progress!") `Forms` are magically linked to `Resources`, so you don't need to write your code twice. And what's more, you even have a `formFor` helper, just like in Rails!
60 61
61 62 ### Okay, it's like Rails. Anything else?
62 63
63   -Unlike Rails server application it has the state. For example if you use the only `Layout` for every page it will never get reloaded. Unlike the data it holds. To ease the DOM updates Joosy has `dynamic rendering` feature. It allows you to bind your resource to a template to automatically update DOM whenever resource changes. No manual events handling and rerendering. You just call `@renderDynamic` for a partial and it always stays actual.
  64 +Unlike a Rails server application, a Joosy application has state. For example, if you only use one `Layout` for all of your pages, it will never get reloaded, even though the data it holds does. To simplify DOM updates, Joosy has a `dynamic rendering` feature. It allows you to bind your resource to a template to automatically update the DOM whenever the resource changes. No manual event handling and rerendering. You just call `@renderDynamic` for a partial and it always stays up-to-date.
64 65
65 66 {% assign gist_file = 'Partial Sample.haml' %}
66 67 {% include gist.html %}
67 68
68   -Besides that Joosy offers built-in Identity Map implementation. You don't have to care about `Resources` instances. Even if you reload your `Resource` from a new Page your dynamic rendering will work from your Layout. Or any other place.
  69 +Besides that, Joosy also offers a built-in [Identity Map](http://en.wikipedia.org/wiki/Identity_map_pattern) implementation. Now, you don't have to care about your `Resource` instances. Even if you reload your `Resource` from a new Page, your dynamic rendering will work from your Layout. Or any other place.
69 70
70   -And to ensure you won't have problems with really large applications, Joosy comes with a set of preloaders implementing set of strategies.
  71 +To ensure you won't have problems with really large applications, Joosy comes with a set of preloaders implementing a variety of preloading strategies.
71 72
72   -### Total highlights
  73 +### Feature Summary
73 74
74   -Just to make sure you get it right here's the full list of functionality highlights we have to offer:
  75 +Just to make sure you get it right, here's the full list of functionality highlights we have to offer:
75 76
76   -* Easy and familiar Application structure. You work with pages, layouts and forms.
  77 +* Easy and familiar application structure. You work with pages, layouts and forms.
77 78 * Built-in ActiveSupport analog
78 79 * Built-in HAML-Coffee templates
79 80 * Helpers
@@ -81,15 +82,14 @@ Just to make sure you get it right here's the full list of functionality highlig
81 82 * Easy and straightforward dynamic binding of data to a DOM
82 83 * Built-in preloaders
83 84 * Automatic Resources generation based on Rails REST routes
84   -* Out-of-box code generators
  85 +* Out-of-the-box code generators
85 86 * ActiveResource-like REST interface
86 87
87 88 ### So what is Joosy good for
88 89
89   -Joosy is intended to ease building of modern medium and large-sized browser-based applications using Rails as a backend. To minimize code base while providing more features and what's most important, giving you ready conventions for typical tasks.
90   -
91   -Compare Joosy to Backbone like Rails to Sinatra. While Rails engine is much more powerful, Sinatra still has a lot of cases to be used at. If all you need is to enable some RICHness on one of your pages, Joosy can handle that. But Backbone will do the trick with lesser dependencies. If you need to move complete web-resource to browser Joosy will do the task at its Best.
  90 +Joosy is intended to simplify building modern, medium to large-sized, browser-based applications using Rails as a backend. It aims to minimize code base while providing more of the most important features, while giving you ready conventions for typical tasks.
92 91
93   -Still unsure if Joosy fits your needs better then Backbone or Ember? Go check [the features comparison table](/guides/basics/joosy-vs-x.html).
  92 +Joosy is to Backbone as Rails is to Sinatra. While the Rails engine is much more powerful, Sinatra still has a lot of valid use cases. If all you need is to enable some RICHness on one of your pages, Joosy can handle that, but Backbone will do the trick with fewer dependencies. On the other hand, if you need to move a complete web resource to the browser, Joosy will do the task at its best.
  93 +Still unsure whether or not Joosy is a better fit for your needs than Backbone or Ember? Check out [the feature comparison table](/guides/basics/joosy-vs-x.html).
94 94
95   -So what are you waiting for? [Go look for some guides!](/)
  95 +So what are you waiting for? [Go check out the guides to get started!](/)

0 comments on commit d21415e

Please sign in to comment.
Something went wrong with that request. Please try again.