Skip to content

Commit 9be1db9

Browse files
committed
Update active record
1 parent abbe91a commit 9be1db9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,12 +563,15 @@ This way we can use the constructor function and its static methods by:
563563
User.get({ userid: userid });
564564
```
565565

566-
The code above will immediately return an empty object and keep referene to it. Once the response have been successfully returned and praced, AngularJS will populate this object with the received data (see [proxy](#proxy)).
566+
The code above will immediately return an empty object and keep reference to it. Once the response have been successfully returned and parsed, AngularJS will populate this object with the received data (see [proxy](#proxy)).
567567

568568
You can find more details for `$resource` [The magic of $resource](http://blog.mgechev.com/2014/02/05/angularjs-resource-active-record-http/) and [AngularJS' documentation](https://docs.angularjs.org/api/ngResource/service/$resource).
569569

570-
`$resource` allows us to use Active Record like pattern of communication with RESTful services.
570+
Since Martin Fowler states that
571571

572+
> responsibility of the Active Record object is to take care of the communication with the databse in order to create...
573+
574+
`$resource` does not implements exactly the Active Record pattern, since it communicates with RESTful service instead of the database. Anyway, we can consider it as "Active Record like RESTful communication".
572575

573576
### Partials
574577

0 commit comments

Comments
 (0)