Web technology vs development speed and productivity

    Continuing the theme of the previous post , I will comment on the words tushev :
    And the interface in the old OS / 2 required orders of magnitude less CPU and memory resources.
    Yes, this is true - by orders of magnitude.

    I do not have a universal solution, and of course I understand that there is a reality given to us today in sensations (historical layers in the form of HTML and CSS of all versions, HTTP). And it’s very hard to change anything globally. But I want every developer to think about the absurdity of the current state of affairs in web technology. Otherwise, no one will ever have a radical solution. Therefore, I will give facts suggestive.

    An example of a 20-year-old UI, which I propose to first reproduce to all apologists for HTML and CSS in these languages, before minus the "karma":




    Twenty years ago, in the spring of 1992, IBM introduced the OS / 2 2.0 operating system. The standard built-in GpiBox function in its API, the call of which could be written in code in 5 seconds, was able to draw rectangles with the given radii of rounding of corners.

    Using the standard GpiSetModelTransformMatrix function, these rectangles could be subjected to affine transformations such as rotation, translation, stretching and tilting in any combination, and these transformations could be “cascaded” with each other by the operating system (so as not to load the head of the application programmer with geometry).

    In drawing, it was possible to control the thickness of the lines, the way they were connected, and the mode of drawing the ends, much like in the modern vector Corel package.

    The graphics in the OS were vectorial.Any drawn shape could be converted to a clipping path . The standard API supported arbitrary clipping. Not only by square or some ellipse - the border could be constructed even from Bezier curves in combination with the contours of the letters of the Adobe vector font!

    Clipping could contain holes (nested, intersecting, and self-intersecting shapes). You could combine many clipping regions by intersecting or combining them with each other.

    To facilitate writing controls through a standard function, it was possible to request a list of all figures that lie in a specified neighborhood of a given point.

    About 20 years ago, a Tseng Labs ET4000 graphics card with two megabytes of memory, somewhereminus the twelfth compared to modern generation graphics cards , it drew 925 rectangles with rounded corners per second . Or 243 rectangles per second, applying ellipse clipping to them with a star-shaped hole inside it . Here is the real test data:

    Test: Normal drawing without clipping.
       Speed: 9579.350 markers per second.
       Speed: 10841.799 lines per second.
       Speed: 924.878 round box (1/4 screen) per second.
       Speed: 508.562 filled box per second.
       Speed: 928.161 polylines with 32 vertex per second.
       Speed: 21.150 pattern-filled polygons with 32 vertex per second.
       Speed: 0.286 tricky winding polygons with 512 vertex per second.
       Speed: 55.076 filled and randomly declined ellipses per second.
       Speed: 14.684 randomly scaled bitmaps (320x200 pixels) per second.
       Speed: 17.191 nested polygons with 256 vertex per second.
    

    Test: Drawing with clipping by an ellipse with the star-shaped polygonal hole.
       Speed: 3808.684 markers per second.
       Speed: 1126.427 lines per second.
       Speed: 243.402 round box (1/4 screen) per second.
       Speed: 57.427 filled box per second.
       Speed: 71.152 polylines with 32 vertex per second.
       Speed: 26.752 pattern-filled polygons with 32 vertex per second.
       Speed: 0.250 tricky winding polygons with 512 vertex per second.
       Speed: 68.130 filled and randomly declined ellipses per second.
       Speed: 26.885 randomly scaled bitmaps (320x200 pixels) per second.
       Speed: 26.160 nested polygons with 256 vertex per second.
    

    And now, “welcome to the real world”: a

    highly qualified web programmer, if he is instructed to do this without ready-made toolkits and without tearing someone else’s code from them, it will take a couple of days to program the drawing of a square with rounded corners in the current browser versions, leaving IE 6 behind the brackets.

    He will have to use HTML, CSS, JavaScript for this, prepare auxiliary PNG files, and maybe even VML / SVG, if he needs to fully support the flexibility of setting parameters. At the same time, there can be no question of cutting off an ellipse with a star-shaped hole inside ... :)

    There can be no question of accurately and cross-browser determining whether the mouse cursor has fallen inside this square or remained outside its rounded corner ...

    At the same time, the modern solution will draw several tens of squares per second on the map plus the twelfth (compared to 1992) generation and the process of their curve drawing in pieces can be seen directly on the screen .

    Therefore, to the extent possible, IMHO should go from this technology stack to anything else altogether. Using fragmented and non-cross-browser HTML + CSS only maximum as a medium at the output stage. :)

    Also popular now: