I have had the chance to play around with flutter (and dart) during last holiday season & as a practice made a small app that did basic crud. I first heard about flutter & dart around two years ago. At first I was just amazed how easy it was to setup. A couple of commands & I had a native iOS app running on my machine however, soon I started to look for trouble.
Visual & Functional Unity
There has been a popular paradigm that basically says the code for visual representation of elements & functionality of the same elements shall be separate. That’s why we use CSS/HTML with JS to have a program running. I grew up under these sorts of assumptions & pretty soon after using flutter, it was clear it won’t be a tool I am going to use due to the lack of separation between these two aspects.
Luckily after a while I developed a sense for questioning my most valid assumptions & this matter of separation was no different. As far as I remember some of the reasoning for using two languages instead of one unified one were directed towards team. It was assumed that every project will be done by a team of persons who each focuses on one aspect. One person is a designer, another frontend developer & so on therefore, separating the visuals made it easy for each person to focus on their own part without going through the journey of understanding the whole stack.
I have had experience working with other individuals & alone throughout the years working on many projects. The mentioned assumptions about the separation of languages was never a valid one. I did not have the chance to work with a graphic designer who could understand HTM/CSS. Let’s assume I was even wrong about the mentioned assumption meaning, the reason for this separation goes beyond that & deals with something else totally. Let us look at CSS closely.
If CSS’s job is to deal with visuals only, why there are state management to some extent also is handled there? features like
:hover or animations & recently so much more things have been added that I have lost track. The boundaries were certainly crossed.
The other direction were already there meaning, visual manipulation through JS code. So if one crosses the other’s boundary why are they separate anyways?
Asking these questions eventually led me into acquiring a taste for flutter. The trouble I found initially was not with the framework but with my own thinking process that was based on the general rules followed by the community & the whole industry. Everything I mentioned here applies validly to other stacks such as Android & iOS development or in fact any other native development stack that I had come across. They all use some sort of XML like structure for the visual elements that is connected with the functional portion of the program.
I wanted to write some sort of a tutorial or a guide together with the app I created as a help for those who are eager to try flutter out but I realized soon after there are far better materials out there. If you also come from the same background as I do then I would encourage you to think about your assumptions.
Flutter did a brave thing by bringing new ideas out there. I am grateful to all the individuals who spent their precious time working on it to make it easy to use & increase productivity!