Skip to main content

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 by React, but React uses it and provides it for free.

Virtual DOM makes React js as Web Developers choice for SPAs.

So, What's Virtual DOM? I'll explain in the next post.

Happy Programming!

Comments

Popular posts from this blog

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. :)

ASP.NET Dynamic Compilation

In ASP.NET Web Applications, When we request a page it must parse and compile the code of Web Application into one or more assemblies. When the code is compiled, it's translated into a language independent and CPU independent code, that's MSIL code. When we create an ASP.NET page, actually creating the source code for a .NET class. We are creating a new instance of the System.Web.UI.Page class.The entire contents of an ASP.NET page, including all script and HTML content, are compiled into a .NET class. When request an ASP.NET page, ASP.NET Framework checks for a .NET class that corresponds to that page. If a corresponding class does not exist, the Framework automatically compiles the page into a new class and stores the compiled class (the assembly) in the Temporary ASP.NET Files folder. The Temporary ASP.NET files folder located at : \WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files The next time anyone requests the same page in the future, the page is not co...