Nodejs is an incredible tool that allows us to use javascriptJavaScript es un lenguaje de programaci贸n que funciona en el lado del cliente y con el que las webs pueden ser m谩s funcionales. Incorporaci贸n en c贸digo HTML El c贸digo JavaScript puede ser incrustado en las p谩ginas HTML, para que adquieran funcionalidad. Existen varias opciones. Puede estar entre las etiquetas <SCRIPT> y </SCRIPT>, puede estar contenido en un archivo externo, puede ser un par谩metro de las etiquetas HTML, y puede estar plus m谩s all谩 del browserUn navegador (adem谩s: browser) es una herramienta inform谩tica que te permite ver documentos y datos y navegar por la red. Los navegadores pueden mostrar distintos tipos de recursos de informaci贸n; principalmente documentos HTML, a pesar de todo, adem谩s son posibles otros tipos de archivos y contenido multimedia, como PDF, JPEG, MPEG, GIF o el lenguaje de meta marcado. A trav茅s el uso de complementos especiales y la configuraci贸n respectivo, los plus.
- What do you mean with that?
According to its official Nodejs website it is:
"It's a JavaScript runtime built with Chrome's V8 JavaScript engine."
Surely you ask yourself something like ... And what does this mean?
Well you see, in the past javascript wasn't even that great, not as open as it is now. Javascript in its conception was originally developed by Brendan eich for netScape and it was strictly linked to browsers.
It was not until 2009 after Google gave the world its Google Chrome browser it freed javascript from its web prison thanks to its V8 JavaScript engine.
- And what is the V8 engine? (sounds like an energy drink)
El motor es el softwareConcepto de Software驴Qu茅 es el Software y cu谩l es su funci贸n?Un Software es la parte l贸gica, o m谩s bien el soporte l贸gico, de cualquier sistema de tipo inform谩tico. Sea un PC, un tel茅fono tel茅fono celular o inclusive una tablet, es todo aquel programa que se ejecuta en 茅l gracias a la coordinaci贸n de la parte f铆sica, es decir, el hardware, para llevar adelante alguna tarea concretamente o un recopilatorio de plus what interpret JavaScript code y que a su vez, ejecuta un script acorde a las instrucciones dadas. Todos los browsersConcepto de Navegadores驴Qu茅 son los Navegadores?Los Navegadores son herramientas inform谩ticas que utilizamos para, normalmente, navegar por Internet y visitar cualquier p谩gina web, al mismo tiempo de para hacer otras tareas como ver documentos, observar v铆deos o reproducir contenido multimedia de cualquier tipo. Son un tipo de software sencillamente usual y bastante utilizado hoy en d铆a.Insistimos en que es algo que se utiliza con mucha frecuencia, puesto que moverse por Internet plus web tienen un JavaScript engine, Safari uses JavaScriptCore, FireFox uses Spidermonkey, Microsoft Edge uses Chakra and in this case Google Chrome with聽V8, which is also partly the engine of Nodejs.
Resource of Rainer hahnekamp
The launch of the V8 it marked a turning point in engine history. V8 it replaced the relatively slow JavaScript rendering of the browser.
La raz贸n detr谩s de esta mejora tan grande radica principalmente en la combinaci贸n de int茅rpreteLos int茅rpretes son programas que, a diferencia de un compilador, no leen todo el c贸digo primero como un todo, sino que leen cada l铆nea del programa fuente de forma separada y la ejecutan de forma directa en la plataforma sin traducir primero el c贸digo. Por ende, cada an谩lisis se produce durante la ejecuci贸n del programa. Java, por ejemplo, usa int茅rpretes. Antecedentes El valor de los int茅rpretes es que un programa plus and compilerUn compilador es un programa que traduce c贸digo fuente escrito en un lenguaje de alto nivel como Java, a un lenguaje legible por la m谩quina llamado c贸digo objeto, lenguaje de destino o inclusive lenguaje ensamblador. De este modo, un compilador podr铆a llamarse traductor, pero sus tareas son m谩s amplias porque, como parte de la compilaci贸n del programa, adem谩s informa de errores al leer el c贸digo. C贸mo funciona Un compilador siempre plus. Hoy en d铆a, los cuatro motores utilizan esta t茅cnica. El int茅rprete ejecuta el source codeEl c贸digo fuente es un programa de PC o p谩gina web que se convierte en un lenguaje que es le铆do por una m谩quina y se recoge en imagen y funci贸n. El c贸digo fuente es una parte importante del SEO porque determina la correcta ejecuci贸n de una p谩gina web. La optimizaci贸n del c贸digo fuente es por ende parte del SEO t茅cnico. C贸digo fuente para p谩ginas web Mientras que el c贸digo fuente plus casi de inmediato. El compilador traduce el c贸digo fuente en c贸digo m谩quina que el sistema del usuario ejecuta de manera directa.
You may wonder ...
- At the end of the day, does all this have to do with Nodejs?
Well the relationship is that one day Ryah Dahll, the creator of Nodejs, looking for a way to create web servers that consider the needs of the current web, that is, a huge number of users and all accessing in real time, he found the google v8 engine and made it work outside the browser, that is, in the operating system, and from this moment, it is born Nodejs. and which presents it in the JsConf, a conferenceConcepto de Conferencia驴Qu茅 es una Conferencia?Una conferencia es toda aquella reuni贸n, normalmente con un alto grado de participantes y de espectadores, en la que consiste en realizar un debate sobre determinados puntos, impulsar una marca o abordar un tema para desarrollarlo desde el conocimiento y con distintos perspectivas que enriquezcan el discurso. Es uno de los medios principales con los que las grandes firmas dan a conocer sus nuevas estrategias, plus de Javascript.
Nodejs is special because according to its official website:
"Uses a model of I / O directed to non-blocking events that makes it light and efficient, ideal for real-time applications with intense data exchange through distributed devices"
As you will see, it is not a simple concept, especially if you are starting, so I will start by detailing what Nodejs is:
Nodejs It is a javascript execution environment that is built with the google chrome v8 engine which is a non-blocking and event-oriented operations model.
well this doesn't help much either, but let me explain from this statement.
Nodejs is based on the V8 engine that Google created to interpret javascript in Chrome, Taking advantage of this engine聽Nodejs, compile the code JavaScript to native language, in addition to having a great execution speed, the simplicity of the interface that Nodejs nos provee es tan incre铆ble, que iniciar un serverLos servidores son ordenadores centrales y potentes dentro del campo de la tecnolog铆a de la informaci贸n que procesan y proporcionan software y archivos en una red. Desde el punto de vista de un cliente, varios ordenadores en una red pueden ponerse en contacto con el servidor central para conseguir la informaci贸n solicitada. En la arquitectura cliente-servidor, el servidor puede ser un software que proporciona un servicio y se ejecuta en plus nos lleva menos de 20 l铆neas de c贸digo, por ejemplo:
// The HTTP module is loaded var http = require ("http"); // Create the HTTP server, and define the listening // for requests on port 8000 http.createServer (function (request, response) {// The HTTP header is defined, with the HTTP status (OK: 200) and the content type response.writeHead (200, {'Content-Type': 'text / plain'}); // Respond, in the response body with the message "Hello World" response.end ('Hello World! n ');}). listen (8000); // The URL to access the server is written console.log ('Server in url http://127.0.0.1:8000/');
The particularity of Nodejs resides in a piece called EventLoop.
Veras Nodejs surge como respuesta a una problem谩tica con la programmingConcepto de Programaci贸n驴Qu茅 es la Programaci贸n?La Programaci贸n es el procedimiento al que se recurre para crear alg煤n tipo de aplicaci贸n o software, para materializar un concepto o proyecto que requiere de la utilizaci贸n de un lenguaje inform谩tico para poder llevarse a cabo. Es algo que est谩 absolutamente ligado a la figura del programador, y que cada vez est谩 cobrando m谩s relevancia dentro del mundo del marketing.Decimos que tanto esta figura plus secuencial tradicional. En lenguajes como Java, C++ o C#, que se basan en hilos de ejecuci贸n, hay un m谩ximo te贸rico que viene dado por la memoria que consume cada hilo de ejecuci贸n en la m谩quina en la que se despliega.
Nodejs instead it is single thread(or from single thread), this single execution thread is called EventLoop and its function is to execute Javascript code which is by nature.
Resource of Digital paradigm
Before the arrival of entry / exit operations(Input / Output) delegates their execution to subsystems specifically prepared to be processed in the background.
In this way the execution thread is not blocked (non-blocking), while the EventLoop points to the function that will be executed once that offline processing finishes (callback).
A simple way to understand what the EventLoop is to imagine that the system is like a restaurant, in which we have a single worker: a waiter. Our waiter is in charge of seating people at the table and taking their food order (asynchronous task)If the waiter had to prepare the food, we would be blocking him so that he could attend the next table.
Instead, the waiter sends the order to the kitchen (threadPool), in which one of the cooks prepares it. When the food is ready, he will call the waiter to take it to the table, our waiter will have written down the correspondence between the food and the table number to know the place where he has to deliver the food (callback).
I hope this introduction was enough to cause interest in learning more about Nodejs. For more information and examples of applications on this platform you can visit the official documentation of Nodejs.





