K
K
Kakeru2018-05-19 20:17:40
Programming
Kakeru, 2018-05-19 20:17:40

How is the visualization of the interface of desktop applications?

I don’t understand, programming is writing code, so how is the visual part of applications made? Is it the same as on the web?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mercury13, 2018-05-19
@kakeru

LEVEL 1. SOFTWARE DRAWING. In an extreme case, the programmer himself draws the controls, as on Canvas. Let's drop it. So, for example, they do in game development when there are few elements, and they must be extremely stylized. But even in this case it is better to make a library of objects.
Direct drawing was also often used in text mode, especially without a mouse, where there were always some nuances that prevented you from making your own library - for example, because it was better to present the program as one large menu, and not as a bunch of small items.
LEVEL 2. OBJECT LIBRARY. Often the OS and/or programming system has its own library of controls. In this case, it turns out something like.

program HomeMadeForm;

uses
  Vcl.Forms, Vcl.StdCtrls;

{$R *.res}

var
  fm : TForm;
  bt : TButton;

begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;

  fm := TForm.Create(nil);
  fm.Width := 400;
  fm.Height := 200;
  fm.Caption := 'Test';

  bt := TButton.Create(fm);
  bt.Parent := fm;
  bt.Caption := 'Go!';
  bt.Left := 150;
  bt.Top := 80;

  fm.ShowModal;
  fm.Free;
end.

LEVEL 3. VISUAL DRAWING. Finally, there are form drawing mechanisms: Qt Widgets, Qt Quick, VCL, WxWidgets, Windows Forms... In this case, the programmer simply draws the form, and does not think about construction-positioning mechanisms. I created a form, put a button on it, attached the OnClick event to the button - and now, when the button is pressed, the event is called.
There are also HTML-like mechanisms. For example, HTML elements are found in Apache Cordova, both flavors of Qt. They are used because it is convenient, but the HTML parsing mechanisms are quite complex and therefore not available everywhere.

A
Anton Shamanov, 2018-05-19
@SilenceOfWinter

Roughly speaking, yes, there are even related development environments like Apache Cordova:

Apache Cordova allows programmers to build mobile apps with CSS3, HTML5, and JavaScript, instead of using platform-specific APIs like Android, IOS, or Windows Phone. This is done by converting CSS, HTML, and JavaScript into code that any platform will recognize as a web element.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question