Slide 1

Slide 1 text

Loopback + Angular Yuren Ju DŽ

Slide 2

Slide 2 text

Yuren u Mozilla (pervious) u Speed3D (now) u Open Source Community u COSCUP, Hacking Thursday, KaLUG u 割闌尾計畫, g0v u 60% front-end developer u 40% backend developer

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

December A new project…

Slide 5

Slide 5 text

Finding a backend for creating web APIs service

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

Loopback u Powerful Node.js framework for creating APIs and easily connecting to backend data sources. u Easy-to-use CLI wizard u Built-in API Explorer

Slide 8

Slide 8 text

Easy to develop – e.g. Bifrost

Slide 9

Slide 9 text

Loopback app architecture example Method Model App Loopback Project find() create() User find() ...

Slide 10

Slide 10 text

Use CLI for… u Model u Relationship u ACLs

Slide 11

Slide 11 text

Create stuffs by cli u$ slc loopback:model u$ slc loopback:relation u$ slc loopback:acl

Slide 12

Slide 12 text

Let’s live demo! u Create an API service for multiple sites blog system u Models u User u Article u Comment

Slide 13

Slide 13 text

DEMO…

Slide 14

Slide 14 text

Strongloop Arc u A graphical UI for the StrongLoop Platform that complements the slc command line tools for developing APIs quickly and getting them connected to data. Arc also includes tools for building, profiling and monitoring Node apps.

Slide 15

Slide 15 text

Client sdk u Angulars.js u Android u iOS

Slide 16

Slide 16 text

Generate Angular.js SDK $  lb-­‐ng  server/server.js clients/lb-­‐services.js $  lb-­‐ng-­‐doc clients/lb-­‐services.js

Slide 17

Slide 17 text

DŽ

Slide 18

Slide 18 text

DŽ lb-ng-doc Answer: Refresh page again

Slide 19

Slide 19 text

DŽ API does not consist between node.js and angular.js u Node u article.comments.create(, callback); u Comment.create({articleId: article.id, …}, callback); u Angular.js u Article.comments.create({id: article.id}, , successCb); u Article.comments.create({id: article.id}, ).$promise.then(cb);

Slide 20

Slide 20 text

DŽ Model hook beforeUpdate() does not work https://github.com/strongloop/loopback-datasource-juggler/issues/159

Slide 21

Slide 21 text

DŽ Model description is not generated by lb-ng-doc https://github.com/strongloop/loopback-sdk-angular/issues/132

Slide 22

Slide 22 text

DŽ Some APIs aren’t generated with “hasOne” relationship X

Slide 23

Slide 23 text

DŽ Remote method does not apply ACL rules http://docs.strongloop.com/display/public/LB/Defining+and+using+roles

Slide 24

Slide 24 text

MS SQL data source does not map right type Number => Integer…

Slide 25

Slide 25 text

Just like fog of war…

Slide 26

Slide 26 text

But, if I can choose again…

Slide 27

Slide 27 text

No content