• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Blackberry Development Environment

Blackberry Development Environment



Gives you an overview of Development Environment for BB.

Gives you an overview of Development Environment for BB.



Total Views
Views on SlideShare
Embed Views



2 Embeds 2

http://coderwall.com 1
http://www.linkedin.com 1



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    Blackberry Development Environment Blackberry Development Environment Presentation Transcript

    • Development Environment
      Predhin Tom Sapru
    • Introduction
      • Application Manager
      • Event listeners
      • Threads
      • Network Communication
      • Memory Management
      • Data Management
    • Different Approaches…
      Blackberry Browser
      Ease of development and deployement
      Reduced Flexibility
      Java Application
      • Ultimate Flexibility
      • Longer development and deployement
      • The BlackBerry® Java Development Environment (JDE) provides a complete set of APIs and tools for you to develop Java applications that run on BlackBerry Wireless Handhelds.
      • include a J2ME runtime environment that is based on the CLDC 1.1 and MIDP 2.0 specifications.
      MIDP Java Application
      Custom BB App
      Blackberry API
    • Application Manager
      • VM loads an application manager, which manages all Java applications on the handheld. The application manager functions as the central dispatcher of operating system events for other Java applications.
      • Applications that provide a user interface extend the net.rim.device.api.ui.UiApplicationclass. This class provides methods for applications to register event listeners, manage threads, and manage UI components.
      • When the application manager receives an event, it copies the event to the appropriate queues, which enables the application manager to direct messages to certain programs. For example, only the foreground application receives user input messages.
      • Define Screen to be pushed
      • Extending MainScreen class/Screen
    • Event Listener
      • Event listener interfaces are divided by event type. Each application registers toreceivespecific types of events.
      • The application.s event queue then dispatches events to the appropriate listeners.
      • Applications can implement the appropriate listener interfaces or override the listener methods on the various Screen objects. Most applications implement the KeyListener and TrackwheelListener interfaces and register the listeners to receive keyboard and trackwheelevents.
    • Threads
      • An application can access the UI only on the event thread, or with the event lock held.Onlyone thread at a time (usually the event-dispatching thread) can gain access to an interface component.
      • Background threads can access the UI from outside the main event-handling or UI drawing code in two ways:
      acquire and hold the event lock
      use invokeLater() or invokeAndWait() to run on the event dispatch thread
      • The BlackBerry Java environment provides a true multithreading environment for running applications. This enables multiple applications to run simultaneously, events to broadcast to multiple applications, and long operations or listener threads to run in the background.
    • Network Communication
      • The BlackBerry JDE provides the following connection types:
      stream connections (StreamConnection interface), including:
      HTTP connections (HttpConnection interface)
      HTTPS connections (HttpsConnection interface)
      socket connections (SocketConnection interface)
      secure socket connections (SecureConnection interface)
      serial connections to a communication port on the handheld (CommConnection interface)
      datagram connections (DatagramConnection interface), including:
      • UDP datagram connections (UDPDatagramConnection interface)
    • Data Management
      • The BlackBerry Persistent Store APIs and the MIDP RMS APIs (support for JSR 37 and JSR 118) are available on all Java® based BlackBerry devices.
      • The BlackBerry® Persistent Store APIs are designed to provide a flexible and robust data storage interface. With the BlackBerry Persistent Store APIs, you can save entire Java® objects to memory without having to serialize the data first. When you start the application, you can retrieve the Java object from memory and process the information
      • However the limit for an individual object within the store is 64 KB.
      • The RMS APIs provide a simple record management system that allows you to create a data store object and persist a series of records within that object. Each record is a byte array, so you must first serialize your data into a byte array format before storing it locally.
    • Memory Management
      • The BlackBerry® Java® Virtual Machine manages memory usage on the BlackBerry device. The BlackBerry JVM allocates memory, performs garbage collection, and automatically swaps data between SRAM and flash memory.
      • The BlackBerry JVM must also share available memory between the BlackBerry device applications and the BlackBerry® Java Application.
      • The memory capabilities represent the total amount of available memory, which is larger than the available working memory when all of the applications and associated application data exist on the BlackBerry device.
      • Types: Flash, SRAM, microSDexpandible memory card
    • Blackberry Infrastructure
    • Advantages of BlackBerry Development
      BlackBerry provides various advantages to create a robust and world class applications:-
      • Can use two software platforms to develop applications: Java Platform, Micro Edition (J2ME) and MDS.
      • J2ME enables most feature-rich and functionality based solutions
      • Java application development gives ultimate flexibility, power and control.
    • Basic UI Architecture
      • 3 Main Classes:
      • Field
      • Manager
      • Screen
      Main Manager
      • The BlackBerry UI framework uses Manager objects to contain fields. Various Manager subclasses, such as VerticalFieldManager, manage specific kinds of field layouts.
      • MainScreen typically uses a top-level VerticalFieldManagerto manage and lay out other fields, including other field managers.
    • Basic UI Architecture
      • UI components
      • The field sizes itself according to its layout requirements.
      • Each UI application maintains a stack of Screen objects.
      • Each Screen object has a
      delegate manager, the single Manager object directly controlled by the Screen to manage layout and scrolling for the entire screen.
    • Blackberry Java Environment
      • As in any standard Java environment, source files for BlackBerry applications are compiled into Java bytecode by a Java compiler. This bytecode is loaded onto the handheld and run by the Java virtual machine (VM), which translates the Javabytecodeinto instructions that the processor can understand.
      • Main 2 diff b/w Std. Java environment and BB Environment:
      • The BlackBerry Java environment uses smaller, more efficient bytecode that is designed for transmission over low-bandwidth networks and storage on small handhelds. Source files are compiled into handheld code files
      • The BlackBerry Java environment uses an optimized virtual machine instead of the standard KVM provided as part of the CLDC specification. For this reason, you must use the IDE to convert MIDlet applications (.jar and .jad files) to run on the BlackBerry handheld.
    • Blackberry Java Environment
      Restrictions :
      The BlackBerry Wireless Handheld VM has the following restrictions, as specified by CLDC 1.1:
      no object finalization
      no java.lang.Error class hierarchy
      no user class loading
      no reflection, therefore no support for Remote Method Invocation (RMI) or Jini. network technology
      no native methods
      no Runtime.exec() for running external processes
    • Thank You