📜 ⬆️ ⬇️

Web application logic and web development

There was a lot of extra time, I decided to single out 3 basic, in my opinion, logic of web applications.
  1. Type "slave and lord."
  2. Uniform type.
  3. Did not come up with a name type.

I will divide the logic according to a simple principle: the amount of client / server code, the distribution of the type and controller to the client and server.

Type of slave and lord.


All logic falls on the server, only a small part of the client.
The ratio of code: client - 5%, server - 95%.
VC distribution: almost everything on the server.
Examples:
Web 1.0 sites.
Sites on browsers without js.
FullAjax sites (for example, built on xAjax) in which the browser stupidly executes all the scripts that came from the server.


Uniform type.


Uniform distribution of logic.
The ratio of code: client - 40%, server - 60%.
VC distribution: the view is divided equally - the client can draw some elements sent by the server (sliders, pop-up windows, etc.), most of the controller on the server, the client is responsible for form validation.
Examples:
Typical web 2.0 sites with all sorts of widgets from Prototype, jQuery, MooTools, ExtJS, YUI ...
')
Did not come up with a name type.

most of it falls on the customer.
The ratio of code: client - 70%, server - 30%.
VC distribution: the whole view is on the client (the client draws itself on the basis of the data sent, which is much smaller than the code that the client draws), most of the controller is also on the client (all validation is on the client). The client can not work without javascript.
Examples:
GMail (main), well, all Google products.

As it seems to me, now web applications are moving from the uniform type to the type number 3, its advantages are obvious: low server load, dynamic on the client.
From not terrible cons, you can select the download of a large volume of scripts, but there is a way out, you already have it - you can download all the basic js frameworks to 1 server, as Google did, and download them once a day)

On the horizon, the 4th type submitted by Google is already visible, which is a modification of 3 types - all GoogleGears applications.

I believe that all sites will remain at stage 2 (type) due to the limited indexing capabilities of javascript-generated content, although Google seems to take this into account =)

Source: https://habr.com/ru/post/43635/


All Articles