Reputation: 608
I was reading about the J2ME architecture where it was written that there are 3 layers
1) Configuration Layer: It has JVM and interacts with the OS
2) Profile layer: Minimum set of API's for small device
3) MIDP layer: Contains Java API's
The book is J2ME: The Complete Reference
QUESTIONS
1) Do every phone have an OS? If not what is the first layer doing in that case?
2) What is API's for small device?
3) MIDP is itself a profile which means it should be at second layer then how come it is at third layer?
Upvotes: 3
Views: 2516
Reputation: 29670
Answers are as follows,
Upvotes: 1
Reputation: 7261
Configurations and profiles are the main elements that comprise J2ME’s modular design. These two elements enable support for the plethora of devices that J2ME supports. A J2ME configuration defines a minimum Java platform for a family of devices. Members of a given family all have similar requirements for memory and processing power.
A configuration is really a specification that identifies the systemlevel facilities available, such as a set of Java language features, the characteristics and features of the virtual machine present, and the minimum Java libraries that are supported.
Software developers can expect a certain level of system support to be available for a family of devices that uses a particular configuration.
A configuration also specifies a minimum set of features for a category of devices. Device manufacturers implement profiles to provide a real platform for a family of devices that have the capabilities that a given configuration specifies. The other J2ME building block, the profile, specifies the application-level interface for a particular class of devices. A profile implementation consists of a set of Java class libraries that provide this application-level interface. Thus, a profile theoretically could specify all kinds of functionality and services.
This is not the intention of its creators, however. The creators of J2ME intend that a profile should address the needs of a specific device category or vertical market pertaining to that device category. The idea is not to place a plethora of unrelated application level features in a profile. Rather, the main goal is to guarantee interoperability—which doesn’t necessarily imply compatibility between different manufacturers’ implementations—between all devices of the same category or vertical market family to define a standard platform for Java application development.
For example, a profile might support a network communication facility for the popular Short Message Service (SMS) standard widely used by mobile phones. Because the SMS standard is a ubiquitous feature of mobile telephony, it makes sense to define this service in a profile that targets mobile phones, rather than to build it into a configuration.
A profile is implemented on top of a configuration, one step closer to the implementation of real-world applications.
Typically, a profile includes libraries that are more specific to the characteristics of the category of devices they represent than are the libraries that comprise configurations.
Applications are then built on top of the configuration and profile; they can use only the class libraries provided by these two lower-level specifications. Profiles can be built on top of one another. A J2ME platform implementation, however, can contain only one configuration.
Figure 1.1 shows the conceptual layers that comprise the J2ME platform.
So far, these notions of configurations, profiles, and platform definitions is somewhat abstract. The next section gives you a more concrete description of the characteristics of actual environments. Configurations and Profiles A configuration specifies three basic elements:
• a set of Java programming language features
• a set of Java virtual machine features
• a set of supported Java libraries and application programming interfaces (APIs)
Hope this will help you to understand J2ME Architecture.
Upvotes: 3