Languages

Menu
Sites
Language
Rapid Native App Development using Modern C++

Gilang Mentari Hamidy - Samsung R&D Institute Indonesia (SRIN)

 

The Tizen Native API officially embraces procedural-style programming paradigm using the C programming language. This creates a “language-barrier” for software developers who are migrating from popular development platforms, which usually use higher level programming languages. Although EFL, the UI library provided in Tizen Native API, is very powerful, it also introduces boilerplate codes which are unnecessary for fast application development lifecycle. Fortunately, the nature of Flat-C API introduced by EFL in Tizen opens the possibility to be adapted to programming environments other than C. The adaptation is quite straightforward which enables us to encapsulate boilerplate codes into a reusable framework library.
 
We developed a library called Tizen Fundamental Classes (TFC) which utilizes modern C++. We designed TFC to be easily understandable by developers who are familiar with popular programming paradigms and patterns. We introduced the Model-View-Controller framework for application development, a smooth bridging component between C++ objects and EFL objects, and we also introduced Domain Specific Language (DSL) in developing a seamless asynchronous code, similar to popular programming platforms. This presentation will focus on presenting the basic features of TFC, demonstrating how to develop native applications with TFC, and compare it to popular platforms. This presentation also covers some advanced features of TFC such as asynchronous codes and serialization.
 
SRIN has been using TFC since the first Tizen project in late 2015, and it has been evolving ever since. We have developed at least 6 applications using TFC which are now published in Tizen store. Those apps including Salaam, a Muslim application, Detikcom, Kompas, and CNN Indonesia, which is a popular news platform in Indonesia, as well as Samsung Gift Indonesia. We are currently developing a worldwide scale messaging application, Telegram, using TFC and is expected to be published soon. We aim to publish TFC as an open source library (see below) to provide more options for developers to develop native applications in Tizen, as well as to reduce the unwillingness of developers to write native apps for Tizen due to language and platform barrier.
 
Edited by: John Ixion on 14 Oct, 2017

Responses

10 Replies
Yo Shakya

thank you.

questions:

- is it just a c++ wrapper on top of efl?

- does it allow me to customize ui components? if yes, how? (i currently struggle a log to customize the ui that i design in sketch and then implement the design using efl in c/c++, and i have been looking for tizen/efl based libs that make it easy to write customized ui. as an example, please take a look at bo pattern live screen lock and bo chatquotes. it would be nice if i could easily write a UITableViewController/UITableViewCell kinda classes in Cocoa using tfc in c++ and reuse them across my projects)

- irrespective, the framework looks good. telegram is ambitious. (:

Gilang Hamidy

Hi there. Thanks for your questions :)

- is it just a c++ wrapper on top of efl?

Basically yes and no, it is a C++ wrapper on top of EFL, but it does not provide the entire wrapper classes for EFL objects. We believe that to wrap the entire things to be redundant as EFL itself already have C++ binding in development, but nowhere to be found in current Tizen live platform. TFC basically is a bridging framework to enable C++ development on top of EFL libraries available in Tizen. 

 

In TFC, you wouldn't find the respective classes for EFL widgets such as Evas_Object or Elm_Button, etc. You can directly call the respective EFL functions to create the widget, and integrate it inside TFC-style coding pattern (MVC pattern for UI app). The wrapper available in TFC for example are: UI application with MVC, which wraps the EFL's window and naviframe altogether, DropDown which wraps button and context-menu widget, and some other.

 

Additionally we provides additional components to aid callback dispatching from EFL objects to C++ functions, which enables you to use instance function instead of static one.

 

- does it allow me to customize ui components?

TFC provides basic building blocks for custom UI components, called TFC::Components::ComponentBase. It is basically just a simplification and structurization for factory function to create EFL widgets. Developing using this pattern definitely open the possibility of reusability, but it doesn't really provide anything more than just a pattern (and other TFC infrastructure, of course).

 

For the example, check out the source code of several components in TFC like DropDown, Entry, etc. I'm not sure if that is what you're looking for, but in our development team, we try to always stick to this pattern when developing a new component.

 

- irrespective, the framework looks good. telegram is ambitious. (:

Thanks! Yes it is definitely ambitious, considering almost zero documentation from Telegram side, so we have to read the almost undocumented source code of existing Telegram apps. Thankfully one of the crucial component for Telegram is written in C++ (and it is open source, definitely) so we reuse it directly in the Tizen apps and it works like magic! :D

if yes, how? (i currently struggle a log to customize the ui that i design in sketch and then implement the design using efl in c/c++, and i have been looking for tizen/efl based libs that make it easy to write customized ui. as an example, please take a look at bo pattern live screen lock and bo chatquotes. it would be nice if i could easily write a UITableViewController/UITableViewCell kinda classes in Cocoa using tfc in c++ and reuse them across my projects)

 

John Ixion
Gary V

Tizen Fundamental Classes (TFC) seems to be an interesting initiative, but it currently seems to have only two (2) active GitHub contributors. Is TFC "officially" supported by Samsung? Is it considered to be a part of the official Tizen SDK, thus "guaranteed" to be maintained in future Tizen versions, just like EFL? What exactly is the status of the TFC project at this point?

 

Thanks,

 

Gary

Gilang Hamidy

Hi there,

TFC os currently a part of initiative from Samsung R&D Indonesia (SRIN) and currently maintained by our team here. We are actively using TFC in our projects so we continuously update the TFC. We have not make any plan currently to integrate the library to Tizen SDK as the library is still very small and limited. There are also still ongoing changes and refactoring which might be applied to the library, so maintaining it in GitHub is currently a better option.

In SRIN, the team who is working for Tizen is quite small. Only about 17 people who is splitted onto working on two different application projects, and asditional 1 shared team who maintains Framework and reusable codes, which only consist of 3 people. We expect to increase the team size further as well as increasing our capabilities so more people can maintain TFC in the long run.

In coming month, we will publish a new application in Tizen Store which uses TFC, and unlike our previous work, we will also publish the source code in GitHub so people can also evaluate and learn how to utilize TFC in a big application. And we also expect contributions and ideas to improve the TFC further.

Cheers,

Lubos Ilcik

Hello,
I'm just evaluating options for Tizen C++ development and this lib looks promising to me :-). I see it is still on sdk 2.4 (master branch). I was able to build and run the Heliosky sample for the sdk 3.0 but I am not sure if there would be any issues with the sdk 3.0? Can the TFC be used with wearable also? (I hope so if it is just a "wrapper"). I have noticed the development branch is quite ahead, should I use it instead of the master?
Thx,

 

 

Gilang Hamidy

Hi there,

Basically it can be targeted to SDK 3.0 as we are currently actively developing on SDK 3.0. And yes, you can use development branch as that branch is continuously updated currently.

For wearable, I have tried to compile it in 2.3 and used it in the past. Basically it is possible to utilize it on wearable, although several EFL API is quite outdated and perhaps can trigger compilation error. Currently because we are not actively using it on wearable, we are not sure if it will correctly behaves in wearable, specifically for the UI components. But feel free to try it.

Cheers,

Lubos Ilcik

Hi Gilang,
thx for hints. When compiling for wearable only one issue arises: eext_floatingbutton_*, the affected classes are FloatingButton and FloatingMenu. I've managed to build and run wearable app when commenting out the failing code. Looks promising :-).
kind regards,

 

William Petter

If you want to write GUI desktop applications for Windows, you would be far better advised to learn C# rather than C++.

Also you can take help from here: Sky Potential UK

homeflow smart living

Homeflow has teamed up with security firm ADT for a new home alarm system, borrowing the DIY automation cleverness of Smart home products and combining it with professional monitoring. Dubbed the Samsung SmartThings ADT home security system, it offers an alternative to the recently announced Nest Secure system. Like both, it’s intended to be installed by the homeowner themselves, rather than demanding professional installation.