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

Introducing Sails v1

143a2600e408b5a2edbb00c3631ed5f5?s=47 Mike McNeil
February 23, 2017

Introducing Sails v1

Spanning Cloud Apps is generously supporting an evening in Austin, TX with Mike McNeil and Gabriel Schenker.

Mike will demonstrate the brand new release of the Sails framework and Waterline ORM, and show how to take advantage of some of the new features like strong data types and support for SQL transactions. He'll also discuss a few of the lessons and weird tricks he and the rest of the team learned along the way, including:

• the secret power of assertions (make your Node.js packages more stable, and faster to debug)
• the quickest way to run real-world benchmarks on your app or module (see how it performs at scale)
• three "low-hanging fruit" performance gotchas (avoid pitfalls and take advantage of V8 optimizations)

Gabriel is going to demonstrate how to containerize an existing Node JS application and deploy it to a Docker Swarm. He is also going to show how to setup the environment to reduce friction in the development process and how to make an application secure using secrets.

About Mike:

Mike is the creator of Sails.js, one of the most popular open-source frameworks for Node.js. He is also the CEO of its primary corporate sponsor, The Sails Company (YC W15). Mike's passion is to improve the day to day of software development, and to make it more accessible to people of all experience levels and backgrounds.

Mike has his roots in helping organizations design and implement custom web & mobile experiences, with an emphasis on realtime technology. Since 2012, he and the rest of the Sails core team (http://sailsjs.com/studio) have developed digital products and scalable APIs for startups, SMBs, and the Fortune 500. Earlier this year (2017), they launched Sails Flagship, a new platform on top of Sails which provides a suite of additional services, production-quality tools, and support for enterprise use cases.

About Gabriel:

Gabriel N. Schenker started his career as a physicist. Following his passion and interest in stars and the universe he chose to write his Ph.D. thesis in astrophysics. Soon after this he dedicated all his time to his second passion, writing and architecting software. Gabriel has since been working for over 25 years as a consultant, software architect, trainer. He has been nominated a Docker Captain and since January of this year he is working as Principal Curriculum Developer at Docker Inc (http://docker.com). Gabriel is working from home in Austin, Texas. Gabriel is passionate about software development and tries to make the life of developers easier by providing guidelines and frameworks to reduce friction in the software development process. During his spare time Gabriel likes hiking in the mountains, cooking and reading.

143a2600e408b5a2edbb00c3631ed5f5?s=128

Mike McNeil

February 23, 2017
Tweet

Transcript

  1. Austin Node.js Meetup February 2017 @mikermcneil v1.0 Introducing

  2. Mike McNeil CEO, The Sails Company @mikermcneil creator of

  3. the leading open-source MVC framework for Node.js

  4. None
  5. What we’ve been up to (2016-2017)

  6. None
  7. The Company

  8. The Company The (us) (customer) (Javascript app)

  9. by The Company

  10. waterline v1.0 v0.13 The Company

  11. A. What’s in Sails v1? B. Weird tricks

  12. v1.0 What’s in Sails v1?

  13. v1.0 What’s in Sails v1? waterline v0.13

  14. v1.0 performance and stability

  15. v1.0 Comprehensive security strategy (NS/Snyk)

  16. v1.0 Machine specification waterline v0.13

  17. v1.0 SQL transactions

  18. v1.0

  19. v1.0 Strong data types

  20. v1.0

  21. Type-dependent base values: • empty string
 • zero
 • false


    • null (why?)
  22. v1.0 Enterprise support and full-service studio

  23. v1.0

  24. v1.0

  25. v1.0 Federated hooks

  26. v1.0

  27. What’s in Sails v1? v1.0 SQL transactions Federated hooks Standalone/nested

    actions Dynamic database connections Revamped Redis adapter More flexible blueprints Projections (select / omit) actions2 Better query performance XSS-safe data bootstrapping (exposeLocalsToBrowser) Richer plugin interface TypeScript Staging environment More flexible views Strong data types ES6 / ES7 Command-line scripts Formal “helpers” API
  28. What’s in Sails v1? v1.0 Better warnings & error messages

    Express 4 Enterprise support Upgraded dependencies Comprehensive security strategy (NS/Snyk) Low-level database access via standardized driver interface Compiled statements Knex integration Updated CORS implementation Exponentially more tests Better support for Windows developers Improved programmatic usage Improved auto-migrations Bolstered module ecosystem Architectural documentation Optimized sessions Official benchmarks Query sanitization
  29. A. What’s in Sails v1? B. Weird tricks

  30. weird tricks (1 of 3) the secret power of assertions

  31. weird tricks (1 of 3) assert(orm, ‘orm is required’); assert(_.isString(identity)

    && identity !== ‘’);
  32. weird tricks (2 of 3) performing benchmarks

  33. weird tricks (2 of 3) demo (parley :: npm run

    benchmarks) https://github.com/mikermcneil/parley
  34. weird tricks (3 of 3) performance “gotchas”

  35. weird tricks (3 of 3) performance “gotchas” i.e. a few

    things that actually like, matter (at least they did for us)
  36. weird tricks (3 of 3) var err = new Error(‘hi’);

    err.stack;
  37. weird tricks (3 of 3) Object.defineProperty(foo, ‘bar’, { value: ‘baz’

    });
  38. weird tricks (3 of 3) util.inspect(foo, {depth: null}) util.inspect(foo);

  39. Questions? @mikermcneil sailsjs.com