|
|
Rapidly developing PalmPilot applications (continued)
FIGURE J
 
Filters manage the master/detail relationship between Orders form and Line Items by linking on column ORD_NO. Roll over picture for a larger image.
Adding business logic with scripts With actions and filters, we added a lot of functionality without any programming. Now you can use event-driven scripting to incorporate business logic and complex validation in the application. For example, add an order total calculation to the Line Items form. Select Scripts from the View menu and add an AfterChange event, as shown in Figure K. This way, if either the price or quantity changes, the total will be updated. Scripts use syntax similar to Visual Basic:
Total = Price * Qty
FIGURE K
 
Event-driven scripts enhance the form with business logic. Roll over picture for a larger image.
In addition to mathematical and logical operations, the scripting language supports variables, loops, conditional logic, and access to the properties and methods of Satellite Forms objects. Through scripts you can access data in multiple tables, dynamically adjust control properties, and add sound and animation to enhance an application.
Select Download App & Tables from the PalmPilot menu. Test your application, solicit feedback, and make enhancements until you are satisfied. Figure L shows the completed application.
FIGURE L
The completed application provides convenient data capture and viewing.
Connecting to enterprise data Satellite Forms provides tools to integrate your application with many different databases, and allows users to synchronize in different ways. Depending on an application's requirements, users may synchronize to their desktops, to a local server, or to a remote server. They might connect directly through a serial cable, via modem, through a local area network, or even via the internet.
Ask yourself how many of your users will concurrently synchronize to the same computer. Users who synchronize to their own PC, or small numbers of users who sporadically connect to the same server won't experience any difficulty with standard HotSync. Be aware, however, that HotSync serializes multiple simultaneous connections. As the number of concurrent users grows, some connections may time out. To mitigate this problem, you can install a program called Winframe, by Citrix, and run multiple instances of WindowsNT and HotSync at the same time. For true scalability, however, you will want to explore one of the available server synchronization solutions: ASL Connect from Advance Systems (http://www.asl.com) and Scout from Noblestar Systems (http://et.noblestar.com). Both Scout and ASL Connect can synchronize many simultaneous PalmPilot users with data from ODBC databases and Lotus Notes.
For smaller scale deployments that don't need server synchronization, Satellite Forms includes an ActiveX control that helps you integrate with databases. You write a simple server application in a language that understands ActiveX (e.g., Visual Basic, Microsoft Access, Lotus Approachâ). This server application gives you complete control over the synchronization process. If your middleware or server needs to do any heavy lifting, you can manage this work here. Cut and paste the sample code from the SoftMagic web site to get started. Alternatively, if you do not want to write a server application, you can use the Satellite Forms synchronization tool, also on the web site, to conduct simple data transfers and complete your application.
|
|
|
|