The Binary Runtime Environment for Wireless (BREW) gives developers a mechanism for creating portable applications that will work on Code Division Multiple Access (CDMA)-based handsets. BREW was developed by QUALCOMM, which also created CDMA technology. It is a lightweight framework that runs between the applications and the chip operating system software. BREW manages all of the telephony functions on the device, thereby allowing application developers to create advanced wireless applications without having to program to the device's system-level interface. Figure 18.2 shows the BREW architecture and the relationship between the BREW API platform and the mobile applications. Later in this section we will also discuss how J2ME and BREW can coexist.
Figure 18.2: BREW architecture.
Even though BREW currently supports only QUALCOMM's CDMA chipsets, the platform is air-interface-independent, meaning that handsets using other wireless technologies can be BREW-enabled in the future.
Historically, mobile phones have been closed systems; that is, the software that shipped with the device was all that was available to the user. There was no capacity to add new applications to the device or even to update existing applications. If you were unhappy with the calendar application, for example, there was really nothing you could do about it. The same was true for the phone book, email clients, and microbrowsers. And you could not even think about adding a custom application like an MP3 player or a video game. Those restrictions were very limiting for both the consumer and the wireless operator. This is where BREW comes in: By providing a standard application layer, consumers, developers, wireless operators, and handset manufacturers all benefit.
Consumers. The benefit for consumers is quite clear-cut: BREW allows for consumers to download new applications over the air, which means they can personalize their devices. BREW will promote a whole new range of applications for the consumer, ranging from instant messaging to location-based services. The consumer will have the final say in what is deployed to their device; moreover, they will only have to pay for applications they are interested in.
Developers. BREW makes it possible for developers to create new applications for mobile phones. They no longer have to establish a relationship with wireless handset manufacturers or carriers or have to own a physical device prototype. Instead, developers can use C/C++ or other high-level languages to create their applications for a wide range of BREW-enabled devices. QUALCOMM has also established a TRUE BREW testing process to ensure application compatibility and quality.
Handset manufacturers. Once handset manufacturers integrate BREW into their devices, they will be able to release new products faster. Application testing will no longer have to be included in the factory integration tasks because they can be deployed to the device at a later time. In addition, handset manufacturers will be able to use a wide range of third-party applications, allowing them to spend more time on handset design and development.
Wireless operators. Wireless operators benefit from the capability to provide a broader range of applications for handsets running on their networks. This can help drive mobile phone adoption, as well as increase airtime usage. In many cases, it is the wireless operator that provisions the applications, thereby taking a percentage of the application revenue.
On the development side, a BREW SDK is available on Windows platforms. It includes a phone emulator that supports phone customization by OEMs or developers who are looking to customize the device. It also has sample applications and tools to aid with development. Although any language can be used, the language of choice for creating BREW applications is C/C++, which will run faster because it is native and does not require bytecode interpretation. The BREW environment can be used with other mobile operating systems such as Palm OS, Windows CE, and Symbian OS. It will complement these environments by enabling over-the-air provisioning of applications and management of telephony functions in the devices. BREW can act as the common denominator for the entire range of mobile devices, from mobile phones to high-end PDAs. As good as all this sounds, however, it is still too early to tell if this type of integration will prove to be successful, as many of the mobile operating system vendors are just starting to add these capabilities natively to the operating system, or by using J2ME.
At first glance, it might appear as though BREW and J2ME were direct competitors. Each technology provides an abstract layer over the native device APIs. They both provide a platform-neutral API that makes it possible to deploy applications on any compliant device; and they both provide over-the-air provisioning of applications. These similarities often lead developers to believe that they have to choose one platform or the other. This is not the case. BREW enables Java Virtual Machine (JVM) vendors to create JVMs that are BREW-compatible. This will allow the JVM to be deployed to a BREW-enabled device and, therefore, to execute Java applications. The benefit is that BREW-enabled devices will be able to run both BREW and J2ME applications. Figure 18.2, shown earlier, depicts this relationship.
To support this scenario, Hewlett-Packard has ported its MicroChaiVM to the BREW platform. Other VM vendors, such as IBM and Insignia Solutions, have announced similar plans. All that said, in truth, even with JVM support, it is unlikely that J2ME and BREW will exist in harmony. In most cases, handset manufacturers and wireless operators support one technology or the other, but rarely both. J2ME has a strong lead in terms of the number of developers, as well as the potential market opportunity, and J2ME applications are not limited to particular devices or wireless networks. Any device with a JVM can execute J2ME applications. On the other hand, as noted previously, BREW is available only for CDMA chipsets. This may not be a limiting factor, though, as close to 100 million CDMA handsets are sold each year. For comparison purposes, this is more than double the total number of PDAs that are sold. So even though the market for BREW applications is smaller than that for J2ME applications, it is still sizable.