loopback presentation by tineco
TRANSCRIPT
![Page 1: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/1.jpg)
![Page 2: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/2.jpg)
https://twitter.com/stephaneguilly
https://www.linkedin.com/in/stephaneguilly
http://www.ido4pro.com
http://www.checkcarfleet.com
![Page 3: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/3.jpg)
DEVELOPER FOR MORE
THAN 30 YEARS
![Page 4: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/4.jpg)
![Page 5: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/5.jpg)
![Page 6: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/6.jpg)
![Page 7: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/7.jpg)
Web Application Framework for Tineco ?
![Page 8: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/8.jpg)
![Page 9: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/9.jpg)
![Page 10: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/10.jpg)
![Page 11: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/11.jpg)
![Page 12: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/12.jpg)
Most of the modules and the ‘core’ use MIT licence
![Page 13: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/13.jpg)
![Page 14: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/14.jpg)
![Page 15: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/15.jpg)
Additional professional services
![Page 16: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/16.jpg)
![Page 17: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/17.jpg)
DEMO
![Page 18: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/18.jpg)
POST{
“chipId” : “C0001”,“flashId” : “F0001”
}
{ “id” : “54787800001”}
![Page 19: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/19.jpg)
GET devices[{
“id”: “54787800001”“chipId” : “C0001”,“flashId” : “F0001”,“creationDate” : “2016-09-27T00:00:00.021Z”
}]
![Page 20: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/20.jpg)
LOOPBACK PROJECT
![Page 21: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/21.jpg)
$ npm install -g strongloop
$ slc loopback
![Page 22: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/22.jpg)
$ slc loopback:model
![Page 23: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/23.jpg)
only 2 files to describe a model
json file : describe your model
![Page 24: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/24.jpg)
![Page 25: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/25.jpg)
![Page 26: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/26.jpg)
![Page 27: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/27.jpg)
$ slc loopback:export-api-def --o swagger.yml reuse models in swagger tools
![Page 28: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/28.jpg)
DATASOURCE
![Page 29: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/29.jpg)
install a connector for your favorite database (loopback has a lot of connectors)
config it with the C.L.I
![Page 30: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/30.jpg)
![Page 31: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/31.jpg)
REMOTE METHOD
![Page 32: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/32.jpg)
remember only 2 files to describe a model
js file : add logic to your model
![Page 33: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/33.jpg)
“Not RE-INVENT THE WHELL” : CRUD logic is already add to your model
![Page 34: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/34.jpg)
Forget database syntax : use the simple filter JSON object syntax
![Page 35: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/35.jpg)
![Page 36: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/36.jpg)
![Page 37: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/37.jpg)
![Page 38: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/38.jpg)
![Page 39: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/39.jpg)
REMOTE HOOK
![Page 40: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/40.jpg)
![Page 41: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/41.jpg)
![Page 42: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/42.jpg)
![Page 43: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/43.jpg)
MIXIN
![Page 44: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/44.jpg)
Apply same logic for several models
![Page 45: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/45.jpg)
![Page 46: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/46.jpg)
![Page 47: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/47.jpg)
![Page 48: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/48.jpg)
BOOT
![Page 49: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/49.jpg)
Wait end of this script before run the next one with ‘cb’ parameter
![Page 50: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/50.jpg)
Run other scripts in parallel (no ‘cb’
![Page 51: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/51.jpg)
MIDDLEWARE
![Page 52: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/52.jpg)
![Page 53: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/53.jpg)
![Page 54: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/54.jpg)
ACL
![Page 55: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/55.jpg)
remember only 2 files to describe a model
![Page 56: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/56.jpg)
![Page 57: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/57.jpg)
![Page 58: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/58.jpg)
Create User and use User.login with username/email and password to obtain a token
![Page 59: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/59.jpg)
Use this token to pass ACL
![Page 60: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/60.jpg)
Paste token here
![Page 61: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/61.jpg)
Loopback is more powerful than just create
an simple API server !
![Page 62: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/62.jpg)
CLIENT SDK
![Page 63: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/63.jpg)
$ lb-ng ../server/server.js js/lb-services.js
![Page 64: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/64.jpg)
Add the lbServices module create by the previous step in your
angular app
Use all your model in your controller/service
just by adding their name
loopback angular client use ngResource. Don’t forget to install it !
![Page 65: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/65.jpg)
![Page 66: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/66.jpg)
![Page 67: Loopback presentation by tineco](https://reader031.vdocuments.mx/reader031/viewer/2022021923/5a6eda947f8b9a42298b592b/html5/thumbnails/67.jpg)
THANKS