What is brew?-Brew's Essence

Source: Internet
Author: User

Why write this?Article:
I have been in contact with brew for more than four months. Although it is not a long time, I still have some knowledge about brew and some of my own opinions. I don't like to learn something useful for my work just to do a good job. I like to know what a thing is. At present, whether it is brew develop or brew OEM, there is actually a problem, that is, it does not really understand what brew is, of course, it does not directly affect their work. However, I personally think that if I don't even know what brew is, but I use some porting interfaces, it seems very "empty" and you cannot enjoy it. I have seen many posts on the Internet about misunderstanding brew. Now I think it is necessary to write an article about what brew is. Of course, my opinions are neither authoritative nor wrong. I will only present the brew I understand to you. I will be very happy if it helps you. If any errors occur, correct them or discuss them with each other.

Qualcomm's definition of brew:
There are many documents that define brew, and I do not want to check which one has the most authoritative definition about Brew by Qualcomm. I just summarized some Qualcomm documents that I have read and summarized Qualcomm's definition of brew. In short, Qualcomm defines brew as an end-to-end solution in wireless mobile networks.
Brew-4 letters:
As mentioned above, brew is a solution. What exactly does brew4 letters mean. According to my understanding, B is for the Virtual Machine (explanation) of j2-based, indicating that the target file of brew is binary. Code , Not intermediate explanation Program . R indicates that brew is a dynamic loading mechanism. Code is loaded and run only when it is required. The e-generation table brew is more than just some interface APIs. Brew has its own kernel and its own execution environment (aee environment ). W stands for brew, a dedicated solution for wireless mobility.
Brew and OS:
It is often seen that comparing BREW with the operating system is the most common way to compare it with Symbian. "Which one do you think is better than brew and Symbian ?" "I think brew is not as good as Symbian" and so on. In fact, there is no comparability between the two. Brew is not an operating system. In essence, brew is only a software in a task running on the operating system. Brew is located on the operating system. Brew's implementation on mobile phones requires support from operating system services. Theoretically, brew can be supported on any operating system. Therefore, brew cannot be compared with the operating system, and it is not comparable. It's just like comparing windows and VC.
Brew andProgramming Language:
In addition, it is often seen that brew and Java are used for comparison. The two are not comparable at all. Java is a programming language used to compile software. Brew, you can think of it as software, so you don't have to consider what it is. This comparison is just like comparing btsoftware with Python (the development language of btsoftware. In addition, although the brew environment is implemented in C Language, The BREW application is developed. Theoretically, it can be used in any language. Currently, it is mainly C, C ++. In fact, if we compare brew with j2's, it will be comparable. For details, see the following section.
Brew is a middleware:
More people compare brew with j2's because they are supported by China Unicom and China Mobile. Why is it comparable. I understand that they are all middleware technologies. Brew is a middleware!
Middleware is located between the operating system (and native software) and upper-layer applications. It makes application development scalable, flexible, and "standard ".
First, let's look at the mobile development mode when no middleware is available.
At this time, the entire mobile phone development is completed by the OEM. They write task code on the mobile phone operating system, write underlying API functions and services (called Native) for specific functions, and then use the native code to write some mobile phone applications, such as phone book and text message. At this time, any third party will not be able to enter this industry, because they need to understand the mobile phone system and these native APIs to Develop upper-layer applications. However, these are usually confidential. Therefore, at that time, there was almost no develop, only OEM.
After the emergence of middleware technology, the entire mobile development model has been changed. We use brew as an example.
We call the above development mode pure native development mode. Once the handset is exposed to porting brew, an intermediate layer is added to native, that is, middleware. Middleware (brew) defines a set of standard interfaces (environments). This set of standard interfaces (environments) is for upper layers and for develop. The implementation of this interface (or environment) is to call native (and the operating system) services, which we call porting. In this way, the middleware shields underlying differences and specific implementations, and provides standard interfaces for the above. This gave birth to the emergence of the mobile phone develop industry. Because they do not need to consider specific mobile phones, they only need to use the standard interface (Environment) provided by middleware to develop portable applications. The essence of this portability is that the "Commonalities" presented by develop are presented by the "personality" of the OEM, and such a mode is adopted by the middleware, it shields the connection between this commonality and personality. Separate use and implementation. Portability is achieved!
Speaking of the middleware technology, the most mentioned now is the j2e-brew, MHP. The JVM provides general Java interfaces through porting on different platforms. MHP is a lot of middleware standards currently used on the set-top box. I am not very clear about the specifics. In addition, there is a difference between BREW and j2_because j2_is only a thin client-type middleware technology and does not involve an end-to-end complete solution. Brew not only refers to the middleware (brew) on the handset but also the ADS (server). Therefore, brew is not only a middleware, but also a definition of Qualcomm, is an end-to-end solution.
Brew is the design mode:
I am only a beginner in the design model, so here is just my opinion. I think brew is a special and scalable facade design mode. The purpose of the facade mode is to simplify the use of existing systems, recustomize a new interface (or method), and present it to the client, so that the client can easily use the existing system. Before brew occurs, the client (upper-layer application) uses the native method (directly calling the operating system or native API) to call the system (call system services to achieve specific functions ), this method of using the system is very complex and is usually unavailable to third parties. Through brew, I have customized a new interface (platform, environment, or method) based on native and presented it to the client (upper-layer application ). In this way, the client implements a certain function through this new interface (platform, environment, or method), but it is more convenient.
Why is it a scalable facade design pattern. Generally, the service provided by the new interface customized in the facade mode is a subset of the services that the original system can provide. The same is true for brew. It can only provide services to the client through all interfaces. Of course, it cannot include all the services theoretically provided by the entire handset. However, we know that brew itself is scalable, for example, it can be extended by the OEM, or some interfaces can be removed by the OEM, or some interfaces will be extended with the brew version update. In this way, the services provided by the client are scalable, so I call it scalable.
In addition, it is a special facade mode, because the facade mode does not force the customized new interface to be a "standard" interface. However, brew provides a standard interface. It makes cilent (Application) Portable, so I call it special.
End:
In the face of so many prawns, I only share my opinions without commenting on brew. If it is helpful to you, I feel a little gratified. If you have any errors, please advise. Please also exchange ideas with each other. (Hempel: http://hempel.cublog.cn)

 Original article addressHttp://www.cnjm.net

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.