BLACKBERRY: Like Google’s Android, BlackBerry employees a Java development environment and... .

advertisement
BLACKBERRY:
Like Google’s Android, BlackBerry employees a Java development environment and has a
detailed developer web page: http://na.blackberry.com/eng/developers/. From a development
perspective, there are two alternatives for application development and associated tools
(http://na.blackberry.com/eng/developers/javaappdev/): the BlackBerry JDE Plug-in for
Excpilse, and the older (legacy) BlackBerry Java Development Environment. Details on both at:
http://na.blackberry.com/eng/developers/javaappdev/devtools.jsp. Note that to accompany
the development process, there are BlackBerry Smartphone Simulators available:
http://na.blackberry.com/eng/developers/resources/simulators.jsp.
Please note that the subsequent pages are excerpted from a report prepared by my MS
student, Justin Demaris, that details some experiences in using Blackberry, including the
development environment, and his success with deploying an application on his own phone.
Justin DeMaris
CSE 5600: End-of-Semester Progress Report
This was my first semester working on this project, so a good part of my time was spent
acclimating myself to the environment, which involved learning the set up of the Tomcat server
and the configuration and deployment of Struts and the Hibernate database abstraction layer. I
found that the most useful way to understand the configuration was to deploy a Tomcat server
on my local computer and connect to it with the NetBeans IDE and then follow a few tutorials
to create some simple web applications. Two tutorials that I found the most helpful were:
http://www.roseindia.net/quickguide/tomcat/tomcatapplication.shtml
http://cit.wta.swin.edu.au/cit/subjects/CITP0014/tutorials/netbeans/tomcat/Ru
nning_Tomcat_from_Netbeans.html
One thing to make sure is that you obtain the latest version of NetBeans from the official Sun
Java website, as the version that is packaged with many versions of Linux has a few bugs that
prevent you from integrating it with Tomcat.
One initiative that I began with regards to moving the project forward is to add a Web
Services layer to the project that will allow for multiple types of client abstractions, including
the current web-based client designed for PC users and a second client that will run on mobile
platforms like the Blackberry or the iPhone. I considered a number of libraries to provide this
platform capability within the Enterprise Java system include Metro
(https://metro.dev.java.net/), XINS (http://xins.sourceforge.net/), Glue and JBossWS. I settled
on Metro as the library of choice because of its low overhead, good support and flexibility with
encoding mechanisms. The second part of this initiative was to select the encoding mechanism,
keeping in mind that one of our target platforms are the processing-weak mobile devices.
Between SOAP, XML-RPC and JSON-RPC, JSON-RPC provided the required flexibility with the
minimal amount of encoding overhead, which is good both for processing power and for
network transfer speeds (both important limitations on mobile devices). Implementation will be
with knowledge that the encoding mechanism should be as abstract as possible so we can swap
it in favor of other mechanisms if time proves a different method to be better.
Since the mobile devices were an important platform to target, I began learning how to
develop on these platforms. I own a Blackberry Curve, so I purchased the book Beginning
Blackberry Development (http://www.amazon.com/Beginning-BlackBerry-DevelopmentAnthony-Rizk/dp/1430272252/ref=pd_sim_b_4) and learned how to write Blackberry
applications. I implemented a simple blackberry application that contacts the server and
retrieves a basic piece of data, using its HTTP interface. This proof-of-concept demonstrates the
network access capabilities of the device and the basic UI components that can be populated
and updated dynamically.
Blackberry development is best to be done with the Blackberry JDE available on the
Research-In-Motion website at
http://na.blackberry.com/eng/developers/javaappdev/javadevenv.jsp. This allows Java
development directly targeting the Blackberry. For demonstration purposes and to test
Blackberry applications on the development PC, I also ran the Blackberry simulator that looks
like this:
This simulator is also available from the
Blackberry website at
http://na.blackberry.com/eng/developers/r
esources/simulators.jsp.
There are issues with using the Network
communication from within the simulator,
but further research and configuration will
reveal the proper way to make that work so
that the entire application can be debugged
and tested from the PC without requiring
ownership of an actual Blackberry.
Download