Monday, 18 April 2011

QuickStartGuide - Standard technologies

bada supports a number of standard technologies, which helps to make the job of moving your code from another platform, such as Symbian C++ or Qt, easier. In terms of graphics technologies, bada supports both the Open GL ES 1.1 and 2.0 libraries (although not all bada devices will have the hardware to support this).


bada supports OpenGL ES 1.1 and 2.0    
For database support, bada provides a set of classes for managing SQLite databases on the device which are very similar to the Symbian C++ RsqlDatabase and RsqlStatement classes. bada’s Io::Database namespace includes the classes Database, DbStatement and DbEnumerator for managing SQLite databases and performing SQLite queries on the device. While SQLite support in Qt is slightly different, the underlying SQLite queries should be ported to bada without too much difficulty.

Of course bada also supports a wide range of standard networking technologies. Symbian’s implementation of Sockets is based on the BSD standard sockets library, as is bada’s, so you’re off to a head start when moving Socket based code to bada. There are also bada classes for supporting a HTTP 1.1 client, DNS resolution, Bluetooth, managing WiFi connections, so bada provides equivalent classes to implement your existing networking code.

The privilege model: permission to code
The last of our familiar foundations is platform security. bada takes a different approach to Symbian, but you’ll probably recognise some of the concepts. In Symbian, platform security was designed to control access to the user’s data and protect the integrity of the device. In the Symbian OS, there are around 20 capabilities which protect certain sensitive APIs. Some of these capabilities can be granted by the user at runtime- accessing the user’s data, for example, while some must be built into the application when it is digitally signed and installed on the device. The more capabilities, the greater the testing process that the application has to go through.

In bada, certain sensitive APIs are part of a privilege group which in term is assigned a privilege level: normal or system. Normal privileges are available to all registered developers who sign up via the bada developer site, while system privileges are only available to those developers who are Samsung partners. There are actually very few APIs which require system privileges, but they do include those for sending SMS, MMS and email, certain APIs for controlling network connections and dealing with remote content. You specify which privilege groups an application requires by creating an application manifest file on the bada developer site. This manifest file is included as part of the application package.

Much like Symbian, bada also includes the concept of data caging, providing a private area of the file system that only the application can access, as well as special directory which can be accessed by another ‘trusted’ application. Each application has an appID and you can add these appIDs to your list of trusted apps which have read/write access to the /Home/Share2/appID folder. This is a good way to share data between a suite of applications.

Where to go from here
In this article we looked at some of the technologies in bada that you may find familiar when moving from another OS such as Symbian- whether using Symbian C++ or Qt for your app development. We didn’t seek to offer a feature by feature comparison, but we hope we’ve shown how much of your accumulated knowledge can be applied to porting your apps to bada.

In the final part of this series, we’ll look at those technologies which make bada different. So, until then, time to fire up the bada IDE and get coding ! 

No comments:

Post a Comment

Please don't post spam. Its tiresome.

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