Day 1 — What is Declarative Ui?

Gürkan Fikret GÜNAK
4 min readOct 18, 2020

Hello friends,
Today, I would like to mention a small issue with you in order to understand the structure of design interfaces. Especially, they tried to understand a few topics, maybe even partially, with a few titles, and they tried to express them by making examples from their applications.But today, by focusing on the subject completely, for ourselves and for you. I will try to explain.

There is a small issue that I have to express at first, the texts, pictures, numbers in the interfaces within the applications can always show changes according to the situation and the dynamics within the application. It is also useful to use technological interfaces so that we can get a quick view by managing the internal parameters that are suitable for changes within the structure, rather than using the structures in the form of blocks that are ready for these changes in the background.

These, too, really benefit us a lot in an application development process.

In the visual you have seen above, we can see the variables of the working application in the method structure that you have built. The interfaces help us to take images on the screen by taking advantage of the changes of the method functions that you have written your application. It will help us get quick results in the matter. Some of the challenging processes of an application are that there are continuously variable parameters within the screen. As the density of these increases, the devices used in terms of performance use of the application will be subject to slowdown and delay in screen transitions. In order to avoid these, we will try to get results quickly by using the Declarative Ui structure, and we will see them very clearly in almost all new generation programming languages ​​and developer kits. It is also useful to get used to these slow processes and use them intensively.

Why Use Declarative Ui?

The best feature that you encounter in Flutter interface development kits is the use of the Declarative Ui principle. Let’s examine the example given below regarding this.

Simply put, identification and identification is a very important factor in interface design. The process of defining variables in interfaces in more than one background causes us to create an equivalent design in the process that is displaying in the interface. This allows us to write more code in use, making more definitions for interface design packages to process without displaying.

As in the visual example, when you want to print the b kit in the ViewB to the screen, the interface will have its own mandatory design style, so we view the resulting ViewC c3 added in the ViewB.

As we said, the process here is to display the variables quickly after the definitions are made in the interface.

On Flutter, this process should be performed under the name of StatefulWidget and 1 trigger function should be defined. This trigger function replaces the data in the mandatory reference, which will replace the data in the widget, and we display a new interface parameter change on the screen, and we perform setState ().
We can see the change in the RenderObjects architecture in the process interface, which we will see from the change here, with the trigger function automatically, without making a new definition again. This is one of the biggest effects RenderObjects has contributed to us, we can say that the design style structure is preserved and the hierarchical code order is also protected extra in the display of the variable in the application.

Summary

The decorative interface will always be a faster result in displaying the dynamic parameters that have a continuous change on the process screen.
In developer kits such as Flutter, we will get faster results in this process, allowing us to deliver our products to the end users in a short time as we want, and it will help us improve ourselves in this process.

#dart #flutter #google

--

--