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

Sails.js Introduction @ viennajs.org meetup

Avatar for Thomas Fritz Thomas Fritz
September 24, 2014

Sails.js Introduction @ viennajs.org meetup

Avatar for Thomas Fritz

Thomas Fritz

September 24, 2014

More Decks by Thomas Fritz

Other Decks in Technology

Transcript

  1. What is Sails.js • a web framework • a „not

    so much opinionated“ web framework • a lightweight web framework
  2. What is Sails.js • sits on top of express.js •

    composition of small core modules • feels like a „best of breed“ distribution of libraries
  3. Key Concepts • Front-end agnostic • Angular, React, Backbone, Ember,…

    • Convention over Configuration • MVC pattern • Loose Coupling (unix philosophy) • Pragmatic
  4. Key Concepts • Extensible • Generators • Adapters • Hooks

    • for overriding or injecting new low-level functionality in the Sails runtime
  5. What is Sails.js • „any“ database • Waterline ORM •

    official adapters • MySQL, MongoDB, PostgreSQL, Redis, local disk • others: REST API, JSDom, Twitter, IRC, Riak,…
  6. What is Sails.js • different adapters in one project supported

    • different adapter for each model • use the database which fits best
  7. What is Sails.js • Powerful associations • one-to-many, many-to-many •

    multiple named associations • associations between different database types • e.g. MySQL <—> MongoDB
  8. What is Sails.js • Blueprints aka Scaffolding • What can

    you do with it? REST • Auto-generate REST APIs
  9. What is Sails.js • Realtime / Websocket API • with

    no additional code • Sails translates incoming requests to any route / middleware automatically • + parameter normalization • + session
  10. What is Sails.js • Desclarative, reusable security policies • any

    standard express / connect middleware • works automatically with REST API and WebSockets
  11. What is Sails.js • Flexible asset pipeline • Sails ships

    with Grunt • Prefer Gulp. No Problem
  12. • CLI • REPL • Testing • Custom Responses •

    I18N • Logging • File Uploads • Custom Routes • Custom configurations
  13. • propose a talk • vote for talks • comment

    on talks • talk archive • vienna.js chat