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. 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
  2. It’s good for? - API service and gateway" - Mobile

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

    bunch of DevOP toolsets" - and a lot of wisdom packed in
  4. 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
  5. {" "name": "user"," "base": "PersistedModel"," "trackChanges": true," "properties": {" "id":

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

    logics" - Create new remote methods for end points easily
  7. 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...
  8. Cloud Storages - Uploading files to S3" - Amazon, Openstack,

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

    Adjustable parameters" * http://goo.gl/nmj0u0
  10. Role-based access control - Who has right to access what?"

    - Support dynamic $role definition too
  11. 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
  12. Studio API Composer - Editing models and datasources" - Generate

    models from db schemas" - Generate db schemas from models" * http://goo.gl/jODKSJ
  13. 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)
  14. In the box - Debugger" - Build/Package" - Deploy" -

    Logging" - Monitoring" - Clustering
  15. 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
  16. Logging - Log to file, syslog, remote log, Splunk" -

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

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

    CPU consumption" - With web UI" - On-premises or hosted" * http://goo.gl/7F3miH
  19. Paid commerical support - When shit hits the fan, you

    know whom to ask help for" * http://goo.gl/ldeCDF
  20. - 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
  21. For quick and simple tasks - Koa and misc. middlewares"

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

    it’s well thought out and got all ends covered
  23. 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
  24. 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
  25. 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.