I. Commonly Used commands in Palm Development
1. Packaging command: palm-package <File Name> For example: helloworld palm-package helloworld
2. Installation command: palm-install <application installation package name> For example: COM. Palm. mycompany. helloworld_1.0.0_all.ipk
Palm-install com. Palm. mycompany. helloworld_1.0.0_all.ipk
3. Run the following command: palm-launch <Application name> for example, Com. Palm. mycompany. helloworld.
Palm-launch COM. Palm. mycompany. helloworld
4. Close the command: palm-launch-C <Application name> for example, Com. Palm. mycompany. helloworld
Palm-launch-C com. Palm. mycompany. helloworld
5. Uninstall the command: palm-install-r <Application name> for example, Com. Palm. mycompany. helloworld.
Palm-install com. Palm. mycompany. helloworld
6. View console logs: palm-log-F <Application name> for example, Com. Palm. mycompany. helloworld.
Palm-log-F com. Palm. mycompany. helloworld
II. debugging in Palm development is troublesome, and debugging in Javascript is not an effective method. Generally, you only need to output and view logs to check whether the results are expected for simulated debugging, the following methods are generally used:
1. Log-console view first in the Application CodeThe statements written in a Chinese book are as follows:
Console. Log ("========> my output result object:" + ver );
Then run ProgramYou can enter the command from the command line: palm-log-F com. Palm. eshore. helloworld to view. output results
2. Import the result to the page. First, define the elements used to display information in the view, for example:
Write $ ("info"). Update ("view debugging result:" + ver) in the Code );
Run on the page to view the running result
3. Use the pop-up box to write in the Code: mojo. Controller. errordilog ("view debugging result:" + ver );
Run to view the pop-up results
Iii. abstraction of Public modules
1. constants are configured in an independent full-angle JS class, such as IP addresses.
2. Commonly used tools are placed in separate classes for processing, such as date processing and data encryption.
3. The shared functions should be processed in a separate class as much as possible, such as all Ajax Data Access
4. constants that may change are placed in a separate class for unified modification.
|
This article is transferred fromWww.35java.com