Palm OS Programming Introduction
Are you considering programming in the Palm OS® platform? This page introduces you to several types of programming types, summarizing the uniqueness of the Palm OS application, and where you can get more information.
Application type
Solutions created for Palm PowerED® Handheld may include several different components. Applications running on the handheld can consist of one or more application PRCs and custom shared libraries. Depending on your specific needs, you may also need to write a synchronization pipe running on your desktop computer. Many solutions ultimately depend on hardware accessories for a specific licensed manufacturer equipment.
Handheld computer app
The GUI application running in Palm Powered Pocket is generally single-threaded, event-driven programs. You can only run an application at a time. Users cannot stop or exit applications, they can only choose to run another different app. As a response, the Palm OS stops the current application and runs the new selection program. Although Palm OS applications are driven by events, they may still perform work outside of the event cycle according to other systems. For example, if the user searches for a specific word using the Find (Find) tool, the system runs each application and searches for their database to see if the recorded data is included.
The Palm OS application is compiled as a PRC file (PALM resource file) and then downloads to the handheld. The same PRC can be run on all Palm brands, or you can run on all licensed manufacturers (such as Handspring, Symbol, or Sony). Some devices have unique features that can be encoded. For more information, see Appendix "Compatibility Guide" in Palm OS Programmer's Reference.
You can create a Palm OS application using a variety of different languages (such as C, C, C , Visual Basic or Java) development environment. You can also select a development environment based on the language you want to use, but you must clear the results that caused by the selected. Using standard C language as a programming language is the most common development environment, there are some attachments to allow C frameworks. For C or C applications, Palm OS provides a large number of functions required for memory management, character operation, screen graphics, etc.. Therefore, there is no need to link standard C or C libraries. This will make your application simply and efficient. For Visual Basic and Java development environments, even some C-language-based development environments require a runtime engine. Some of these developments require engines in the device, while others compile the runtime element into the application. Regardless of the case, the final code base is not as simple as the C language-based application. However, the running engine is usually provided free of charge, and the development tool provides a sufficient benefit to make the increase in code length value value.
If you choose C or C , you also need Palm to provide free SDK. In addition to providing the necessary header files for C language, Palm OS SDK also includes documentation and a wide range of useful tools.
Synchronous pipeline (Conduit)
The synchronization pipe is a plugin for the HotSync® technology. When you press the palm bracket or debug the HotSync button on the demodulator, it will run. The synchronous pipeline is responsible for synchronizing the data between desktop computers and handheld computer applications.
If you only need to back up data to the PC, Palm HotSync software provides you with a basic backup synchronization pipe. In this case, you need to do just a binary bit in the database of the handheld, indicating that the data should be backed up. No additional synchronization pipes are required. When the data format must be converted, the synchronization pipe is necessary. For example, when you transfer data from the handheld to the company's database, you must have a synchronous pipe to perform conversion work, access the appropriate database record, write data to the record, and save it to the database. The writing of the synchronous pipelines usually uses Visual C , Visual Basic or Java language and combined with the Palm Synchronous Pipeline Development Kit (CDK). With the SDK used for device-end applications, CDK provides access to the Sync Manager API, as well as some useful tools and documents. It also provides a universal synchronous pipe containing many synchronous logic, which can be easily customized to comply with your needs.
In addition to CDK, many third-party solutions can also help automate synchronous pipeline development process, or provide the ability to synchronize directly with the server. The program that synchronizes the handheld application with the server is still referred to as a synchronous pipe, but the difference between the synchronous pipes built with CDK is that they do not rely on the SYNC Manager API.
Designed specifically for small and battery-operated equipment
Compared to the application designed for high-power Pentium, a completely different concept is required, and the former has a large-sized color display, and its users usually have to sit down for a few hours. In contrast, Palm Powered handheld is a low voltage, small, equipment-operated equipment, frequently, but every time is not long. The following is some precautions that should be remembulated when designing and building an application:
· Screen size: Most Palm Powered Handheld screens are 160x160 pixels, which limits the amount of information that can be displayed at a time. Desktop applications often provide a number of options in the button bar. In Palm Powered Pocket, the home screen should only contain people's most needed information, and other unrelated content will be removed. Hide any additional features in the sub-screen.
· User mode: Palm PowerED Pocket Typical usage mode is used multiple times a day, and each time you use very short. For handheld computers, the day is turned on 40 times, and the cumulative use time is more than 1 hour. Don't use your handheld as a small laptop, and your application should make your application a maximum of these short-lived users. Remember: When the user wants to sit down for 3 hours before the desktop computer, it is required to be forgiven before finding the required information. But for the handheld computer users, if the finding information is only the only thing to do before turning off, this waiting is unbearable.
· Limited input: Do not let users enter a lot of data using the handheld itself. The handwritten stroke input on the screen and the built-in keyboard dialog is far less efficient as the keyboard and mouse efficiency of the desktop computer. Users can use an external keyboard, but should not treat them as required devices. Consider providing users with a method of entering data on a desktop, then providing a synchronous pipeline to download this information to the handheld.
• Power: Palm Powered Pocket The processing speed range from 16MHz to 33MHz. They are not designed to perform the same type of desktop PC. Users of the handheld do not want to stare at the appearance of the next screen while staring at the hourglass icon. Consider using a synchronous pipe to hand over any complex processing to a desktop computer with a greater power, and limit the application of the device to the information and tools required to handle those users who are leaving their works.
· Battery: The battery's battery is relatively small, but the key to the success of this platform is that the equipment has excellent battery life, which can exceed one month in many cases. In this way, a handheld computer is more like a good phone instead of a laptop. Users don't have to worry about whether their devices are charged, as long as the device can use it. Carefully consider your operation before performing a large amount of power (such as serial or infrared communication, sound, persistent animation, or other tasks that require for a long time). · Memory: Each Palm Powered Pocket's storage space is limited, from 512K to 8MB, there is also a dynamic heap of 32K to 256K (newer equipment often have 8MB and 256K). Optimization is critical. First optimize the heap space, followed by the speed, and finally the length of the code.
· Data Storage: Palm OS stores data in memory called recorded blocks, which are stored in the database so that the limited storage space is stored. A database is similar to a file, but the database is divided into many records to allow data to be stored in a non-contrafic memory block. To save space, you should edit the data in the appropriate storage, instead of creating data or bucking it in the RAM, and then writing to the storage stain.
· Backward compatibility: backward compatibility is one of the key features of Palm OS, as users do not upgrade the Handheld operating system like the operating system of the desktop computer. You can always use the latest version of SDK even if you want to create programs running on older handhelds (such as Palm Professionals).
· Calculate each byte: When writing a web shear application, consider the number of bytes of the Wireless.Palm.Net service plan is limited, from 50K per month to 300K per month. To limit the amount of information transmitted by the user. The HTML page and images you need are stored in the device - the method is to include them in the WCA installed in the user.
Other introduction information
Palm OS Programmer's Companion, Volume I provided with SDK, deeper the design principle of the GUI application. Read the first four chapters to lay a good foundation and learn about the content involved in the Palm OS application. If you are ready to create a web shear app, you can read Web Clipping Developer's Guide.
For synchronous pipes, the Conduit Programmer's Companion for Windows and Conduit Programmer's Companion for Windows and Conduit Program for CDK provide similar information for creating synchronous pipes.
There are also many third-party books for primary Palm OS programmers and more advanced Palm OS programmers. Here are two very important reference books:
Palm OS Programming: The Developer's Guide, 2nd Edition, Author: Neil Rhodes and Julie McKeehan. This book shows how experienced C and C programmers show how to build a Palm application from scratch. Based on the success of the first edition, this book has joined the elaboration of applications built for more versions of Palm OS (including the latest version 4.0).
Palm OS Programming Bible, Author: Lonnon R. Foster. This is a very comprehensive Palm programming reference book, specializing in Palm OS 3.5. It covers the GUI application programming, web cut applications, and synchronous pipelines. The book is written in very modular way so you can easily read the needs of the needs. If you want to participate in the class, the developer training program provides a course guided by the teacher about the Palm OS foundation, creating a synchronous pipeline, etc., and also provides a variety of online courses for beginners and experienced Palm OS programmers. The course guided by teachers is thoroughly practical, combined with lectures and experiments, teachers will pay attention to the actual situation of each student and the teaching teachers have passed PalmSource Inc. certification.
After completing the basic content learning, if you have more specific questions to answer, there are multiple methods for you to choose. You can search for developers' knowledge bases or publish issues to a developer Forum (mailing list and newsgroup). In addition, HOTDISPATCH provides a similar auction-auction-like forum where PalmSource also provides pay-based programming support. In addition, you can go to the development support page on Palmos.com, get a list of more complete support options.
Finally, please browse the third-party company's website for more information on third-party development environments. However, you can browse Palmos.com's integrated tool page to get a list of third-party tools. This page provides links to the details site.