views:

79

answers:

4

What is the difference between the term "UI that gets rendered on client side" and "..on server side "?

Any examples of technologies ?

  • UI Client Side = ?
  • UI Server Side = ?

not only web development sucks I guess that nothing ever gets rendered on the server side ?

A: 

I suppose that rendering in this meaning = process of creation some 'what should I display' data, not the actual conversion of 'what should I display' to raster image shown on display.

  • UI Client Side = windows forms, XPF, Delphi, Qt, GTK, ....
  • Server Side = HTML+CSS
Yossarian
but html get rendered in your browser??????
abmv
How does the server actually "render" HTML/CSS?
Anton Gogolev
The interface state gets rendered into HTML on the server. The HTML gets rendered into pixels on the client. 'Render' can be used at a number of different abstractions.
Joe
@Anton - HTML is rendered on the server by, for example, binding values to XML.
Joe
If we agree that the definition of "render" (http://en.wikipedia.org/wiki/Rendering_(computer_graphics) ) then the rendering process only occurs on the Client side.
jldupont
Sorry, I don't take wikipedia as a reliable source of definiton. Even if I did, the rendering should occur on server side too -> adding watermark to picture isn't rendering?
Yossarian
+3  A: 

I assume a web envorinment.

Client side

A page that uses javascript to create the final DOM, its client side rendering. GWT by example. AJAX in general.

If you use Flash you also use client-side rendering. The plugin is the one drawing all.

They both load some kind of logic at the client, retrieve data from server and then decide what concrete data to display (each name, number, date, etc) in the page. The code loaded into the client (the javascript, the flash) doesn't change from use to use.

Server side

Server side will be a JSP page (or any technology) to create a final HTML. Anyway the browser is the one who renders, but the decision "there are 5 clients so there are five rows one with each LastName" is taken at server side, not client side.

helios
Of course, all kind of RIA (rich internet apps) using more than HTML+CSS+Javascript should fall into the client side rendering category...
helios
+1  A: 

If you are talking about a web environment, then:

Server Side refers to any html that is generated on the server (e.g. within ASP.NET) and sent to the web browser. This is probably most of the web page.

Client side refers to anything that runs in the browser and changes the page's html from there. Generally, this means Javascript (with one or more Javascript library such as jQuery) manipulating the web page document (DOM) once it is already in the web browser.

As an example, in the world of "Ajax", this often means that the server renders the initial web page, but that javascript on the client then amends the web page in response to user input (probably having actually communicated with the server behind the scenes), without having to actually post the whole page back to the server to have it re-rendered.

Rob Levine
+1  A: 

I believe that for a client/server to be classed as 'rendering' something it must involve some form of calculation based on some input to produce output that is intended for viewing or printing. Beyond that we then have to look at how much work is being done, relatively speaking, in order to produce the output.

So, I would not class a server that pumps out pixel data via a network connection as having rendered anything unless it's done some work to get those pixels. E.g. a Web Server piping back a bitmap hasn't rendered anything. But a terminal server that is streaming back a live computer desktop has.

It's best to think of Application Examples and try to describe those in terms of client/server.

  • A Desktop App that reads a database and displays its data is rendering client-side.

  • A Desktop App that employs some form of parameterised XML template-based UI that is stored in a database and retrieved (and formatted) by a stored procedure could be argued to be client and server.

  • A Direct3d game that downloads vertex data from a server is client-side

  • However, if the vertex data is dynamic, and the server has to do some calculations to serve it up, then you could also argue client + server rendering is taking place.

  • Web pages are nearly always a mix of client + server, especially those based on Asp.Net, JSP or PHP for example; since the page output is dynamic and therefore the HTML has to be 'rendered' by the server before then being rendered by the client.

It's difficult to provide concrete answers for any sole technology.

Windows Forms, Direct3D, OpenGL, iPhone et al, Flash, Pure WPF, Silverlight and all the rest are all capable of being pure client-side UI, and a mix - depending on the application.

I suppose you could argue, however, that there is no such thing as a pure server-side UI (can't wait for a comment from someone who can point to one!)

Andras Zoltan
Watermarking images. Shouldn't be considered as server-side rendering?
Yossarian
Absolutely - if that watermark is being dynamically applied to a non-watermarked image.
Andras Zoltan