Choosing a language

PODS is written in C and currently has supported bindings only for C. In addition, most of the methods and attributes available through PODS objects are exported to M-Business JavaScript engine. Thus it may be possible to use either JavaScript or C to implement your application. The table below summarizes the considerations involved in choosing the language you will use to develop your M-Business Anywhere client application. In many cases, the best solution will be to use M-Business JavaScript engine for the bulk of the application code, and write C code for PODS objects for use in JavaScript when that is required to implement particular functions.

Table 1. Considerations when choosing a development language

Consideration

JavaScript

C

Portability

Fully cross-platform, including testing and use in desktop browsers

Somewhat platform-specific; although PODS code can be written to be platform neutral, at a minimum the source must be compiled separately for each Palm OS and Microsoft OS platforms.

Access to PODS objects

Most

All

Access to OS calls

No

Yes

Execution speed

Generally slower

Generally faster

Memory requirement

Generally higher

Generally lower

Management of hardware

Symbol Technologies scanner only

Any device for which you can obtain or write a driver

Form submission

Yes

Yes

Dynamic generation of HTML pages

Yes

Yes

Dynamically changing contents of HTML forms

Yes

Yes

Maintaining state between pages

Yes

Yes

Integrating with third party on-device software through APIs

No

Yes

PODS has been supported in M-Business Client by the M-Business Anywhere implementation of JavaScript. JavaScript can call PODS code to extend JavaScript with capabilities not present in the JavaScript language.

PODS can be used to develop a variety of user applications. Many of these applications also could be developed using JavaScript. However, there may still be reasons for using PODS, such as smaller executable code, faster performance, and the ability to make calls directly into the operating system.

Your choice may be completely determined by one or two of the trade-offs in the table above. If you need your application to make OS calls, or perform intensive number crunching as fast as possible, you must choose C, at least to perform those functions.

If you need your application to be fully cross-platform, you probably should choose M-Business JavaScript engine. JavaScript’s simple application delivery model and ease of programming make it a great choice for most applications.

If you do not require something that you can get only with C, use JavaScript. It is simpler to program and easier to maintain, and your pages can be tested and used on desktop browsers as well.