Download presentation
Presentation is loading. Please wait.
1
Mixing Conduits with JDBC HotSync®-ing Palm® Programs, Java Style with Database Connectivity by Mike Kirschman
2
Goals During HotSync® Translate text to HTML code Translate text to HTML code Include Graphics as ’s (postponed to later time) Include Graphics as ’s (postponed to later time) Allow Replacement Variables Allow Replacement Variables Where variable value will be drawn from SQL database Where variable value will be drawn from SQL database Allow XML output (postponed to later time) Allow XML output (postponed to later time)
3
The Palm® Model Do minor processing on the handheld. Do minor processing on the handheld. Minor data entry Minor data entry Data display (often only a subset of data) Data display (often only a subset of data) Small remote database queries (if capable) Small remote database queries (if capable) Etc. Etc. Do major processing on PC/Laptop Do major processing on PC/Laptop Large data entry Large data entry Extended processing Extended processing Internet (though, some appearing on HH) Internet (though, some appearing on HH) Larger database queries. Larger database queries.
4
Conduits Overall Conduit Design 1. Read HH data to PC (HotSync®) 2. Read PC copy of data into conduit 3. Read PC data 4. Determine type of sync necessary: 5. Write data to HH or PC as necessary The JDBC substitutions happen here.
5
Why Use JDBC Provides a fairly portable database interface (just need JDBC driver, which are usually free with the database.) Provides a fairly portable database interface (just need JDBC driver, which are usually free with the database.) Fairly simple interface to use. Fairly simple interface to use. Combined with Java, GUI Database programs are rather straight-forward to write. (Also, can use JSP/Servlets technology for web.) Combined with Java, GUI Database programs are rather straight-forward to write. (Also, can use JSP/Servlets technology for web.) (For my project) Because I already wrote the Conduit in Java. (For my project) Because I already wrote the Conduit in Java.
6
Simple JDBC Example Class.forName(driverName); // Load Driver Connection con = DriverManager.getConnection(dbURL, username, password); ResultSet rs = con.executeQuery(“Select * from customer”); while (rs.next()) { String customer = rs.getString(“cname”); String customer = rs.getString(“cname”);…}rs.close();con.close();
7
What’s It Good For? Sales manager can write “form letter” (or email) while traveling. Sales manager can write “form letter” (or email) while traveling. Reports can be written during a collaborative meeting without the requirement that someone bring a laptop (inserting data later where not known.) Reports can be written during a collaborative meeting without the requirement that someone bring a laptop (inserting data later where not known.) With dynamic SQL, reports could be programmed while riding the train to work. With dynamic SQL, reports could be programmed while riding the train to work.
8
More Information Palm OS® Development: http://www.palmone.com/us/developers Palm OS® Development: http://www.palmone.com/us/developershttp://www.palmone.com/us/developers Other Palm Resources: http://ardiri.com (look for Palm Development Kit, PilRC, & jCode) Other Palm Resources: http://ardiri.com (look for Palm Development Kit, PilRC, & jCode)http://ardiri.com Conduit Development: http://www.palmos.com/dev/tech/conduits Conduit Development: http://www.palmos.com/dev/tech/conduits http://www.palmos.com/dev/tech/conduits IDE-Based Development: http://www.metrowerks.com/MW/develop/Wireless/PalmOS/Professional/ IDE-Based Development: http://www.metrowerks.com/MW/develop/Wireless/PalmOS/Professional/ http://www.metrowerks.com/MW/develop/Wireless/PalmOS/Professional/ JDBC, JSP, and Servlet Development http://java.sun.com Core Servlets and JavaServer Pages by Marty Hall (© Prentice Hall) (There are many other books on the topic, as well.) JDBC, JSP, and Servlet Development http://java.sun.com Core Servlets and JavaServer Pages by Marty Hall (© Prentice Hall) (There are many other books on the topic, as well.)http://java.sun.com
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.