Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Why Loopback rocks?

Jeremy Lu
November 19, 2014

Why Loopback rocks?

This is the talk I gave on Nov. 19, 2014 at Taipei Javascript Enthusiasts (http://goo.gl/KSz7Ic), which covers the main benefits of using loopback for node.js-based API development.

Jeremy Lu

November 19, 2014
Tweet

More Decks by Jeremy Lu

Other Decks in Technology

Transcript

  1. Why Loopback Rocks?

  2. Jeremy Lu @thecat | jeremy@pubulous.com Founder and builder, Lovelyreader |

    Pubulous | Visualmarks | Docknote
  3. Developer
 10+ years hands-on experience" !

  4. Consulting" Social Media" Finance" Real Estate" Digital Publishing"

  5. Founder" Lovelyreader" Pubulous" Visualmarks" Docknote"

  6. ! FullstackRocks.com LATEST

  7. What is Loopback? - An open source project from StrongLoop"

    - Main contributor behind Node.js, Express and others" - A Node.js framework for creating APIs real quick" - With robust and well-thought out features built-in
  8. It’s good for? - API service and gateway" - Mobile

    backend and hybrid apps" - Web (sites and SPAs)" - Anything real-time
  9. What’s in the box? - A development framework" - A

    bunch of DevOP toolsets" - and a lot of wisdom packed in
  10. The Framework

  11. Create API endpoints quickly - Create schema in JSON and

    translate it to Model automagically" - Each model comes in with 10+ CRUD methods" - Methods become end points instantly
  12. {" "name": "user"," "base": "PersistedModel"," "trackChanges": true," "properties": {" "id":

    {" "id": true," "type": "string"" }," "title": "string"," "completed": {" "type": "boolean"," "default": false" }," "created": {" "type": "number""
  13. Highly customizable domain Models - before/after hook for implementing business

    logics" - Create new remote methods for end points easily
  14. ORM - Mongodb, MySql, Postgres, MSSQL, Oracle" ! - and

    a bunch of other DataSources" ! - Forked from JugglingDb" ! - Easy to use APIs and very efficient" ! - Highly customizable" " " " - Support all kinds of relationships: hasMany, belongsTo...
  15. Cloud Storages - Uploading files to S3" - Amazon, Openstack,

    Rackspace, Azure" - Just like a normal dataSource which provides create/read/update/delete commands"
  16. Built-in API Explorer - Test APIs on the fly" -

    Adjustable parameters" * http://goo.gl/nmj0u0
  17. None
  18. Authentication - Built-in User model provides register, login, logout, forgot

    password and reset" - Complete ACL rules setting
  19. Role-based access control - Who has right to access what?"

    - Support dynamic $role definition too
  20. oAuth2 - Using Passport" - facebook/google/twitter/github " - and 100+

    providers" * http://goo.gl/bmHMxO
  21. Sync - Stores data offline" - App continues to work

    offline" - Sync data when online" - Conflict resolution and 3-way merging" - Supports socket.io for real-time syncing" * http://goo.gl/plVBhr
  22. Studio API Composer - Editing models and datasources" - Generate

    models from db schemas" - Generate db schemas from models" * http://goo.gl/jODKSJ
  23. None
  24. Push Notification - Support iOS and Android" * http://goo.gl/9zRZZ6

  25. Web Socket - Coming feature" - Real time notification when

    model changes
  26. Native SDK for iOS/Android/Angular * http://goo.gl/OW2TBf

  27. Leverage Express - Continue to use all middlewares" - Reuse

    your existing skills" - Build hybrid website and API end points in one" - Could use Reactjs as server-side templating engine (via express)
  28. DevOP Tools

  29. In the box - Debugger" - Build/Package" - Deploy" -

    Logging" - Monitoring" - Clustering
  30. Debugger - slc debug" " - Using node-inspector

  31. None
  32. Build/Package - A standard way of packaging and building your

    apps" * http://goo.gl/5ghCIv
  33. Deploy - StrongLoop Process Manager (slc-pm)" - Works tightly with

    build/deploy tools" - Provides zero-downtime application updates" " " * http://goo.gl/aUeTp3" - Deployment best practices" * http://goo.gl/O1MDha
  34. Logging - Log to file, syslog, remote log, Splunk" -

    Using Winston or Bunyan" * http://goo.gl/aPlim9
  35. Clustering - Fully utilize all cores on the server" -

    View cluster status anytime" - Resizing clusters at runtime" * http://goo.gl/lF3ZKg
  36. Monitoring - Collecting metrics" - Diagnose memory leaks" - Profile

    CPU consumption" - With web UI" - On-premises or hosted" * http://goo.gl/7F3miH
  37. Other Benefits

  38. No Vendor Lock-in - Everything is open sourced" - Host

    on your own server
  39. Paid commerical support - When shit hits the fan, you

    know whom to ask help for" * http://goo.gl/ldeCDF
  40. Active response and community - google groups" * http://goo.gl/FEqhTL)" -

    github issues" * http://goo.gl/dXAUcM)
  41. The Bad

  42. - Still evolving very fast hence incomplete documentation and changing

    examples" - Took one month to get my ahead around it initially " - With professional guidance it shall take just 1 week to pick up
  43. When to use what?

  44. For quick and simple tasks - Koa and misc. middlewares"

    - You gotta know what you are doing when home brewing the whole stack though
  45. For Enterprise-grade API services and platform - Loopback" - Because

    it’s well thought out and got all ends covered
  46. For EC/Forum site - Express or Loopback" - Because it’s

    battle-tested
  47. Do not reinvent the wheels, especially flaky ones!

  48. Side Notes

  49. Learn from the best - Excellent coding skills for node.js

    development" - Lot of test cases" - Learn best practices for build/package/deploy/ cluster/monitor node.js apps
  50. Stand on the shoulders of giants and get yourself a

    head start!
  51. The Holy Grail - The holy grail of fullstack development"

    - React + Flux for front-end apps" - Node.js and Loopback for backends" - Isomorphic javascript FTW" - Highly efficiency, shorter time to market, robust quality
  52. Loopback is way more than just a framework to help

    you build the application, it also provides a rich set of tools to help you debug, build, package, deploy, cluster and monitor the app.
  53. In short, you are fully covered.

  54. Professional training on fullstack development at fullstackrocks.com

  55. jeremy@pubulous.com Questions?