Skip to main content

Posts

Introduction to ReactJS

React is an open source front-end (JavaScript) library developed  and maintained by Facebook and Instagram for building fast and interactive user interfaces. Why ReactJS? In 2009 Facebook was using traditional data flow as the back-end. Therefore to get new updates the entire page had to be reloaded. In terms of initial data, real-time data and user data was flowing from different sources. Then the data was accordingly passed to the dispatcher, store and ultimately view. If there was any changes in the back-end in order  to reflect the changes on the view the entire  page had to be refreshed. This was not user-friendly. Drawbacks of traditional data flow. Uses DOM (Document Object Model). More memory consumption. Slow performance. With use of React the entire application is divided in to various components. When new data is added it will automatically update that component whose state has actually changed without reloading the entire pa...

Basic concepts on NodeJs

Usecases of NodeJS. Walmart and ebay. Node is not the best platform for CPU intensive heavy computational applications. But it is ideal for building fast and scalable network applications.  NodeJS is capable of handling a huge number of simultaneous connections with high throughput. For each connection NodeJS does not spawn new Thread causing max out of memory instead handle all in single thread using non-blocking I/O model. Using this architecture NodeJS has achieved over 1 Million concurrent connections. Bubbling errors up to NodeJS core event loop will cause crashing the entire program. Netflix and Uber. NodeJs is best for, I/O bound applications. Data streaming applications. Data intensive real-time applications. JSON APIs based applications. Single page applications. Modules in NodeJS. In order  a design to be reliable and maintainable should avoid defining variables and functions in the global scope. Instead we can use modular...

Introduction to NodeJS

NodeJS is know as a  highly scalable, data intensive and  a real time back-end service. NodeJS is an open source, cross platform runtime environment for server-side and networking applications. To build a back-end services there are other tools and framework such as rails, Django, asp.net etc.. Node is not a programming language not a framework. There are few characteristics that make Node more popular. Characteristics of NodeJS. Easy to get started. Can be used for prototyping and agile development. It is good to build super fast and highly scalable services.          Eg -: Paypal, Uber, Netflix, Walmart It use JavaScript. Source code will be cleaner and more consistence. Large Eco-system of open source library. Node is a runtime environment for executing JavaScript code. Runtime environment of NodeJs.  In JavaScript the application runs inside the browser . Browser has a JavaScript engine taht convert the code to ...

Callbacks,Promises,Async Await and Closure in JavaScript.

This weeks blog will be including about callbacks and issues of it,promises which was used to overcome the issues of callbacks and closure in JavaScript. Callbacks, promises and async await All theses ways are used to deal with asynchronous data. By default, JavaScript programs run using a single thread. Though there are ways to create new threads, JavaScript is considered as single threaded language. JavaScript does not wait for I/O operations to get completed, instead it continues the execution of the program. This is called as non-blocking I/O. So that JavaScript is an asynchronous programming language because of this NIO nature. Callbacks, Promises and Async Await. As an example when a request is made to a server it will take couple of seconds to response with the relevant data, therefore you do not want to stall your program till the data is returned. You must keep on going or doing something where callbacks come in. Extra facts. until es6 => callbacks were used es...

Classes and Objects in JavaScript.

The ways classes are created, how to manage class structure,inheritance hierarchy in java script will be covered in this blog. OOP concepts can be applied in java Script but it is a bit different than Java. Classes and Objects. How to create a class in JavaScript. Functions in JavaScript act as objects. We use functions to create classes. These functions are known as constructor functions. Difference between a normal function and a constructor function(conventions created by programmers) is that normal functions are written using camel notation and the first letter of the constructor functions(classes) starts with an uppercase letter and defined as a noun. Creating objects and classes. When creating an object; Objects are clone in JavaScript because class is an object unlike in Java. Creating JASON like objects using curly brackets.  Creation of JSON object. Console output. JSON objects not only have properties and methods it also may include embedde...

Introduction for Application Frameworks.

This blog includes the principles that must be followed when designing a software and the way of approaching and implementing the solution,before going in-depth of the designing languages. "An application is a software library that provides a fundamental structure to support the development of applications for a specific environment not only for graphical user interface development but also for areas like web based applications." S.O.L.I.D There are 5 object oriented Principles that should be followed when designing a software. This is know as S.O.L.I.D I - Single responsibilities. Designing a class that has only one responsibility O - Open-Close. The application must be closed for modification and open for extension. L - Liskov Substitution. Sub-classes derived from the parent class must be able to substitute the parent class. I - Interface segregation. Clients should not be forced to implement methods they do not use.These unknown metho...