Development Environment<br />Predhin Tom Sapru<br />
Introduction<br /><ul><li>Application Manager
Event listeners
Threads
Network Communication
Memory Management
Data Management</li></li></ul><li>Different Approaches…<br />Blackberry Browser<br />Ease of development and deployement<b...
Longer development and deployement</li></li></ul><li><ul><li>The BlackBerry® Java Development Environment (JDE) provides a...
include a J2ME runtime environment that is based on the CLDC 1.1 and MIDP 2.0 specifications. </li></ul>MIDP Java Applicat...
Application Manager<br /><ul><li>VM loads an application manager, which manages all Java applications on the handheld. The...
Applications that provide a user interface extend the net.rim.device.api.ui.UiApplicationclass. This class provides method...
When the application manager receives an event, it copies the event to the appropriate queues, which enables the applicati...
Define Screen to be pushed
Extending MainScreen class/Screen</li></li></ul><li>Event Listener<br /><ul><li>Event listener interfaces are divided by e...
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 obje...
Background threads can access the UI from outside the main event-handling or UI drawing code in two ways:</li></ul>acquire...
Upcoming SlideShare
Loading in …5
×

Blackberry Development Environment

1,031 views

Published on

Gives you an overview of Development Environment for BB.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,031
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
20
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Blackberry Development Environment

  1. 1. Development Environment<br />Predhin Tom Sapru<br />
  2. 2. Introduction<br /><ul><li>Application Manager
  3. 3. Event listeners
  4. 4. Threads
  5. 5. Network Communication
  6. 6. Memory Management
  7. 7. Data Management</li></li></ul><li>Different Approaches…<br />Blackberry Browser<br />Ease of development and deployement<br />Reduced Flexibility<br />Java Application<br /><ul><li>Ultimate Flexibility
  8. 8. Longer development and deployement</li></li></ul><li><ul><li>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.
  9. 9. include a J2ME runtime environment that is based on the CLDC 1.1 and MIDP 2.0 specifications. </li></ul>MIDP Java Application<br />Custom BB App<br />MIDP<br />Blackberry API<br />CLDC<br />JVM<br />
  10. 10. Application Manager<br /><ul><li>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.
  11. 11. 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.
  12. 12. 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.
  13. 13. Define Screen to be pushed
  14. 14. Extending MainScreen class/Screen</li></li></ul><li>Event Listener<br /><ul><li>Event listener interfaces are divided by event type. Each application registers toreceivespecific types of events.
  15. 15. The application.s event queue then dispatches events to the appropriate listeners.
  16. 16. 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.</li></li></ul><li>Threads<br /><ul><li>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.
  17. 17. Background threads can access the UI from outside the main event-handling or UI drawing code in two ways:</li></ul>acquire and hold the event lock<br />use invokeLater() or invokeAndWait() to run on the event dispatch thread<br /><ul><li>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.</li></li></ul><li>Network Communication<br /><ul><li>The BlackBerry JDE provides the following connection types: </li></ul>stream connections (StreamConnection interface), including:<br />HTTP connections (HttpConnection interface)<br />HTTPS connections (HttpsConnection interface)<br />socket connections (SocketConnection interface)<br />secure socket connections (SecureConnection interface)<br />serial connections to a communication port on the handheld (CommConnection interface)<br />datagram connections (DatagramConnection interface), including:<br /><ul><li>UDP datagram connections (UDPDatagramConnection interface)</li></li></ul><li>Data Management<br /><ul><li>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.
  18. 18. 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
  19. 19. However the limit for an individual object within the store is 64 KB.
  20. 20. 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.</li></li></ul><li>Memory Management<br /><ul><li>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.
  21. 21. The BlackBerry JVM must also share available memory between the BlackBerry device applications and the BlackBerry® Java Application.
  22. 22. 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.
  23. 23. Types: Flash, SRAM, microSDexpandible memory card</li></li></ul><li>Blackberry Infrastructure<br />
  24. 24. Advantages of BlackBerry Development<br />BlackBerry provides various advantages to create a robust and world class applications:-<br /><ul><li> Can use two software platforms to develop applications: Java Platform, Micro Edition (J2ME) and MDS.
  25. 25. J2ME enables most feature-rich and functionality based solutions
  26. 26. Java application development gives ultimate flexibility, power and control.</li></li></ul><li>Basic UI Architecture<br /><ul><li>3 Main Classes:
  27. 27. Field
  28. 28. Manager
  29. 29. Screen</li></ul>Main Manager<br /><ul><li>The BlackBerry UI framework uses Manager objects to contain fields. Various Manager subclasses, such as VerticalFieldManager, manage specific kinds of field layouts.
  30. 30. MainScreen typically uses a top-level VerticalFieldManagerto manage and lay out other fields, including other field managers.</li></li></ul><li>Basic UI Architecture<br />Fields<br /><ul><li>UI components
  31. 31. The field sizes itself according to its layout requirements.</li></ul>Screen<br /><ul><li>Each UI application maintains a stack of Screen objects.
  32. 32. Each Screen object has a</li></ul>delegate manager, the single Manager object directly controlled by the Screen to manage layout and scrolling for the entire screen.<br />
  33. 33. Blackberry Java Environment<br /><ul><li>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.
  34. 34. Main 2 diff b/w Std. Java environment and BB Environment:
  35. 35. 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
  36. 36. 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.</li></li></ul><li>Blackberry Java Environment<br />Restrictions :<br />The BlackBerry Wireless Handheld VM has the following restrictions, as specified by CLDC 1.1:<br />no object finalization<br />no java.lang.Error class hierarchy<br />no user class loading<br />no reflection, therefore no support for Remote Method Invocation (RMI) or Jini. network technology<br />no native methods<br />no Runtime.exec() for running external processes<br />
  37. 37. Thank You<br />

×