Recently I’ve finished a Blackberry Development course and I’ve decided to share all the things that I’ve learned. This is the first of three post about Blackberry that I’m going to publish and during this post I’ll talk about:
- How to work with Blackberry UI components.
- How to work with data persistem system in Blackberry applications.
- How to work with Networking in Blackberry application.
But first of all we have to configure and prepare our Integrated Development Environment (IDE). In that case we have chosen and, in fact! I recommend installing BlackBerry Plugin for Eclipse which allows you to work with Eclipse IDE within a BlackBerry Plugin.
First step is do click on Plugin for Eclipse link:
And the next one download the IDE:
When downloading would have finished unzip the folder in your local hard drive and you will see your folder like this:
Now is the moment to configure your IDE. Please do clic on eclipse.exe file and when it ask you about your workspace set the default work space or select any other. In my case, as you can see in that picture I’ve added one folder called workspace but this is not mandatory, I leave it in your hands (literal translation – I love it 😉 it’s funny).
Well, we just need to configure two important things in our Eclipse:
- BlackBerry SDK version that we are going to work: 7.0.0
- Java Compiler Compliance Level: 1.3
So, go to Windows > Preferences > Java > Installed JREs and confirm if SDK 7.0.0 is checked:
Now go to Windows > Preferences > Java > Compiler and select 1.3 for Compiler Compliance level:
Ok! Now we are going to check if all is right to start our developments. We are going to make our first Blackberry project:
It works like other kind of plugins, first step is define our project name and our JRE:
Next one we have to set our project folder structure. In that case I just defined it by default:
And finally, and the most interesting is defininf our project type:
We are going to select the first option: BlackBerry Application. Don’t worry, I’ll explain the other options and which is better depending on projects in later post. Now we just just go to make a test appplication to check if our IDE has been configured correctly. So, click next button and fill the form shows in that picture:
Here you could used your own best practices to define your application name and screen name, but in my case I’ve learned that is a really good practice to set names linked with the matter of the file. It is:
- Application Class Name – It should finish with the word Application
- Screen Class Name – It should finish with the word Screen and the first one could be called MainScreen because it represents first screen in our application which will be showed.
Ready? well! We just have to do click on Finish button and see that in our project explorer tab has appeared a new Blackberry project called HelloWorld:
And now we have to create a run configuration to launch our project. In that case you just select you run configuration name, your project and your device:
As you can see in the picture, I’ve selected BlackBerry-SDK-9930 but it’s probably that you haven’t this device. Don’t mind my friend! You can download your favourite device or another device that you need here.
Did you select your project in project tab and your devide already? Ok! Do click in Apply and after in Run. Can you see the simulator like this picture?
Great! When this loading process is over the simulator shows you the main screen like a BlackBerry device. And here you can look for your application icon:
Come on! Don’t be afraid and push it and let’s see what it shows. Somehting like that?
Well done! This is your first BlackBerry application. Althought this is a little bit simple, in next post I’m going to show you some components and how to work with them and how to do our application more interesting.
Thanks to @larasith for him patience 😉