Bada tutorial: Meet the Containers

Hmm... "Meet the Container !" :O What will be going on today!! :)

Yes, today we will be looking on to all the containers. Because whatever application you develop you must need to deal with various types of containers. After all containers are the things that will hold all our component and show those on the screen. 

Lets look at the following picture. 

A total black window and a button saying "OK".

At first lets find out how many components are there. What do you say? Well would you say like following?
  1. A dark black window.
  2. A button.
is there anything else? Ok, lets look at the following one:

( Focus on "Frame" and "Form" only )
So you identified the "Frame" and "Form", right ? ( encircled ). 

Yes these two are the most common companion for any BADA app developer. As you can see, your application must have a (only one) Frame on the very base. And then you need Form. An application can have multiple forms. Say your application have three screens. Then you will need three different forms. And to show a screen you just need to set the corresponding form in the frame.

If you already launched the "Basic App" from BADA Sample projects, then you will find three screens under this application. So they used three forms for these three screens and showing one at a time.

Once you have the form ready to use, you can add different controls( Button, Label etc ) over it.

Now back to our first picture ( A button on a single black window ). How many components are there? Right!!
  1. A Frame,
  2. A Form ( on the Frame ),
  3. A button ( on the Form )
So basically, if we try to define "What is a Frame?" then we would say that, 
  • it is something which holds the whole application window. 
  • It listens the event of changing phone orientation ( portrait or landscape ). 
  • It contains different forms.

And "What is a Form?", 
  • In the same way form is something which holds all the other controls like Button, Label, EditField, EditArea etc ). 
  • Even though Form itself is a Container, it can hold another Container also, like ScrollPanel, OverlayPanel etc. 
Take a look on the full list of containers in bada developer guide.

Hope this article was helpful to understand the basic containers. On the next post we will be having idea on the anatomy of any BADA Application. Till then ... take care & keep tuned :)


Popular posts from this blog

Highcharts for Agile development

Ajax form submission with tiny MCE editor