The Flutter
retrospective
As experienced German full stack developer (Java Enterprise and Java Script) I kind of hesitated to jump on the “hype train” with all that mobile
development for Google and Apple app store platforms, remember all those web
days with Angular , React, VueJS ? ;)
After watching my favorite senior freelancer Stefan Mishook and his thoughts on Flutter I decided to invest some time in developing my own freelancer services app.

(here is my app => https://play.google.com/store/apps/details?id=de.javaprofide.aorfreelancerservicesmobile)
As you can see from this comparison, Flutter is the most supported and hardware optimized platform. Flutter can generate mobile app for Android and iOS operating systems and its possible to have one codebase for Google Play store and Apple App store.
Lets look at Flutter architecture:
(image origin from Udemy instructor Maximilian Schwarzmüller)
It’s kind obvious that it's really fast, because the
engine was written in C++ language and C++ performance (when it’s done
correctly) is without a doubt have most efficiency in regard to app responsiveness.
So what you
need to start?
I won’t describe
the complete tutorial how to setup the dev environment but I can mentioned,
that you need a latest Flutter and Android Studio with Flutter plugin which both available for
free, just google it ;) (If you use Windows
7 you need to install power shell 5.1 or your dev environment won’t work
properly)
In which
language your write a typical Flutter App?
The standard for Flutter is language Dart , which
pretty familiar to Java or C#, but don’t think it’s the same because Dart has 'strong way' for functional programming, and I personally wasn’t prepared to program
my project in functional style. ;)
If Dart more
functional language how do you save state?
Well pretty easy ! ;)
class Form extends StatefulWidget
{//here you simple return the StateOfFormForXXX}
class StateOfFormForXXX extends State<Form>{
// here you
define all elements which need to hold the state
}
The class Form instance you put into another class
where all main ui elements are displayed.
But how do
you pass values from StatelessWidget?
That was tricky one I spent some time to figure it out
(StatelessWidget class can read the user input), what happening and it was
interesting that in one and the same class events writing in one and the same
variable can’t read the previous value, so StatelessWidget is really stateless in Dart language ;)
To make story short let’s think in form of following example suppose we have two classes one is Amunitionforrockets and Rocketlauncher
class Amunitionforrockets
extends StatelessWidget{
//some work of loading rockets into ammunition
//Here I do call for rocketlauncher when
ammunition is loaded
child: Rocketlauncher(rockets);
}
class Rocketlauncher
extends StatefulWidget{
//Pay attention here I pass the values to constructor
final Rockets rockets;
//Pay attention here I pass the values to constructor
final Rockets rockets;
Rocketlauncher(Rockets
loadedrocketsfromammunition)
: rockets = loadedrocketsfromammunition;
: rockets = loadedrocketsfromammunition;
@override
StateForRocketLauncher
createState(){
return StateForRocketLauncher(rockets);
}
So basically the Stateless Class receives values from
another class trough constructor and the Stateless Class do the same and pass
it to the Class which is Statefull. If you really need to manipulate the values
before it reach the expected class,
then you need to introduce and pass values again via constructor to this class
and so on.
Some people from functional world would say so what?
And say this is how it supposed to be.
And say this is how it supposed to be.
For me personally, with more OOP experience I say:
I don’t like to create unneeded classes for the state.
I prefer to have clean architecture where each class do only one function and that's it, but with such approach I need a stateless class for ui and statefull or state class for the state of the ui, in Java in my opinion it's more obvious and well thought, but each developer do own software design style most times software engineering decisions are influenced not by the own tech decision , but rather pushed from boss pressure, like for example : "We need to push the deadline!, We can deal with minor issues later!"
I prefer to have clean architecture where each class do only one function and that's it, but with such approach I need a stateless class for ui and statefull or state class for the state of the ui, in Java in my opinion it's more obvious and well thought, but each developer do own software design style most times software engineering decisions are influenced not by the own tech decision , but rather pushed from boss pressure, like for example : "We need to push the deadline!, We can deal with minor issues later!"
I think having too much classes, did bothered me a lot
during the development process in Flutter and i promise to myself to read the book
Flutter Clean Architecture: The next level of your effective Android\iOS coding with using Flutter! for my next Flutter project. ;)
The result of my work is great! ;)
Does flutter
have good documentation and community and plugins?
YES, YES, YES, the documentation is great , the community is welcoming Flutter new and shiny after all, plugins are amazing for example I used for video player, for displaying checkboxes and etc and did worked out of the box, most times third parties are BSD licensed plugin so its ok to use them in close source projects.
YES, YES, YES, the documentation is great , the community is welcoming Flutter new and shiny after all, plugins are amazing for example I used for video player, for displaying checkboxes and etc and did worked out of the box, most times third parties are BSD licensed plugin so its ok to use them in close source projects.
Does Flutter
have a future ?
Well if Google wont dropped it one day, then I can
imagine it would be a defacto standard for mobile development, Google should
invest more in testability of the Flutter, I did experienced some problems
writing tests for Flutter but with a lot of effort I was able to get around of
it.
Conclusion:
Writing native Android or iOS app’s will be from now on a special case and not the common thing.
I decided for my current and future clients, there no obvious reason to do a separate development for Android and iOS (maybe in case of writing mobile games were the performance must be a king).
The learning curve is not so steep as it
was during my experience learning Angular, I really enjoyed writing in Java
familiar syntax.
One last thought: does Flutter can kill the webapp development?
This is already happening other competitors like VueJS offer a NativeScript as “one killer” solution which allow you not only create webapp but actually to generate a mobile app.
Future in web apps and mobile apps development start to merge and there would be even more challenges to develop and test it properly and with that I conclude with following advice to my fellows developers : make sure that the whatever tool you use in your company can satisfy your current company requirements for solving the domain problems and make sure that you able to produce clean code with almost 100% test coverage, if one of this criteria are not met don’t use “new” tool for your current or future project , because adding new shiny stuff can cause real problems, there will be always a big danger of choosing wrong tool for the current job and managing tools and understanding the domain problems of your company is a mandatory for your as professional developer , because at the end of the day you wish that all works fine and nothing breaks even if you on holidays, your phone shouldn't ring and you should enjoy your vocation......
P.S My Flutter notes (references links to other useful resource which i used during the development process)
Thank you soo much for the valuable content. I really liked your content.Altamash Mapari
AntwortenLöschen