BlackBerry Programming 101
The accomplishment of newer BlackBerry models like the Pearl, Curve, Bold and Storm have permitted RIM (Analysis in Motion) to penetrate the customer smartphone market place and go head-to-head with the Apple iPhone as an application platform. If you have been ignoring the BlackBerry platform since it was as well Enterprise-focused for your applications, it could be time to particularly target the BlackBerry. Here's how you get began.
It really is Java Time
BlackBerry improvement for all current models is performed exclusively in Java. So if you happen to be not a powerful Java programmer, now's the time to brush up on your Java programming expertise. (C# programmers will obtain the transition to Java relatively uncomplicated, the languages are incredibly close in most respects.) Do not find out about the newest Java attributes, on the other hand, since the BlackBerry platform is constructed on best of Java Micro Edition (Java ME), which is itself a derivative of Java version 1.three. So neglect all the fancy (but beneficial) language attributes introduced in Java 1.five — generics, enumerations, and so on — you cannot use these in BlackBerry programming. You cannot also use most of the library classes you happen to be familiar with — they are just not there. A tiny subset of the Java Common Edition (Java SE) classes are supported, as nicely as a quantity of BlackBerry-distinct classes.
Java Micro Edition?
When you have brushed up on your Java, you have to have to invest a bit of time understanding the Java ME platform, which was formerly identified as Java two Micro Edition, or J2ME for brief. You have to have to comprehend the ideas of configurations and profiles, and in certain the CLDC and MIDP requirements. You will obtain lots of information and facts about these in different books and on Sun's Java improvement website.
The BlackBerry Platform
Soon after studying about Java ME, it really is time to discover the BlackBerry platform. The BlackBerry platform is primarily based on the CLDC and contains help for MIDP two.. Nevertheless, a huge quantity of BlackBerry-distinct classes are also supplied. Which brings you to the very first query you are going to face: are you going to create a BlackBerry application or a MIDP application? In a MIDP application you happen to be constrained to only use the APIs exposed by the CLDC and MIDP requirements. Your application will run on the BlackBerry and on most cellphones, but it will not be capable to use any of the BlackBerry's particular attributes. You can use any MIDP-compatible improvement tool, such as the Sun Java Wireless Toolkit for CLDC (formerly identified as the J2ME Wireless Toolkit), to develop your applications.
Most application developers opt to develop BlackBerry-distinct applications. This suggests studying the BlackBerry-distinct APIs — like new user interface classes — and making use of the BlackBerry Java Development Environment (JDE) to create your applications. The JDE, which is cost-free to download, functions with the typical Java Application Improvement Kit and delivers you with all the tools required to develop, package, test and debug BlackBerry applications. You never even have to have a BlackBerry handheld, since the JDE contains a complete-featured BlackBerry device simulator. A full set of JavaDocs is supplied that describes all the classes and interfaces out there to programmers.
Soon after downloading and installing the JDE, you are going to want to study the developer's guides that come with the JDE and appear at the sample applications that are shipped with it. Then commence your improvement by writing a couple of uncomplicated applications to get a really feel for the BlackBerry APIs and the tools.
Get A BlackBerry Handheld
Though you can create and test your applications for cost-free, at some point you are going to have to have to run the application on an actual BlackBerry handheld. This will expense you dollars, of course, and so it really is not anything you are going to want to do till you happen to be severe about writing BlackBerry applications. On-device testing is important to making certain that the application functions properly, since the simulator is not a ideal emulation program.
If you happen to be definitely severe about BlackBerry application improvement, think about also joining one particular of the BlackBerry developer applications for added help and early access to new devices and APIs. You need to also discover RIM's other BlackBerry developer sources. There are also third-celebration forums and books out there to aid you find out the BlackBerry platform.
BlackBerry programming is not difficult if you know some Java and you comprehend the constraints and limitations of the underlying Java ME platform. You have to find out a new set of APIs and use new improvement tools, but in the finish it really is just a different type of Java programming.