Your Choice JavaScript News

Node News Wednesday, February 7

Node News TLDR / Table of Contents

Score: 1260
Tweeted At: Tue Feb 06 13:45:11 +0000 2018
Publish Date: 2018-01-29T17:07:09.090000+00:00
Author: Node.js Foundation

  • In other words, if developers want to improve the performance of their JavaScript, what sort of code should they write?In the past, performance advice was often presented as anti-patterns, for example “Don’t use for-each” or “Don’t use try-catch”.
  • For much of its life, Node.js embedded the V8 engine as the only option to run JavaScript code.
  • Fast-forward to 2018 — Node.js can now also be powered by the ChakraCore JavaScript engine and V8 has a new optimizing compiler Turbofan, both of which have a very different performance profile to Crankshaft.
  • The answer is straightforward: JavaScript developers should focus on writing idiomatic, readable and maintainable code and not focus on the compilers underneath.
  • Ideally, developers should not have to worry about any of those micro-optimizations, instead they should be able to write something much simpler like the following, and trust that the compiler will do the right thing for performance:We believe that instead of developers specializing their JavaScript code for the compilers, compiler…

Tags: JavaScript, developers, code, JavaScript virtual machines, performance

Score: 1242
Tweeted At: Wed Feb 07 15:58:29 +0000 2018
Publish Date: 2018-02-07T15:05:55+00:00
Author: Ferenc Hámori

  • We were also interested in the infrastructural aspect of running Node.js apps in production, so we asked our readers to share where they deploy their services, what are their preferred front-end technologies, what kind of databases they use and which flavor of JavaScript they prefer.
  • Here come the results of our mini-survey: – – According to our survey, Node.js is a great option for developers who like to get their apps into production as fast as possible.
  • To understand why developers love & use Node.js, let me just show you a sample of the responses we got: – – When we asked developers about what they actually build with Node, the answers gave a pretty clear picture.
  • The answers were pretty hard to synthesise into coherent subgroups, but I tried my best in categorizing them: – – Although these answers are hard to categorize, I think they still provide useful insights into the problems & minds of Node.js developers.
  • The results were not surprising, the hegemony of AWS is clear: – – It looks like that React leads the front-end framework war – when it comes to Node.js developers who need to pick one: – – In case you’d like to learn more about it, read 8 Tips to…

Tags: Node.js, preferred front-end technologies, developers, pretty clear picture, front-end framework war

Score: 930
Tweeted At: Wed Feb 07 02:45:02 +0000 2018
Publish Date: 2016-02-26T12:05:43+00:00
Author: Mikhail Mitra

  • While on the other hand Node.JS is a programming platform that allows you to write JavaScript on both the client side and the server side, mostly server-side code that is identical in syntax to browser JavaScript.
  • It’s much easier to stick with JavaScript for both sides of the client/server divide than it is to write something once in Java and again in JavaScript, which you would likely need to do if you decided to move business logic you wrote in Java for the server to the…
  • With Node.JS Build process simplified by using the same Language – – Complicated build tools like Ant and Maven have revolutionized Java programming.
  • There are plenty of libraries written in JavaScript and some of them are amazing, but the depth and quality of the Java code base is superior.
  • Java for Solid Engineering – – It’s a bit hard to quantify, but many of the complex packages for serious scientific work are written in Java because Java has strong mathematical foundations.

Tags: Java, Java code base, node.js, IO routines, Java enterprise stack

Score: 372
Tweeted At: Mon Feb 05 09:34:48 +0000 2018
Publish Date: 2018-02-05T09:01:01.096000+00:00
Author: David Barral

  • It provides an async validation function that follows the common Node.js callback style: taking a (err, value) = … function as the last argument.
  • Using callbacks is the preferred Node way to deal with async code, however I’d rather use promises and the new async/await syntax.To solve my problem I wrote a custom function that wraps the library and uses Promises.This version can be used in async functions with ease.After an extraction I got…
  • After some self-punishment I refactored and removed all my code.Node’s promisify is slightly different from my custom version: it has a way to deal with functions that do not follow the common Node.js callback style.
  • For example, there are functions that have separated success and callback errors: (arg, onSuccess, onError) = …. To handle this cases, Node provides a special symbol promisify.custom to set a factory in the source function.It’s possible to bake this into our custom version with little effort.Node also provides a complementary callbackify…
  • If you are using an older version you can backport this function with little effort.

Tags: preferred Node way, new async/await syntax, little effort, new promisify utility, complementary callbackify function

Score: 2254
Tweeted At: Tue Feb 06 05:40:01 +0000 2018
Publish Date:

    Tags: event loop, node.js, real-time communication, open source, Learn Node.js

    Score: 570
    Tweeted At: Tue Feb 06 04:24:06 +0000 2018
    Publish Date:

      Tags: latest development technology, Index – San, Francisco, developers, date

      Top Node Courses

      The Complete Node.js Developer Course (2nd Edition) (60,232 students enrolled)

      By Andrew Mead
      • Build, test, and launch Node apps
      • Create Express web servers and APIs
      • Store data with Mongoose and MongoDB
      • Use cutting-edge ES6/ES7 JavaScript
      • Deploy your Node apps to production
      • Create real-time web apps with SocketIO

      Learn more.

      Angular (Angular 2+) & NodeJS - The MEAN Stack Guide (26,806 students enrolled)

      By Maximilian Schwarzmüller
      • Build real Angular + NodeJS applications
      • Understand how Angular works and how it interacts with Backends
      • Connect any Angular Frontend with a NodeJS Backend
      • Use MongoDB with Mongoose to interact with Data on the Backend
      • Use ExpressJS as a NodeJS Framework
      • Provide a great user experience by using Optimistic Updating on the Frontend
      • Improve any Angular (+ NodeJS) application by adding Error Handling

      Learn more.