Lot of youth aspires to be a most sought after software developer and so goes on to learn the required programming skills to match to the current market and industrial needs. They have broadly two choices to make
- To Be A Front-End Developer
- To Be A Back-end Developer.
Remember we are the product of choices we make, So listen to your heart and choose right technology to build the right kind of product , for the right purpose .
Front-end development covers coding the UI interface, handling events and interacting with back-end server to pull the data on the front-end UI side. Front-end is where user engages with the app and perform activities
Developer who are seeking careers in front-end side mainly needs to master
- Java : For Android Front-end development/ desktop solution development
- C/C++ : For Android/IOS Front-end development
- C-sharp : Unity Game and Windows Mobile App development
- Objective C : For Iphone app development
- Swift : For iPhone app development
Back-end Development :
Back-end mainly deals with the technical stuff which is not visible to the end user. It mainly deals with server side scripting and data base interaction so that front-end apps can request for the required data to be populated in the front-end mobile /web/desktop app.
- This server-side application directly interacts with the database via an application programming interface (API), which pulls, saves, or changes data.
- The data are returned and converted into front-end code a user interacts with: filling out a form, creating a profile, shopping online, etc.
- In general, anything you see on a site is made possible by back-end code, which exists on, and is powered by, a server.
Today We will cover Node.js which is the most sought after backend scripting language in the current technology market and is becoming the preferred language options for back-end programmers.
Node.js Introduction :
Node.js connection handling mechanism is super efficient than our existing classical thread based model Thread-based networking is relatively inefficient and very difficult to use. Furthermore, users of Node are free from worries of dead-locking the process, since there are no locks. Almost no function in Node directly performs I/O, so the process never blocks. Because nothing blocks, scalable systems are very reasonable to develop in Node.
As per Wiki :
How It All Started : History of Node.js :
In June 2011, Microsoft and Joyent implemented a native Windows version of Node.js. The first Node.js build supporting Windows was released in July 2011.In January 2012, Dahl stepped aside, promoting coworker and npmcreator Isaac Schlueter to manage the project.In December 2014, Fedor Indutny started io.js, a fork of Node.js. Due to the internal conflict over Joyent’s governance, In February 2015, the intent to form a neutral Node.js Foundation was announced. By June 2015, the Node.js and io.js communities decided to work together under the Node.js Foundation.
Node.js Architecture :
Node.js comprises of two main component core & its modules. Core: it’s built in C & C++. It combines Google V8 JS engine with Node’s Libuv library and protocol bindings including sockets & Http.
1. V8 Engine : Run time Environment
- Compiler : dissects the JS code
- Optimizer : Optimizer called crankshaft create abstract syntax tree(AST) which further converts to SSA : static single assignment and gets optimized
- Garbage Collector : V8 divides the memory into 2 spaces Old spaces and new spaces both belongs to heap memory and keeps track of JS objects, any new objects is stored in new space. When new space is fully occupied V8’s garbage collector removes dead objects from new space and puts into old space. Gabage collector play vial role in keeping NodeJs lightweight.
2. Libuv : A C++ library
This library handles Node’s asynchronous I/O operation and main event loop. There are thread pool reserve in Libuv which handles the thread allocation to individual I/O operations.
3. Design Pattern :
Node utilizes object pool, facade and factory design pattern.
3.1 Object pool :
are a list of objects available for a specific task. Node relies heavily on Object Pool design pattern to which is a centrally memory management system.
3.2 Facade :
Facade provides interface to the body of the code like class library. In Node Libuv act as that facade around smaller libraries like Libev and Libio.
NPM : Node Package Manager
Node.js Highlights (Features) ?
But before that lets understand Node.js importance by this Infographics coined by Engine Yard :
Following are some of the prominent highlights that make Node.js the first choice of software developers specially backend.
1. It is asynchronous and event Driven −
All APIs of Node.js library are asynchronous, that is, non-blocking. It essentially means a Node.js based server never waits for an API to return data. The server moves to the next API after calling it and a notification mechanism of Events of Node.js helps the server to get a response from the previous API call.
2. Super Fast :
3. Single Threaded but Highly Scalable :
Node.js uses a single threaded model with event looping. Event mechanism helps the server to respond in a non-blocking way and makes the server highly scalable as opposed to traditional servers like Apache which create limited threads to handle requests.
4. No Buffering :
Node.js applications never buffer any data. These applications simply output the data in chunks.
Because of above specifications some of the biggies like eBay, Paypal, Godaddy, General electronic , Yahoo etc.. relies on Node for their server side programming needs.
Application of Node.js :
It is being employed in
- I/O bound Applications
- Data Streaming Applications
- Data Intensive Real-time Applications (DIRT)
- JSON APIs based Applications
- Single Page Applications
Let’s Create our First Application In Node.js :
We will try to build and run our first small code using node.js features to understand why it is the darling of the modern day programmer in our next article in the NodeJS series..
Also don’t forget to read one of my most loved article on Nodejs :
If you are 💚 💚 my contribution do 👏 👏 clap , Click Here and subscribe to reach out to me for more and i would feel blessed to hear and respond you back.