Skip to content

Commit 71f6e11

Browse files
committed
Add adapter and serializer generation to ember tutorial
1 parent 186af76 commit 71f6e11

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

TUTORIALS.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,14 @@ Boom, automatic updates in the browser.
256256

257257
#### Connecting
258258

259-
EmberJS applications roughly follow the Web-MVC pattern. The applications have a rigid folder-structure, most content being in the app folder. Ember-cli uses generators to generate basic stubs of content. We create the books model, route and controller using ember-cli. Check the helpers for ember generate model, ember generate route and ember generate controller, or the following:
259+
EmberJS applications roughly follow the Web-MVC pattern. The applications have a rigid folder-structure, most content being in the app folder. Ember-cli uses generators to generate basic stubs of content. Since the APIs we're using follow the json-api specification, we can avoid writing custom adapter and serialiser code by simply generating default ones for our application to use if a specific one is not specified:
260+
261+
```sh
262+
edi ember generate adapter application
263+
edi ember generate serializer application
264+
```
265+
266+
We create the books model, route and controller using ember-cli. Check the helpers for ember generate model, ember generate route and ember generate controller, or the following:
260267

261268
```sh
262269
edi ember generate model book title:string isbn:string

0 commit comments

Comments
 (0)