Oops, NPM drops (floatdrops) packages and many things start to fail

2018-01-24_10-50-26.png

On Saturday, January 6, 2018, we incorrectly removed the user floatdrop and blocked the discovery and download of all 102 of their packages on the public npm Registry. Some of those packages were highly depended on, such as require-from-string, and removal disrupted many users’ installations.

You did what?  Well, the ‘readme.md’ file looked like spam.  So you just decided to block all 102 of their packages?  Did you consider what might happen?  Have you seen Jurrasic Park where Jeff Goldblum explains about the Butterfly effect?  You do know this was just a little bigger than a butterfly.

Via: The NPM blog

Node.js Best Practices – How to become a better Node.js developer in 2018

Image result for best practice images

It became a tradition for me in the past two years to write recommendations for the next year on how one can become a better Node.js developer. This year is no exception! 🤗

If you are interested in my past new years’ recommendations, you can read them on the RisingStack blog:

Start adopting some of the newer Node goodies like async-await rather than a promise or a callback.  Make security an important consideration.  Learn ECMAScript.  Pass along what you’ve learned ar Meetup’s.

Via: Node.js Best Practices – How to become a better Node.js developer in 2018

 

 

 

Using MongoDB on Node.js Application Using Mongoose — DZone Web Dev Zone

Image result for mongoose image

Introduction In this post, we are going to see how we can use MongoDB in our Node.js application with the help of the package Mongoose. We will also be covering some facts about MongoDB so that, as a reader, you will understand why we have chosen MongoDB as our backend. We will be going through some steps…

JavaScript, Node, MongoDB, Mongoose is a developer stack that is very popular.  If you can’t stand up or access a Mongo Server you can use NeDB which allows you to use a simple flat file for your JSON data.  One of NeDB’s advantages is that it uses most of the Mongo command structure.  You could develop using NeDB and when your ready move over to Mongo.  Some app’s are small enough that you can just leave them on NeDB.

via Using MongoDB on Node.js Application Using Mongoose — DZone Web Dev Zone

RisingStack Best of – The Most Popular Node.js Tutorials of 2017 — RisingStack Engineering – Node.js Tutorials & Resources

2017 was a remarkable year for Node.js, according to Mark Hinkle – Executive Director of the Node Foundation – and we couldn’t agree more. Node.js has an enviable position in the world of tech: There are more than 8.8 million Node instances online every day which number has grown significantly in the past year. The…

The article on using Node to set us a REST API service was my guiding light for my first API.  I learned that by using RESTify I could reduce the number of errors due to ignorance by letting RESTify spell out the rules and format.

The whole Async/Await part of JavaScript to allow async Node apps have some sync parts will become more prevalent in code in the next year.  I just got used to using promises now there is Await.

via RisingStack Best of – The Most Popular Node.js Tutorials of 2017 — RisingStack Engineering – Node.js Tutorials & Resources

I know how to Code, I can code in anything…. not

Every time I talk to a recent grad I hear a variation of the phrase, “I know how to code, I can code in anything.” This is, on the surface, true for some bits like boolean logic and loops. Where it starts to fail for me is when I need to leverage a language’s ecosystem.…

Same experience with me.  I know how to program in about 10 different languages. Some are lost languages like Etruscan and Cobol.  Recently I had to learn Ruby and I said how hard can that be?  It was hard.  One group of people we focused on JavaScript, Node and multiple JS libraries.  I said this is just a scripting language.  Yep, wrong again.  A few years ago I started using Arduino which used a C++ language.  I’ve programmed in C# they are almost the same.  Same like a bicycle is like a motorcycle.

I have learned to respect the learning curve on any new “Language”.  I appreciate the YouVideo and subscription to Udemy that I have.  It still takes time, more time than getting on a bicycle after 10 years.

I now know twelve languages and the last two took almost as much time as the first ten.

via I Know How to Code, I Can Code in Anything — DZone Web Dev Zone

Data Driven Documents (D3), API Server (Cdata) Generate REST Server 80+ Data Sources.

2017-08-22_8-45-24

2017-08-22_8-45-52

D3.js is a JavaScript library for producing dynamic, interactive data visualizations in Web browsers, using the widely implemented SVG, HTML5, and CSS standards. The CData API Server enables you to generate REST APIs for 80+ data sources, including both on-premises and cloud-based databases. This article walks through setting up the CData API Server to create a REST…

I have used D3 in concert with C3 to create a data visualization front end to a data warehouse.  D3 has a ton of features but is difficult to use out of the box for the novice user.  The C3 library puts a layer of smarts on top of D3 making it much easier to get started in graphic visualizations.  I’ve also used CData product to get an ODBC connection to Google sheets in order to analyze and transfer results from a Google form survey to a data warehouse.  CData products are very good just be willing to pay for that excellence.

This article is a good read because it combines the two to assemble a REST service and use it to provide the data feed to D3.

via Building Dynamic D3.js Web Apps With Database Data — DZone Web Dev Zone

Node.js Emerging as the Universal Development Framework for a Diversity of Applications — JSFeeds

node2.png

I would like to invite you to read a amazing and very interesting article about node.js, which I am quoting with a link to the target page: “… Last year and at the beginning of this year, we asked you, Node.js users, to help us understand where, how … more

Well, programmer kiddies as I have said before it’s Node.JS because it’s fracking everywhere.  When Microsoft’s Visual Studio has a special setup just for Node.JS and .net applications then it must be real.  😉

Seriously, take some time to learn the Node.JS basics.  There are 2-ton of YouTube videos and excellent Udemy classes.  You can learn the basics in 2 hours.

via Node.js Emerging as the Universal Development Framework for a Diversity of Applications — JSFeeds

HTTP request and Node, so many solutions, so little time.

Making HTTP requests is a core functionality for modern languages and one of the first things many developers learn when acclimating to new environments. When it comes to Node.js there are a fair amount of solutions to this problem both built into the … more

If you’re using Node to develop applications or servers you will need to handle HTTP requests.  The standard Node HTTP library is good but there are some options including promises, Super Agent and Ajax to name a few.  While it’s not rocket science this article comes from the experiences with NASA.

via HTTP Requests in Node.js — JSFeeds

API Gateways, the Rosetta Stone for data

Services in a microservices architecture share some common requirements regarding authentication and transportation when they need to be accessible by external clients. API Gateway s provide a shared layer to handle differences between service protocols and fulfills the requirements of specific clients like desktop browsers, mobile devices, and legacy systems. Click to see all chapters…

API Gateways are the middle man in the Application-Data relationship.  They serve as a community hall where folks go to meet and talk to one another.  This community hall has a universal translator like on Star Trek that makes data understood by all the people in the room.   Developers don’t worry about XML/JSON because the gateway understands them both.   DBA don’t worry about formatting the data because the gateway loves to format stuff.

Have you ever been fustrated with Sri, OK Google or Alexa?  Gateway quality varies from one vendor to another.  Write your own in Node may be an alternative, I don’t know.  Let’s talk.

via Building an API Gateway using Node.js — RisingStack Engineering

30 Second API mock servers using JSON-Server and Node, Quick and Dirty.

In the UK we have a chef called Jamie Oliver and over the years he has created lots of TV episodes and also a book on how to make a complete family meal in 30 Minutes – The premise of this, is that time doesn’t have to be an excuse not to make healthy food […]

There are times when you need a mock server for a REST API that returns JSON results and you need it now!!  This article goes over the process to create one on your local system which could be transferred to a server.    You create a JSON file, simple text file,  with the data in it and JSON-Server writes a full API service around it.  It can do all the CRUD you want and support queries.

There are a few restrictions like having a key field requirement in each table with the identical name.  (IE: _id) .  Most of my work requires using the key that was already in the database (ie: benficiaryID, providerNumber, DiagCode).  Moving this to a server will require some technical talent that many companies don’t have.

I have used Mockable IO to provide mock API services that are server based and need to be accessed by developers outside of a corporate firewall.  The free version is enough for most projects to get started.

No matter which mock server you use be prepared to take a considerable amount of time to mock up the results sets you expect the API service to provide.

 

 

 

 

 

via 30 Second APIs… — Danny Dainton