Loopback + Angular.js

A357616c0a9197fccbaf5aceb92d94f3?s=47 Yuren Ju
March 12, 2015

Loopback + Angular.js


Yuren Ju

March 12, 2015


  1. Loopback + Angular Yuren Ju DŽ

  2. 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
  3. None
  4. December A new project…

  5. Finding a backend for creating web APIs service

  6. None
  7. 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
  8. Easy to develop – e.g. Bifrost

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

    create() User find() ...
  10. Use CLI for… u Model u Relationship u ACLs

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

    u$ slc loopback:acl
  12. Let’s live demo! u Create an API service for multiple

    sites blog system u Models u User u Article u Comment
  13. DEMO…

  14. 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.
  15. Client sdk u Angulars.js u Android u iOS

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

  17. DŽ

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

  19. DŽ API does not consist between node.js and angular.js u

    Node u article.comments.create(<comment object>, callback); u Comment.create({articleId: article.id, …}, callback); u Angular.js u Article.comments.create({id: article.id}, <comment object>, successCb); u Article.comments.create({id: article.id}, <comment object>).$promise.then(cb);
  20. DŽ Model hook beforeUpdate() does not work https://github.com/strongloop/loopback-datasource-juggler/issues/159

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

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

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

  24. MS SQL data source does not map right type Number

    => Integer…
  25. Just like fog of war…

  26. But, if I can choose again…

  27. None