Saturday, 19 February 2011

QuickStartGuide - Your first bada application

When you’ve spent enough time looking through the sample code, it’s time to build your first bada application. Choose File|New|bada application project and the type of project to create- we’ll build a form based application and call it MybadaSample. Now click the Finish button and the application skeleton will be created and added to your workspace. Clicking Next will lead you through a series of options to customise the project, such as the class name for the default form created. For now we’ll stick to the defaults and our form will just be called Form1.

Building a form based application

Of the other types of applications listed, web applications are a mixture of HTML,CSS and Javascript while Flash applications are created using a specified .SWF file, built using Flash Lite 3.1 and ActionScript 2.0. Handy for moving those Flash based games across to bada.

Find MybadaSample in your workspace and take a look at the files created in the inc and src folders.  Form1.cpp is where we can add code for handling the form created for us, but there is already some functionality built in so let’s take a look. Build the project by clicking the hammer icon or choosing Project|Build Project. Next run the project in the Simulator by choosing Run|Run As|bada simulator application and the “hello bada” project will be run as shown in Figure X. That’s how easy it is to build a fully functional bada application skeleton. Of course now all we have to do is add some features, but we’ll leave a more indepth discussion of what bada can do for a later blog post.

The “hello bada” sample we just built
Finally, let’s have a look at how we build our user interface. Open the Res folder in your project and within that open the folder called 480x800. Inside there is a file called IDF_FORM1.xml. Double click this file your application’s form will be opened in the bada UI Builder. From there you can edit and add items to the form, create new forms, add strings for localisation and generally create your user interface the way you like it. 

Make sure you check back tomorrow when we will walk through some useful resources to help you get up to speed with bada (Label - QuickStartGuide

No comments:

Post a Comment

Please don't post spam. Its tiresome.

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