Thursday, 14 April 2011

QuickStartGuide - bada: familiar foundations

Welcome to the second part of our QuickStart guide to bada programming. In the first article in the series we looked at the bada development environment, showed your where to find resources to assist your development efforts and demonstrated how easy it is to build a simple application. Now it’s time to look at bada in more detail and to talk about some of the key technologies that bada is built on.

For those with a background in Symbian development, whether you’ve been developing apps using Symbian C++ or Qt , you’ll find that a reassuring amount of your accumulated knowledge can be applied to bada. We won’t be attempting a feature by feature comparison, since many of the idiosyncrasies of Symbian C++ are unique to the platform, instead we’ll be concentrating on those Symbian development concepts which can also be applied to bada: the familiar foundations. If you’re moving from another platform, this article is for you too.

C++ as the native language
The bada platform is written in C++, and much like Symbian, native app development- with all the performance advantages that it provides- means C++ development. But unlike Symbian, where developers can create everything from apps to system level components and device drivers, the bada platform is purely designed for 3rd party app development.

As we saw in part 1, the bada IDE will be familiar to those brought up on Symbian C++ using Carbide, since both IDEs are based on Eclipse and you’ll start to feel at home in no time. If you have standard C library code to move across to bada, the job is made easier by bada including the NewLib C library, an implementation of the C standard library for embedded systems. bada also supports the C++ standard template library (STL), so STL code written for another platform should be able to be ported to bada relatively easily.

Some of the Symbian C++ idioms are also shared by bada, including two phase construction. In bada, the code for creating an object and allocating memory for its member variables is separated into the object’s constructor and a Construct() method (like the ConstructL() method in Symbian C++). This is a model you’ll see used often in bada code.

Of course much of the code for the applications you’re looking to port to bada will be using platform specific APIs and the good news is that in a lot of cases the equivalent bada APIs will look remarkably similar to those provided by Symbian C++ or Qt.

In tomorrows article we'll look at a couple of notable examples: collection classes and strings.

No comments:

Post a Comment

Please don't post spam. Its tiresome.

Note: only a member of this blog may post a comment.