📜 ⬆️ ⬇️

How we “trained the fire monkey” or our experience with FMX



Good day, dear Habraspolzovateli!

We are the Sphere Systems company, and today we open a corporate blog on Habré in which we want to introduce you to our project “Sphere Live”. And, although our project is still in beta testing, we can already say with confidence that it took place.
')
We plan to share our experience of creating a startup, to talk about both successful solutions and mistakes. And, of course, we would like to get a response. We do not pretend to have a “success story”, at least for now, however, we sincerely hope that our development experience will be interesting to our readers, and their feedback will be useful for us.

The first publication is devoted to the development tool we have chosen. Perhaps, our choice will seem to many, to put it mildly, not obvious. However, the fact remains that we have a really working product. But first, a few words about our product, at least so that in general everyone could understand what is being said.

The “Sphere Live” project is a multiplatform videoconferencing system with an unlimited number of participants in the form of symmetrical and asymmetric lectures with an integrated billing system, file sharing and cloud storage functions, and the protection of user information (correspondence, sent and transmitted files, video and audio communication ).

At the moment, Sphere Live has a single code base for Windows, Mac OS, Android and iOS (the latter is still in development, because interface optimization is required). A beta version is now available for devices running Windows and an alpha version for Android; we plan to support the rest of the operating systems during August 2014.

We believe that the greatest merit of our team is that all the algorithms for the transmission, storage, encryption of information are developed independently, without using third-party technologies. In other words, we do not depend on anyone, we only use free codecs for transferring multimedia and several libraries, but at any moment we can replace them with other, more optimal ones for our application. The rest of the Sphere Live application is completely written by us and has a quickly and easily scalable architecture with unlimited possibilities in the truest sense of the word.

Immediately make a reservation that we have no relation to the company Embarcadero and do not receive any cash rewards from them. Moreover, we use the products of this company on a general basis, i.e. we buy without any discounts. Delphi XE6 (FireMonkey) is our objective, non-imposed choice.

In this article we will not describe all the competitive advantages of various development environments, quote articles from Wikipedia, and also talk about which "tool" is better. Supporters of a solution will always be found. Therefore, we dwell directly on our choice and arguments in its favor.

We started with the Delphi XE2 version. What else could we do? We were well aware that the application should be implemented with minimal development and maintenance costs, while the project is very large and complex, so it was necessary to use exactly the language and the tool that is most studied and has serious development potential, in contrast, for example, from java. There were no universal tools for development and compilation on the market, they had their own for each OS, they needed to be mastered, and to do this, increase the number of developers and testers, and then manage the process of shifting responsibility for unfulfilled tasks.

As a result, the situation developed in such a way that at that moment we had no particular choice, since our requirements were met only by Delphi XE2 - a single code, a unified environment and a compiler for Windows and Mac OS. To date, the Sphere Live code is translated to Delphi XE6 (FireMonkey). We managed to implement a system that is almost ideal in terms of architecture and uses a single code base. Moreover, we managed to achieve similarity of interfaces, although there are certainly differences.

Forgive us Embarcadero, but to say that everything is perfect, we can not, because In earlier versions of the RAD Studio development environment, there were both significant flaws and outright bugs. A lot had to create themselves and solve problems on their own. Dozens of unique components have been developed. However, we were well aware that sooner or later they would reach the stage of the "right" product, and we would be able to use our already decent experience with Firemonkey.

In our opinion, most of the difficulties faced by Delphi programmers (or RAD Studio as a whole) are or are almost complete lack of a description of the Firemonkey architecture and mechanisms. All that is present on the Internet, or has no practical application, or the information is so stingy that it will not allow you to identify elementary errors (not only yours, but also Embarcadero itself).

We spent more than a year to figure out the FMX (Firemonkey). Repeatedly, “stepping on the same rake,” more than once rewrote some of the modules that work with GUI, multimedia, and others. Often argued about - and not for nothing that we chose the RAD Studio development environment, namely - Delphi ?! Periodically, our hands fell, as well as those who develop something on Delphi. They waited and thought: “When will the guys from Embarcadero pay attention to the abundance of glitches and bugs in the medium itself and FMX?”. Every time we expected the release of the new version of “XE ...”, understood what happened, tried and again “fiasco” (for us), which this time “did not fix it again” ...

And finally it happened! If not a miracle, it is almost expected! Embarcadero has released the next version of RAD Studio XE6.

We purchased the XE6 version as soon as Embarcadero announced its release, even a week earlier than it had time to go on sale in Russia (for which a special thank you is to Sergey Kozhevnikov from the Embarcadero representative office in Russia).

First of all, we noticed (literally during the first day of working with it):
- the development environment has become much more stable, it really began to work almost stably (do not convince us that there is no absolutely stable software, especially with such functionality);
- speed of work with IDE increased;
- the speed of the compilers for Android has increased significantly;
- eliminated many bugs and errors in the code;
- significantly increased the speed of the applications developed for FMX;
- There are new, very useful features.
And much more. We will not list everything, and if anyone becomes interested, we will be happy to share information.

Based on all the above, you probably will have a quite fair question: “Where is the“ fly in the ointment in this barrel of honey? ”.

And indeed, Embarcadero does not focus on one very important point. Firemonkey technology, in principle, differs from working with VCL only under Windows. If you say that it is enough to know Object Pascal, then you will be fundamentally wrong. Not so simple. Due to the peculiarities of the work of the FMX itself, the programmer who first started writing cross-platform applications would be very difficult. He will often stumble upon completely inexplicable bugs and glitches, all writing off the "curvature" of Delphi. And partly it will be right, since there are practically no teaching aids and there are not enough examples to work with Delphi.

Some examples can still be found, but the fact is that the examples of the Embarcadero itself, and its evangelists respected by us, are correct, but not complete. In some cases, they simply do not envisage the development of complex applications and only implement the functions that need to be “shown”; in the case of the need to create a multifunctional application, they can cause difficulties for developers only because there is no complete description of the FMX operation mechanisms.

All of the above refers specifically to the development of applications for various platforms using FMX.

Yes, FMX still has some problems:
- it is not yet as strong as we would like;
- it is not as saturated with components as VCL.
However, all this does not mean that using FMX you cannot create good and serious projects.

Can! And you need!

We have much more reasons to be offended by FMX and Embarcadero than most of you, but we did not give up and eventually came to what was achieved by long and hard work, and Embarcadero came to what we all waited for.
We hope that all their subsequent releases of RAD Studio and Firemonkey will be the same, or even better.

All who will be interested in our experience in developing Delphi or the project itself, write in a personal and download our application from the site . We will be happy to answer all your questions.

Source: https://habr.com/ru/post/231997/


All Articles