Skip to main content

Posts

Showing posts from June, 2017

Node.js for Everything

Lots of web applications using Javascript for front end for a long time. Javascript enabling people to build really really interactive great products, we can use Javascript on the front end and on the back end. So, what do we do on the back end? Node.js is the answer. Here we'll see some of the npm packages that'll help us to enable Javascript in back end as well. Load balancing is the main one when you plan to host your application server environment. Node offers pm2 package to easy your job. It's modern CLI process manager for Node apps with a builtin load-balancer. npm install pm2@latest -g pm2 start app.js Next thing is running applications continuously. Yeah, we've a node package named forever. It's a simple CLI tool for ensuring that a given node script runs continuously. npm install forever -g forever start app.js Enabling debugging in Javascript client applications are easy. Debugging a node application is sometimes a black box sometimes not, but one of the

Your connection is not private

Almost all web developers facing this issue without knowing the path of the problem. When we try to access the secure web sites, I mean https, Google Chrome browser says "Your connection is not private". What we do usually, just click ADVANCED link and Proceed to (unsafe).  At times, we will not see Proceed to (unsafe) link after clicking ADVANCED. We see the below screen instead which says "You cannot visit right now because the website uses HSTS. Network errors and attacks are usually temporary, so this page will probably work later."  If you see the above screen don't get upset. Type chrome://net-internals/#hsts in address bar and hit Enter. In Delete domain enter your domain name and do delete. You can verify you domain's status in Query domain. Once you done the specified steps then you can see Proceed to (unsafe) link.  Enjoy!

What are the HTTP methods supported by REST?

REST supports the following HTTP methods: GET: It requests a resource at the request URL. It should not contain a request body as it will be discarded. May be it can be cached locally or on the server. It can have request headers. POST: It submits information to the service for processing; it should typically return the modified or new resource. It can have both request body and request headers. PUT: At the request URL it update the resource. It can have both request body and request headers. DELETE: At the request URL it removes the resource. It can have both request body and request headers. OPTIONS: It indicates which techniques are supported. HEAD: It returns meta information about the request URL.

Is NPM INSTALL a valid command?

Yeah, It looks like a weird. Did you try anytime this command? NPM INSTALL is not a valid command. All the NPM commands should be in lower case. 

What's Virtual DOM?

There’s no big difference between the regular DOM and the virtual DOM. It’s better to think of the virtual DOM as React’s local and simplified copy of the HTML DOM. It allows React to do its computations within this abstract world and skip the real DOM operations, often slow and browser-specific. Real DOM operations are really really expensive. The Virtual DOM is an abstraction of the HTML DOM. It is lightweight and detached from the browser-specific implementation details.  One thing you should remember that the DOM itself was already an abstraction. So, Virtual DOM is an abstraction of an abstraction. :)

Why Web Developers interested in React Js?

The amount of JavaScript tools is steadily increasing, turning the selection of appropriate technology into a challenge. But why developers are most interested in React js among those libraries. Nowadays all the web applications are in SPAs. It means the DOM trees are huge nowadays, in turn we need to modify the DOM tree incessantly and a lot. This is a real performance and development pain. Consider a DOM made of thousands of divs. We have lots of methods that handle events - clicks, submits. What can do by the library like jQuery? jQuery will find every node interested on an event and update it if necessary It has two problems: It’s hard to manage and it’s inefficient. The solution to problem 1 is declarativeness. Instead of low-level techniques like traversing the DOM tree manually, you simple declare how a component should look like. But this doesn’t solve the performance issue. This is exactly where the Virtual DOM comes into action. First of all - the Virtual DOM was not invented

What is SPA?

Single-Page Applications (SPA) are Web apps that load a single HTML page and dynamically update that page as the user interacts with the app. SPAs use Javascript libraries and HTML5 to create fluid and responsive Web apps, without constant page reloads. However, this means much of the work happens on the client side, in JavaScript.