This article will briefly introduce the architecture model of the j2_application program. Since its birth, the j2_application technology is still growing. Although there are various differences in the support of JSR standards by mobile phones, the differences in Virtual Machine implementation between different vendors have more or less hindered the biggest advantage of j2s.
J2EE application architecture model
I 've been using mobile apps for almost a year. I 'd like to take some time to understand the application architecture. This document uses the mobile phone application of j2-based as an example. This section describes the architecture features of the enterprise application in the development of enterprise applications.
From its birth to the present, the technology is still growing. Despite the differences in JSR standard support from various mobile phones and Virtual Machine implementations of various manufacturers, it is more or less a hindrance to the embodiment of the biggest advantage-cross-platform, but it is undeniable that the technology is still one of the most important technologies in the mobile development field. Because of its ease of development and high portability, developers engaged in JAVA can quickly invest in the development of j2s, which is much easier than C ++ development on the symbian platform.
As an application of enterprise customers, the main business model is C/S. The server stores user data and responds to the complex business logic of online users. As the receiver of data, the client processes simple business logic and stores a small amount of data, such as chat records, local accounts, and passwords. Of course, the client may also be a PC.
For example, the instant messaging software IM (InstantMessage) of a mobile phone, the server must support multiple clients online at the same time, store customer information, and process requests sent from each client, forward Customer A's information to Customer B, and forward customer C's offline information to all friends of customer C. That is to say, all communication between a client and another client must be transferred through the server. The following describes a simple architecture model of the client.
◆ We can use the MVC design concept to design this framework. It can be roughly divided into the following layers.
Handler: processing network requests and network message distribution. This layer is the most critical and involves each layer of the overall structure.
Database: used to store a small amount of data. In j2s, RMS (RecordManagementSystem) is the primary bearer of this level. Each Mobile Phone may support different RMS sizes, making this precious storage space more precious. Handler controls the storage and extraction of databases for display at the View layer.
Model: This layer is mainly used to create logic control classes based on program requirements. Encapsulate data and create public interfaces. For example, a Message type may be created for storage in the database.
View: displays the user interface and responds to and processes keyboard commands. Display some information assigned by the Handler layer and send the requirement information to Handler for processing. Therefore, this layer communicates directly with Handler and does not directly involve Database or network information.
Of course, it will be more complicated in actual application development. For example, there is a session to Control Message polling and network connections. Below I will use a pseudo code to further describe this model.