Skip to content

Commit 4672798

Browse files
committed
More language changes for docs
1 parent 6627cc8 commit 4672798

45 files changed

Lines changed: 413 additions & 414 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

md/asset-processor.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# asset processor
22

3-
Checks, validate and/or modify asset contents. An [AssetProcessor]({{defdocs}}/assets/AssetProcessor.html) is usually provided as a separated dependency.
3+
Checks, validates and/or modifies asset contents. An [AssetProcessor]({{defdocs}}/assets/AssetProcessor.html) is usually provided as a separate dependency.
44

5-
## how to use it?
5+
## usage
66

7-
First thing to do is to add the dependency:
7+
Start by adding the dependency to your ```pom.xml```:
88

99
```xml
1010
<dependency>
@@ -14,9 +14,10 @@ First thing to do is to add the dependency:
1414
</dependency>
1515
```
1616

17-
Did you see the **provided** scope? We just need the processor for development, because assets are processed at runtime. In ```prod```, assets are processed at built-time via Maven/Gradle plugin, so we don't need this library/dependency. This also, helps to keep our dependencies and the jar size small.
17+
Notice the **provided** scope. The processor is only required for development, since the assets are processed at runtime in this case. In ```prod```, assets are processed at build-time via the Maven or Gradle plugins, so the dependency is not needed there. This also helps to keep the number of dependencies and the jar size smaller.
18+
19+
After the dependency is declared, all that's needed is to add the processor to the pipeline:
1820

19-
Now we have the dependency all we have to do is to add it to our pipeline:
2021

2122
```text
2223
assets {
@@ -28,7 +29,7 @@ assets {
2829

2930
## configuration
3031

31-
It is possible to configure or set options too:
32+
It's possible to configure or set options as well:
3233

3334
```text
3435
assets {
@@ -42,7 +43,7 @@ assets {
4243
}
4344
```
4445

45-
Previous example, set a ```foo``` property to ```bar```! Options can be set per environment too:
46+
The previous example sets the ```foo``` property to ```bar```. Options can be set per environment as well:
4647

4748
```text
4849
assets {
@@ -62,11 +63,11 @@ assets {
6263
}
6364
```
6465

65-
Here, in ```dev``` processor has two properties: ```foo:foo``` and ```bar:bar```, while in ```dist``` the processor only has ```foo:bar```
66+
In this example, the processor will have two properties in the ```dev``` environment: ```foo:foo``` and ```bar:bar```, while in ```dist``` the processor will only have ```foo:bar```
6667

6768
## binding
6869

69-
The ```my-processor``` will be resolved it to: ```org.jooby.assets.MyProcessor``` class. The processor name is converted to ```MyProcessor```, it converts the hyphenated name to upper camel and by default processors are defined in the ```org.jooby.assets``` package.
70+
The ```my-processor``` token will be resolved to the: ```org.jooby.assets.MyProcessor``` class. The processor name is converted to ```MyProcessor``` by converting the hyphenated name to upper camel case and by placing it in the ```org.jooby.assets``` package (a default for processors).
7071

7172
A custom binding is provided via the ```class``` property:
7273

@@ -86,9 +87,9 @@ assets {
8687

8788
Contributes new or dynamically generated content to a ```fileset```. Content generated by an aggregator might be processed by an {@link AssetProcessor}.
8889

89-
## how to use it?
90+
## usage
9091

91-
First thing to do is to add the dependency:
92+
Start by adding the dependency to your ```pom.xml```:
9293

9394
```xml
9495
<dependency>
@@ -99,9 +100,9 @@ First thing to do is to add the dependency:
99100

100101
```
101102

102-
Did you see the **provided** scope? We just need the aggregator for development, because assets are processed at runtime. In ```prod```, assets are processed at built-time via Maven/Gradle plugin, so we don't need it. This also, helps to keep our dependencies and the jar size small.
103+
Notice the **provided** scope. The aggregator is only required for development, since the assets are processed at runtime in this case. In ```prod```, assets are processed at build-time via the Maven or Gradle plugins, so the dependency is not needed there. This also helps to keep the number of dependencies and the jar size smaller.
103104

104-
Now we have the dependency all we have to do is to add the ```svg-sprites``` aggregator to a fileset:
105+
After the dependency is declared, all that's needed is to add the ```svg-sprites``` aggregator to a fileset:
105106

106107
```
107108
assets {
@@ -124,7 +125,7 @@ assets {
124125
}
125126
```
126127

127-
Here for example, the ```svg-sprites``` aggregator contributes the ```css/sprite.css``` file to the ```home``` fileset. The fileset then looks like:
128+
In this example, the ```svg-sprites``` aggregator contributes the ```css/sprite.css``` file to the ```home``` fileset. The fileset then looks like:
128129

129130
```
130131
assets {
@@ -138,7 +139,7 @@ assets {
138139
}
139140
```
140141

141-
It replaces the aggregator name with one or more files from [AssetAggregator.fileset]({{defdocs}}/assets/AssetAggregator.html#fileset--) method.
142+
It replaces the aggregator name with one or more files from the [AssetAggregator.fileset]({{defdocs}}/assets/AssetAggregator.html#fileset--) method.
142143

143144
# available processors
144145

md/assets-require.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Make sure you already setup the [assets module](https://github.com/jooby-project/jooby/tree/master/jooby-assets) in your project!
1+
Make sure you've already set up the [assets module](https://github.com/jooby-project/jooby/tree/master/jooby-assets) in your project!

md/async.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ The **worker thread** pool is provided by one of the supported web servers: {{ne
2424

2525
The web server can accept as many connections it can (as its on non blocking) while the worker thread might block.
2626

27-
The default worker thread pool is `20/100`. The optimal size depends on the **business** and **work load** your application is suppose to handle. We suggest you to start with the default setup and see how it goes, later you can reduce or increase the thread pool.
27+
The default worker thread pool is `20/100`. The optimal size depends on the **business** and **work load** your application is supposed to handle. It's recommended to start with the default setup and then tune the size of the thread pool if the need arises.
2828

29-
In {{jooby}} we favor simplicity over complexity that is why your **code** can block, still there are more advanced options that allow you to build async and reactive applications.
29+
{{jooby}} favors simplicity over complexity hence allowing your **code** to block. However, it also provides you with more advanced options that will allow you to build async and reactive applications.
3030

3131
## deferred
3232

@@ -97,7 +97,7 @@ MVC API:
9797

9898
The [AsyncMapper]({{defdocs}}/AsyncMapper.html) converts `java.util.concurrent.Callable` and `java.util.concurrent.CompletableFuture` objects to {{deferred}} objects.
9999

100-
Another important thing to notice is that the deferred run in the **caller thread** (i.e. worker thread), so by default there is **no context switch** involved while running a {{deferred}} result:
100+
Another important thing to notice is that the deferred will run in the **caller thread** (i.e. worker thread), so by default there is **no context switch** involved in obtaining a {{deferred}} result:
101101

102102
```java
103103
{
@@ -111,11 +111,11 @@ Another important thing to notice is that the deferred run in the **caller threa
111111
}
112112
```
113113

114-
You might see this as a bad thing at first, but it's actually a good decision, because:
114+
This might not seem optimal at first, but there are some benefits to this:
115115

116-
* It is super easy to setup a default executor (we will see how soon)
116+
* It makes it very easy to set up a default executor (this will be explained shortly)
117117

118-
* Provides better integration with async & reactive libraries. A `direct` executor avoid the need of switching to a new thread and then probably dispatch (again) to a different thread provided by a library.
118+
* It provides better integration with async & reactive libraries. A `direct` executor avoids the need of switching to a new thread and then probably dispatch (again) to a different thread provided by a library.
119119

120120
## executor
121121

@@ -220,7 +220,7 @@ The **"promise"** version of the {{deferred}} object is a key concept for integr
220220
221221
## advanced configuration
222222
223-
Suppose you want to build a truly async application and after a **deep analysis** of your business you realize your application need to:
223+
Suppose you want to build a truly async application and after a **deep analysis** of your business demands you realize your application needs to:
224224
225225
* Access a database
226226
* Call a remote service
@@ -235,7 +235,7 @@ server.threads.Min = ${runtime.processors}
235235
server.threads.Max = ${runtime.processors}
236236
```
237237

238-
With this change, you need to be careful and **don't run blocking code** on routes anymore. Otherwise performance will be affected.
238+
With this change, you need to be careful to **avoid any blocking code** on routes, otherwise performance will suffer.
239239

240240
Let's create a custom thread pool for each blocking access:
241241
@@ -247,11 +247,11 @@ Let's create a custom thread pool for each blocking access:
247247
}
248248
```
249249
250-
For `database` access, we use a `cached` executor that will grow without a limit but free and release threads that are idle after `60s`.
250+
For `database` access, we use a `cached` executor which will grow without a limit but free and release threads that are idle after `60s`.
251251
252-
For `remote` service, we use a `fixed` executor of `32` threads. The number here: `32` is just a random number for the purpose of the example.
252+
For `remote` service, we use a `fixed` executor of `32` threads. The number `32` is just a random number for the purpose of the example.
253253
254-
For `intensive` computation, we use a `single` thread executor. Computation is too expensive and we want **one and only one** running at any time.
254+
For `intensive` computations, we use a `single` thread executor. Computation is too expensive and we want **one and only one** running at any time.
255255
256256
```java
257257
{
@@ -277,7 +277,7 @@ For `intensive` computation, we use a `single` thread executor. Computation is t
277277
}
278278
```
279279
280-
Here is the same example with [rx java](https://github.com/ReactiveX/RxJava):
280+
Here's the same example with [rx java](https://github.com/ReactiveX/RxJava):
281281
282282
```java
283283
{
@@ -316,11 +316,11 @@ Here is the same example with [rx java](https://github.com/ReactiveX/RxJava):
316316
317317
The main differences are:
318318
319-
* we keep the default executor: `direct`. So we don't create a new thread and avoid context switching.
320-
* we use {{deferred}} object as `promise` and integrate with [rx java](https://github.com/ReactiveX/RxJava).
321-
* different thread pool semantic is done via [rx schedulers](http://reactivex.io/documentation/scheduler.html).
319+
* the default executor is kept `direct`. No new thread is created and context switching is avoided.
320+
* the {{deferred}} object is used as a `promise` and integrate with [rx java](https://github.com/ReactiveX/RxJava).
321+
* different thread pool semantics is achieved with the help of [rx schedulers](http://reactivex.io/documentation/scheduler.html).
322322
323-
This is just one more example to demonstrate the value of the {{deferred}} object, because we provide an [rxjava](/doc/rxjava) module which takes care of binding {{deferred}} object into `Observables`.
323+
This is just another example to demonstrate the value of the {{deferred}} object, since a [rxjava](/doc/rxjava) module is provided which takes care of binding the {{deferred}} object into `Observables`.
324324
325325
That sums up everything about the {{deferred}} object. It allows you to build async and reactive applications and at the same time: **keep it simple** (a Jooby design goal).
326326

md/available-modules.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
* [gson](https://github.com/jooby-project/jooby/tree/master/jooby-gson): JSON supports via Gson.
1010

1111
## template engines
12-
* [handlebars/mustache](https://github.com/jooby-project/jooby/tree/master/jooby-hbs): logic less and semantic Mustache templates.
12+
* [handlebars/mustache](https://github.com/jooby-project/jooby/tree/master/jooby-hbs): logic-less and semantic Mustache templates.
1313
* [freemarker](https://github.com/jooby-project/jooby/tree/master/jooby-ftl): render templates with FreeMarker.
1414

1515
## session
16-
* [redis](https://github.com/jooby-project/jooby/tree/master/jooby-jedis/#redis-session-store): HTTP session on {{redis}}.
17-
* [memcached](https://github.com/jooby-project/jooby/tree/master/jooby-spymemcached/#session-store): HTTP session on {{memcached}}.
18-
* [mongodb](https://github.com/jooby-project/jooby/tree/master/jooby-mongodb/#mongodb-session-store): HTTP session on {{mongodb}}.
19-
* [hazelcast](https://github.com/jooby-project/jooby/tree/master/jooby-hazelcast/#session-store): HTTP session on {{hazelcast}}.
20-
* [ehcache](https://github.com/jooby-project/jooby/tree/master/jooby-ehcache/#session-store): HTTP session on {{ehcache}}.
16+
* [redis](https://github.com/jooby-project/jooby/tree/master/jooby-jedis/#redis-session-store): HTTP session store for {{redis}}.
17+
* [memcached](https://github.com/jooby-project/jooby/tree/master/jooby-spymemcached/#session-store): HTTP session store for {{memcached}}.
18+
* [mongodb](https://github.com/jooby-project/jooby/tree/master/jooby-mongodb/#mongodb-session-store): HTTP session store for {{mongodb}}.
19+
* [hazelcast](https://github.com/jooby-project/jooby/tree/master/jooby-hazelcast/#session-store): HTTP session store for {{hazelcast}}.
20+
* [ehcache](https://github.com/jooby-project/jooby/tree/master/jooby-ehcache/#session-store): HTTP session store for {{ehcache}}.
2121

2222
## sql
2323
* [jdbc](https://github.com/jooby-project/jooby/tree/master/jooby-jdbc): high performance connection pool for jdbc via {{hikari}}.

md/capsule.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The ```capsule``` Maven profile is activated by the presence of the ```src/etc/c
2424

2525
## options
2626

27-
Integration provides some defaults, which are listed here:
27+
The integration provides the following defaults:
2828

2929
```xml
3030
<properties>

md/conf.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Jooby delegates configuration management to the [Config library](https://github.com/typesafehub/config).
44

5-
By defaults Jooby expects to find an ```application.conf``` file at the root of classpath. You can find the `.conf` file under the `conf` classpath directory.
5+
By default, Jooby expects to find an ```application.conf``` file at the root of the classpath. You can find the `.conf` file under the `conf` classpath directory.
66

77
## getting properties
88

@@ -63,11 +63,11 @@ You're free to inject the entire ```com.typesafe.config.Config``` object or `sub
6363

6464
## environment
6565

66-
Jooby internals and the module system rely on the ```application.env``` property. By defaults, this property is set to: ```dev```.
66+
Jooby internals and the module system rely on the ```application.env``` property. By default, this property is set to: ```dev```.
6767

6868
This special property is represented at runtime with the [Env]({{apidocs}}/org/jooby/Env.html) class.
6969

70-
For example: a module might decided to create a connection pool, cache, etc when ```application.env``` isn't set to `dev`.
70+
For example: a module might decided to create a connection pool, cache, etc. when ```application.env``` isn't set to `dev`.
7171

7272
The `application.env` property can be set as command line argument as well:
7373

md/cors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## cors
22

3-
Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources
3+
Cross-origin resource sharing ([CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS)) is a mechanism that allows restricted resources
44
(e.g. fonts, JavaScript, etc.) on a web page to be requested from another domain outside the domain from which the resource originated.
55

66
### usage
@@ -62,5 +62,5 @@ cors {
6262
}
6363
```
6464

65-
```CORS``` options are represented at runtime by [Cors]({{defdocs}}/handlers/Cors.html).
65+
```CORS``` options are represented at runtime by the [Cors]({{defdocs}}/handlers/Cors.html) handler.
6666

md/doc/caches/caches.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
# caches
22

3-
Find here access to various caches solutions including {{redis}}, {{memcached}}, etc..., but also pure Java solutions like {{hazelcast}} or {{ehcache}}.
3+
These modules provide access to various cache solutions including {{redis}}, {{memcached}}, etc., as well as to pure Java solutions like {{hazelcast}} and {{ehcache}}.
44

55
## redis
66

7-
[Jedis](/doc/jedis) provides access to a {{redis}} cache via {{jedis}} driver.
7+
[Jedis](/doc/jedis) provides access to a {{redis}} cache via the {{jedis}} driver.
88

99
## memcached
1010

11-
[Spymemcached](/doc/spymemcached) provides access to a {{memcached}} cache via {{spymemcached}} driver.
11+
[Spymemcached](/doc/spymemcached) provides access to a {{memcached}} cache via the {{spymemcached}} driver.
1212

1313
## caffeine
14-
[Caffeine](/doc/caffeine): [Caffeine](https://github.com/ben-manes/caffeine) caches.
14+
[Caffeine](/doc/caffeine): [Caffeine](https://github.com/ben-manes/caffeine) cache support.
1515

1616
## ehcache
17-
[Ehcache](/doc/ehcache): {{ehcache}} caches.
17+
[Ehcache](/doc/ehcache): {{ehcache}} support.
1818

1919
## guava
20-
[Guava](/doc/guava-cache): [Guava](https://github.com/google/guava) caches.
20+
[Guava](/doc/guava-cache): [Guava](https://github.com/google/guava) cache support.
2121

2222
## hazelcast
2323

24-
[Hazelcast](/doc/hazelcast): {{hazelcast}} caches.
24+
[Hazelcast](/doc/hazelcast): {{hazelcast}} cache support.

md/doc/datastore/datastore.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# data store
22

3-
Find access to various data store including relational, documented oriented, key/value, etc.
3+
These are modules providing access to various data stores, including relational, document oriented, key/value stores, etc.
44

55
# jdbc
66

@@ -32,7 +32,7 @@ The [querydsl-jpa](/doc/querydsl-jpa) provides unified Queries for JPA. [Queryds
3232

3333
## requery
3434

35-
[Requery](/doc/requery) a light but powerful object mapping and SQL generator for Java/Kotlin/Android with RxJava and Java 8 support. Easily map to or create databases, perform queries and updates from any platform that uses Java.
35+
[Requery](/doc/requery) is a light but powerful object mapping and SQL generator for Java/Kotlin/Android with RxJava and Java 8 support. Easily map to or create databases, perform queries and updates from any platform that uses Java.
3636

3737
## rxjdbc
3838

md/doc/hbs/hbs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# handlebars
22

3-
Logic less and semantic templates via {{handlebars}}.
3+
Logic-less and semantic templates via [Handlebars.java](https://github.com/jknack/handlebars.java).
44

55
## exports
66

@@ -33,7 +33,7 @@ public/index.html:
3333
{{model}}
3434
```
3535

36-
Templates are loaded from root of classpath: ```/``` and must end with: ```.html``` file extension.
36+
Templates are loaded from the root of the classpath: ```/``` and must end with: ```.html``` file extension.
3737

3838
## request locals
3939

@@ -94,7 +94,7 @@ Templates are loaded from the root of classpath and must end with ```.html```. Y
9494

9595
Cache is OFF when ```env=dev``` (useful for template reloading), otherwise is ON.
9696

97-
Cache is backed by [Guava](https://github.com/google/guava) and the default cache will expire after ```100``` entries.
97+
The cache is backed by [Guava](https://github.com/google/guava) and the default cache will expire after ```100``` entries.
9898

9999
If ```100``` entries is not enough or you need a more advanced cache setting, just set the
100100
```hbs.cache``` option:

0 commit comments

Comments
 (0)