Indicate the source and author's contact information during reprinting.
Contact information of the author: Li xianjing <xianjimli at Hotmail dot com>
After nearly a month of research, I had a general understanding of ZX's mobile development platform. In general, the code quality is still good and the readability is very good. However, I think their practices are worth considering:
1. Define the IDs of all windows and controls in a single file. This makes it easy to reference a window or control and produces many side effects. For example, adding/deleting an ID requires compiling the entire project, which takes about 20 minutes. This kind of reference convenience leads to a large number of cross references, and the coupling between codes is very close.
2. Putting resources and code together is not conducive to updating. To update resources, you must first use a GUI tool to convert BMP into an array of C language. If there is no command line tool, you must manually select multiple directories each time, after the conversion, You need to copy it to the corresponding file and then compile the entire project. At the same time, there is no corresponding relationship between the resource ID and the image name. It cannot be automated and resources are updated manually each time, which wastes a lot of time.
Third, the file system does not have an abstract interface. Use EFS _ series functions to access the file system of norflash and FFS _ series functions to access the file system of nandflash. The caller uses a specific implementation function instead of an abstract interface. To move the data previously stored in norflash to nandflash, modify the code.
Fourth, there is no abstract interface for functions related to character set processing. The code is filled with a large number of functions such as gb2unicode. Although the system provides Unicode support, it may not be so easy to support different languages.
Fifth, there is no specialized public code library, and a large number of repeated functions are scattered in different AP codes. This also causes some inconvenience to code maintenance.