Android architecture and features

Source: Internet
Author: User

This article is transferred from network...

 

Architecture

 

Steal an Android platform from the SDK documentation Architecture Diagram, As shown above. In the bottom layer of the entire architecture Linux KernelA port on the mobile platform hides hardware, network, and other related details, providing a relatively pure unified interface for the upper layer. Unless you want to migrate Android devices to different devices, most common developers do not have to worry about it. Google has always stressed that the underlying implementation of Android is abnormal NB, which is highly portable and has no efforts to study it. On the top layer, there are some Core and extended Class LibrariesThey are all native C ++ implementations. At this layer, you can see many familiar faces, such as SQLite, WebKit, and OpenGL. The power and contribution of open source can be seen. If this layer class library needs to be called by upper-layer functions, it must pass JNITo export the corresponding interface function, otherwise it can only be played within the hierarchy. At this level, it also serves the upper-layer Java program. Runtime. Dalvik virtual machine is the Java Virtual Machine of Android. The reason why we do not use the Virtual Machine of j2_on the one hand is that the design of j2_on is optimized for low-end machines, while Dalvik is optimized for high-end machines, provides better performance. On the other hand, from a commercial point of view, we must bypass the j2's Virtual Machine to completely free Android. We do not need to consider the License issue if we want to open the source. Finally, Java came into existence. First Framework LayerIt contains all the SDK class libraries used for development. In addition, there are some class libraries and implementations of undisclosed interfaces, which are the embodiment of the core mechanism of the entire Android platform. At the top Application LayerSome Applications of the system and all applications developed by a third party are at this level. The difference between the two may be entangled, that is, the system applications will use some hidden classes, while third-party applications, it is always based on what the SDK provides. In general, Android development is based on the SDK, which uses Java to write applications. However, since NDK is available, there has been a small change in writing. The emergence of NDK means that the content at the top application layer can be directly exposed to the underlying layer through the framework layer deployed in Java, or directly talked to the self-developed C ++ library, of course, JNI interfaces must be included in these libraries. People said that Android can use C ++ to develop applications. However, such a statement is not accurate enough. Pure C ++ applications cannot be accepted. In Android, a large number of core mechanisms are deployed at the framework layer. They are implemented in Java, such as control library and Activity scheduling. Therefore, without the interface or scheduling, it is more appropriate to use C ++ as a class library, otherwise everything will be messy. Features are based on this architecture, and many Android designs seem interesting. The design of the entire SDK and core mechanism is neat and elegant, which is the first thing Android gives. To illustrate this point, it is necessary to find a negative textbook. Symbian has no suspense to assume this Wei 'an role. Writing a Symbian program is like playing a guessing game. Even if you are a veteran of Symbian, you may still be helpless when you need a strange feature in Symbian. You often need to guess and search for it again and again. Which kind of odd tricks do I need here? Should I think about some events or use a mysterious UID to find a specific application, and so on. For Android applications, it is like a simulated examination question for the college entrance examination. The questions look different. The answer mode is clear, and the answer mode is a hundred. Listen to a system event and check the SDK. Access the data of an application to see if it provides the Content Provider. All things are played by a routine. As long as you understand the routine, you can also understand the unfamiliar card. People say that martial arts experts should all have no choice but to do anything, and a good application framework should also be very lightweight and accessible. The most elegant aspect of the Android framework is the introduction of the Mash-Up idea. The so-called Mash-Up refers to building blocks for writing applications. when the results are to be achieved, it is good for dongjia to work together on the scene. There are two key points. One is ModularAnd the other is Dynamic. The so-called modularization means that the functions of an application should be clearly blocked into functional points with clear boundaries. Each functional point is like a black box, and the interaction mode is described by pre-defined rules; dynamic means that these independent modules can be connected according to the Requirement Description during operation to accomplish a larger function. Android has done a great job in both aspects. From the point of constructing an application with the Mash-Up mechanism to look at the design of some of the core functions of other Android systems, it looks like there are rules to follow. For example, why are we going to privatize files, why are we going to host processes, and so on (of course, we can also see different effects from other perspectives, different perspectives, and naturally different visions ...). Android is also very good in terms of UI mechanism. It uses a resource file in xml format to describe all interface-related content. Resource files are not new things, and the xml format is also old-fashioned, but what is valuable is that Android is richer and more thorough, basically putting interface-related logic, all of them are stripped from the code to the resource file, which is twice as powerful as the resource file of Symbian. ++ ++ Libraries layer: openGL is an open-source graphics library. SGL is an OpenGL-based 3D interface library. libc is a c Runtime Library. FreeType is a font-related library. SSL is a Secure Sockets Layer protocol layer. WebKit is an open-source browser web page layout. engine, see http://www.jjos.org/android/2010/05/10/312_webkit-webkit-for-android.html

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.