Brew advanced and proficient-3G mobile value-added business operation, customization and Development serialized 87-transplantation for the BREW Platform

Source: Internet
Author: User

Before transplantation, determine the target of the application, that is, the business model that the application may adopt. determine the content to be transplanted, whether it is the application algorithm or data structure, whether it is the business logic or the high-level network logic, or the user interface.

Another thing before porting is to determine which are platform-independent interface attributes and specific platform interface attributes. Check whether the standard library functions of C are used and whether they depend on Functions of a specific platform. It is best to encapsulate these macros and functions instead of simply replacing them. It is equally important to clarify runtime restrictions, such as memory, threads, synchronous interfaces, and byte alignment. When porting a multi-threaded application to the BREW Platform, the callback mechanism (aeecallback) is generally used ).

At the beginning of the transplantation, it is best to establish a testing environment to test the key APIs at the application porting layer and the important APIs in the application, and to provide tracking of memory and resource usage. Similar to the OEM layer, you can establish a reference implementation for the application porting layer, and implement Platform-related attributes in this application porting layer, which makes application debugging very simple in the future.

After the application porting layer is created, you need to test it in your own testing environment. First, you need to perform a unit test, run it in the simulator, and finally run the test on your mobile phone, it also detects memory usage and algorithm execution performance. After testing the application porting layer, You can integrate the independent code of the target application platform with the application porting layer. In this case, the user interface may be merged or created. The next step is to test the entire application, then authenticate (generally Commercial Test TBT), and release the transplanted application.

When porting an application on a PC to brew, you must pay special attention to the memory model. Generally, you must rewrite the algorithm and data structure and consider a separate memory distributor, pay attention to the running performance. Porting from other mobile platforms to the Brew platform may be simpler. Pay special attention to the file structure and user interface. Remember not to read and write data segments in applications during migration. Global and static variables are not recommended in brew. Note the byte alignment and high-position byte order and asynchronous communication mode. It is best to receive more compiler warnings during porting. Generally, Level 4 warnings can be used as migration errors. When defining platform-dependent interfaces and running on mobile phones, analyze the memory and CPU performance.

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.