Блог Александра Божко
Поделись с другими!

The more frequently I’m asked my colleagues in private conversations  if it’s possible to develop mobile applications in FireMonkey or is it a prototype rather than a production solution?

I think, now I can ensure even the out-and-out sceptics.

My bosom friend and colleague Tagir Yumaguzin told me about the project he took part a long time ago.  Now, when this project is in pre-release state, we decided that this description will be interesting for the Delphi community. In the essence, this is a really large project implemented in FM. We are talking about Sphere Live project.  A little article devoted to that project was recently published in Habrahabr.ru  Alexey Glyzin, chief of ‘Sphere Systems, LLC‘ development department agreed to tell more about the project taking into consideration the audience of my blog.


A.B. – Alexey, in general, what your project is?

A.G.: – The idea has not appeared at once and instantly. Before the ‘Sphere’ project our team had been working on the project where stream audio/video technologies were implemented. Later we created our own software that was able to deliver multimedia streams to an unlimited amount of users including the feedback.  But we needed to have a billing feature included.
The application had to comply the several requirements. First, the maximally simplified organization of conferences or transmission to the participants which amount we cannot predict. Second, the most important, is to give to our clients an opportunity to earn with our application and to reduce the complexity of the system, amount of instruments needed to use to reach the goal. The ease of organization of courses, webinar or just a consultation.

But the commercial sense was in priority.

Also during the development cycle we decided to adopt it for the distant education also.

It should be noted that there are a lot of similar systems on the market. We offer the software that has unique features, of course, for the commercial version. Commercial consulting, conferences, lectures and so on. There aren’t  any limits but, of course, the ones that hardware causes.

Our benefit are our own protocols including audio/video transmission, unique system for file management, traffic reduction, on-line language translator and many other.


A.B. : – Are these features implemented in Delphi from scratch?

A.G.: – Most of them. There are several libraries written in C. But because of the need to function on several platforms some open source libraries are built particularly for every platform. The rest part (more that 95 %) is pure Delphi.

A.B.: – Why Delphi? Did the Skype success affect?

A.G.: – When we illustrated the model of our project in UML, we saw that Sphere Live project is large, if not huge! Over than 200 modules! Our experience is that the Delphi is the optimal solution for such challenge.

We can implement our ideas and test our algorithms easier. If required, some parts can be written in other languages. In any case, we could avoid a lot of problems having chosen Delphi as the main development instrument.

Even more, in most cases it’s possible to solve any problem. Compilation speed is amazing. Size of resulted binary file is optimal, despite the proclamations in the Internet that it’s too big. Believe us, we know what we are talking about.

I’ve heard an opinion from the experienced engineer who took part in serious project that function in 24/7 mode : the satellites managed by software written in Pascal fly, the ones written in C – sink. And we didn’t make a mistake with Delphi.

As for Skype and other products written in Delphi, their success affected partially, but the most important thing are the simplicity of Delphi and our skills and knowledge. Agree, when the number of code lines exceeds the number with six zeroes, it’s rather difficult to deal with this code, refactor it, educate new members, change it. And you have no time for discussion what language to use, it’s reasonable to use the language you know better and able to solve the problem efficiently. And we still do not mention the third-party components that we had to edit because of  specific requirements of our software.


A.B.: – What version of Delphi did you use?

A.G. : – The latest version of Sphere is written in XE2 version and newer. We had no problems with building project with every released version of Delphi.

A.B. : – Are the skins you used native ones or did you use the third-party software for customization?
A.G. : – We used the standard ones as the basis. But we had to edit them because the lack of features we needed. As the result, all modifications gave us the ‘skin’ similar to the standard one.

A.B. : – Did you use third-party components ?

A.G. : – Yes, we did. One of them is networking component library RTC (RealThinClient SDK). Temporarily we use Mitov VideoLab. In the first version that was Windows-specific we used Mitov audioLab and VideoLab.

But in order to develop a cross-platform application we had to design our own custom modules for audio and video processing. But we still have to use VideoLab software unless we have our modules ready for production.

Also we use the well-known sound processing library BASS.

A.B. : – Does the absence of such wide range of components for FireMonkey like VCL represent a problem?

A.G. : It doesn’t, really. The most delightful feature of FM is that the development of your own components is rather simple task. Of course, it’s relative, but in total the development of visual components is much more simple that in VCL.

The point is that FireMonkey technology allows you to do.

For GUI we used only FMX-widgets. It was important in our case to use the same components for all platforms. Our goal was to make them to work on all variety of platforms : Windows, Linux. iOS, Android. It should be noted that Embarcadero plans an ‘expansion’ on other platforms and it means that we don’t need to change anything.

As a result, we figured out that it was much easier to develop our own widgets than to search for the ones that meet our needs.


A.B. : – Are there any custom components?

A.G. : – Sure. And we’ll be glad to share some them. Even more, as long as refactoring lasts, we shall optimize the components we developed and publish some of them for those who needs them in a while. It would be nice to publish them in your blog and discuss them with the community.


A.B. : – It would be a pleasant surprise for me! What exactly these components are?

A.G. : – We had to develop cross-platform components. For example, the applications uses a lot of graphical elements what needed a container similar to TImageList but more flexible and able to process the images of any size and format.

And, in its turn, the TImage analogue but able to process the container elements names. Another example is yet another implementation of TImage but with the feature of proportional scaling. Additional buttons that support images and supplementary features.

Components inherited from  TListBox and TTreeView that support expanded Drag-and-Drop features. I think that our components will be interesting for a lot of people.


A.B. : – You announced the beginning of mobile clients development at the September in the past year. Now we can see a full-featured Android application and, as far as I understand,  iOS support will be available. What is the percentage of commonly used code?

A.G. : – Curiously but despite the deviation of the common code principle the percentage exceeds 90 %. I think it would not be a mistake to say that it even more that 95%. But after the recent refactoring procedure.

There are modules that differ significantly. We wrapped them in our own modules in order to unify our code. In total, the working with microphone or video camera under Windows environment does not differ from Android or MacOS. But it’s about the code only.

For example, if I type :

‘TMediaDevices.VideoManager.CurrentVideoCaptureDevice.StartCapture’ it will enable the camera on any platform.

A.B. : – Have you had any experience in the mobile applications development before you started this project?

A.G.  No, we have not. This is the first mobile applications project. Of course, we wanted to create a product that would have had the same interface and feature set on desktop, laptop and tablet. Hope that users will value our efforts and will help us to make it better.

A.B. : – What were the most significant problems with FM?

A.G. : – It’s rather difficult to answer this question immediately. We had a lot, indeed. Because we started the development cycle for a variety of platforms since Delphi XE2. Let me explain in details.

At the first stage we had problems with the comprehension of this technology itself. Only now we have enough resources and documentation devoted to FMX and its peculiarities (books, blogs, forums and communities). Now it’s much easier to start new projects with the use of FMX. That’s why the  most important problem is the lack of information that describes the technology and its features. The problem connected with the development of range multimedia modules and components that implement particular features of every platform. This relates to the background applications too.

There was a range of problems with the implementation of some GUI widgets including the GUI rendering performance.  But it should be noted that Delphi XE6 was the concentration of the efforts Embarcadero applied and it got rid of serious bugs what rejoiced us.

A.B. : – Do you plan to increase the features of your application?

A.G. – Even now plans we have are more than immense and it’s mostly connected with the technologies of streaming we implemented, methods of storage and data compression rated as confidential.

A.B. : – What would you advise those who only begins to dive into mobile applications development with Delphi?

A.G. : – Don’t hesitate to  try! Don’t be afraid of any new thing. Create and create again.

We started this project without any experience in this field at all. And we have overcome the thorny way until the present day. But let’s leave the success story for our management staff, just believe – it would be something like ‘mission impossible’ story.

We strongly advise to track news published in Internet where all nuances of programming in Delphi with FM technology are discussed. Such kind of examples will help you to understand the main principles and peculiarities of FM technology. we wouldn’t judge for all but it seems that you will find help and awareness there.

Поделись с другими!

Оставить комментарий

Ваш email не будет опубликован. Обязательные поля отмечены *

Вы можете использовать это HTMLтеги и атрибуты: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Продукты DevArt
Купить онлайн:

Читай русскоязычные Delphi блоги
Каталог блогов Blogdir.ru