A lot of (QA) people are using JavaScript frameworks nowadays, but not everybody knows and understands how the Node.JS ecosystem works. During this talk I'll explain:
- How NodeJS works
- Why you should use NVM instead of a pure NodeJS installation
- The package versioning
- The remark about "there's a package for that"
- How the package-lock.json works
- And many more
12. @wswebcreation
Node.JS
It’s rising
• 1995 by Brendan Eich
• Created in 10 days
• Started as LiveScript
• 1996 ECMA standard
• 2005 Ajax was created
• 2006 jQuery
@wswebcreation
14. @wswebcreation
Node.JS - What is it?
Node is an open source cross
platform runtime environment for
JavaScript outside of a browser,
based on Chromes V8 engine.
21. @wswebcreation
Node.JS vs Java
•Do NOT use Node for CPU-intensive tasks
•Meant for data intensive and real time applications
•Asynchronous vs synchronous
27. @wswebcreation
Promises
A promise is an object which
can be returned synchronously
from an asynchronous
function. It will be in one
of 3 possible states:
•Pending
•Fulfilled
•Rejected
@wswebcreation
33. @wswebcreation
Releases
•Odd released in October
• Short lived
• Not production ready
•Even released in April
• Odd stop receiving updates
• Developed for 6 months (RC)
Source: https://developer.okta.com/blog/2019/12/04/whats-new-nodejs-2020
34. @wswebcreation
Releases
•Odd released in October
• Short lived
• Not production ready
•Even released in April
• Odd stop receiving updates
• Developed for 6 months (RC)
•LTS
• Production ready
• bug/security fixes
Source: https://developer.okta.com/blog/2019/12/04/whats-new-nodejs-2020
35. @wswebcreation
Releases
•Odd released in October
• Short lived
• Not production ready
•Even released in April
• Odd stop receiving updates
• Developed for 6 months (RC)
•LTS
• Production ready
• bug/security fixes
Source: https://developer.okta.com/blog/2019/12/04/whats-new-nodejs-2020
50. @wswebcreation
Package
A package is a project/
collection of 1 or multiple
{node_modules} which have a
specific task as described in
the {package.json}-file.
51. @wswebcreation
(Dis)Advantages
Advantages
•Share versioned code
with the OS-community
•Use locally and
globally
•Easy to download
standalone tools
Disadvantages
•There are already
1.000.000+ packages
•Projects can blow up in
local space size
•Versioning is not
properly used by every
maintainer
57. @wswebcreation
SemVer
Semantic Versioning (X.Y.Z)
• MAJOR(X): incompatible API changes
• MINOR(Y): add functionality in a
backwards compatible manner (^)
• PATCH(Z): backwards compatible bug
fixes (~)
@wswebcreationSource: http://www.wswebcreation.nl/share-your-it-mnemonic/
58. @wswebcreation
package-lock.json
•Automatically generated
when npm modifies the
{node_modules} tree, or
{package.json}
•Describes the exact tree,
including versions of the
latest working installation
•Optimizes the installation
process of the packages for
a new project
@wswebcreation