rendering in context of web development

I don't quite understand the meaning of rendering in context of web development. When I read about browsers architecture,rendering is something about displaying fetched content from the internet. On the other hand, there are definitions of client and server rendering (with no browsers mentioned). For example in Backbone.View class we have render method that is responsible for connecting data with markup. Outside of web-development context, there is a Wiki definition:

Rendering is the process of generating an image from a model (or models in what collectively could be called a scene file), by means of computer programs. Also, the results of such a model can be called a rendering

How to properly understand this concept ? Thanks. asked May 13, 2013 at 9:38 Miroslav Trninic Miroslav Trninic 3,447 4 4 gold badges 29 29 silver badges 53 53 bronze badges

5 Answers 5

Rendering is the process of gathering data (if any) and load the associated templates (or just send the output directly). Then apply the gathered data to the associated templates. The final output is sent to the user.

This concept is quite the same for both client and server. In client, when using Backbone.View, the render method is more like a conventional method where you can put your rendering logic in it. You can call it draw , it is totally ok. The main concept of Backbone.View is that you get your data from somewhere (mostly from this.model ) and then load the associated templates (from the DOM using $('#template-id').html() or using the text plugin of requirejs to load templates using AJAX requests). After you have the data and template, you can use your own template engine and "make" the final output then append it to the DOM so that users can see it

The server will probably do the same thing, and then send back the final output so that the browser can "render" it. There are some minor differences, though. In client side, you load your templates through ajax requests or from the DOM, in server side, you will probably load your templates from hard drive. As for the data, in client side, you get your data by using ajax requests or the data is already embedded to the response by the server (by inline javascript objects). In server side, you will get your data from the database (or cache) or from some 3rd party services