1 / 57

Extended Systems

Extended Systems. OneBridge Mobile Agent December 2002. Extended Systems. The History of PSP. PSP History. PSP is a markup language (Pocket Server Pages) HTML/XML based Approx. 66 PSP-specific tags + HTML PSP tags support mobile applications OMA (OneBridge Mobile Agent)

binah
Download Presentation

Extended Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Extended Systems OneBridge Mobile Agent December 2002

  2. Extended Systems The History of PSP

  3. PSP History PSP is a markup language (Pocket Server Pages) • HTML/XML based • Approx. 66 PSP-specific tags + HTML • PSP tags support mobile applications OMA (OneBridge Mobile Agent) • Web Interface for both online and offline use • Processes PSP pages • Rich UI

  4. PSP History Using PSP requires a basic understanding of HTML and web development. Who is PSP for? • Web developers • Novice developers eager to create applications of moderate complexity • Experienced developers eager to rapidly generate complex online/offline data-driven applications

  5. PSP History Why chose PSP? • Rapid application development and prototyping • Built-in support for mobile applications • Signature capture • Online/offline database access • Print HTML on portable printers via IR • Familiar web interface • Applications are easy to modify • PSP is an interpreted language • No compiler or special tools required to write PSP

  6. Chris Leffel: Fix this slide. Maybe needs a graphic? How OMA works • The user clicks on a link or executes a form, or (at startup), a default page is selected. • The page is loaded from the database, from the file system, or from an HTTP server. • The file is scanned from beginning to end. PSP tags are parsed and interpreted. All non-PSP tags are output to the output file. (The output file is located at \Temp\Report.htm). • The resulting HTML file (from the non-PSP tags, and from the interpreted PSP tags) is passed to an HTML rendering control that displays the result on the screen. • OMA waits for the next user action to provoke the execution of the next page.

  7. Extended Systems Working with the Mobile Device

  8. Required Files for development • Embedded Visual Tools • PocketPC 2002 SDK • OMA desktop install

  9. OMA File Server • Allows you to easily move files from your development computer to the emulator or device. • Sets the default OMA application to run.

  10. Extended Systems HTML Overview

  11. HTML Overview All Mobile Agent pages are based on HTML documents All Mobile Agent pages are based on HTML documents HelloWorld.txt <!-– Hello World page --> <html> <body> <h1> Hello World!</h1> </body> </html>

  12. HTML Overview Forms are processed similar to the way they are in web programming Forms are processed similar to the way they are in web programming formCapture.txt <html> <body> <form method=post ACTION=“formShow.txt"> What is your name? <input type=“text” name=“username” value=“John Doe”><input type=submit value="submit"> </form> </body> </html>

  13. HTML Overview Forms are processed similar to the way they are in web programming Forms are processed similar to the way they are in web programming formShow.txt <html> <body> Hello! <data value=username> </body> </html>

  14. Extended Systems Mobile Databases

  15. Chris Leffel: Fix this slide Mobile Databases • Need an intro slide

  16. Mobile Databases PSP uses SQL to access databases • The <recordset...> tag is used to open recordsets <recordset name=“rs1” sql=“select * from customers”> Name: <data value=“rs1.CompanyName”><br> </recordset> • See MS SQL Server CE help for SQL help

  17. Mobile Databases Creating a database using SQL and PSP <database connectionstring= "Provider=Microsoft.SQLSERVER.OLEDB.CE.1.0; Data Source=\windows\oma.sdf"> <recordset name=“rs1” sql='create database "\Program Files\OneBridge\trainingdemo\demo.sdf" ' action=“open”/> <recordset name=“rs1” action=“close”/>

  18. Mobile Databases Creating a table using SQL and PSP <recordset name=“rs1” sql=“create table Customers (CustomerID nvarchar(64), CompanyName nvarchar(64), ContactName nvarchar(64), ContactTitle nvarchar(64), Address nvarchar(64), City nvarchar(64), Region nvarchar(16), PostalCode nvarchar(10), Country nvarchar(16), Phone nvarchar(24), Fax nvarchar(24))” action=“open”> <recordset name=“rs1” action=“close”/>

  19. Mobile Databases Two database providers supported for Windows CE • SSCE: SQL Server CE Provider • Very fast and efficient for large databases • Few SQL limitations • CEDB: Pocket Access Provider • Databases are easier to create - ActiveSync • Slow, SQL is limited • Database size limited to 64K records

  20. Extended Systems View Libraries

  21. View Libraries • A set of PSP defined tags used to render database data • Provides a framework delivering easily modified applications. • Automatically generates code to handle sorting and pagination • Makes presentation of database information easy to define and manage

  22. View Libraries List View with page selection popup Details View

  23. View Libraries – list view What does a list view do? • List pagination • Column sorting • Detail Linking

  24. View Libraries – list view • Defined in generateviews.txt – “customer view” • Used on showall_customers.txt

  25. View Libraries – detail view What does a detail view do? • Preformatted reusable HTML • Easily linked to list views

  26. View Libraries – detail view • Defined in generateviews.txt – “customer details” • Used on customer_details.txt

  27. View Libraries – search view What does a search view do? • Creates HTML form elements dynamically • Developer does not need to be concerned with HTML formatting

  28. View Libraries – search view • Defined in generateviews.txt – “customer search” • Used on customer_search.txt

  29. View Libraries – edit view Why create an edit view? • Consistent UI • No need to build dynamic form elements using PSP

  30. View Libraries – edit view • Defined in generateviews.txt – “customer details” • Used on edit_customer.txt

  31. View Libraries – edit view Saving from an edit view • Copy form variables to record set values • Save the recordset & redirect <var "rsView.CompanyName=g_nameEdit"> <recordset name=rsView action=update> <redirect href="sys://customer_details.txt">

  32. View Libraries – search view What does a search view do? • Creates HTML form elements dynamically • Developer does not need to be concerned with HTML formatting

  33. View Libraries – search view • Defined in generateviews.txt – “customer search” • Used on customer_search.txt

  34. Extended Systems Variables & Conditional Logic

  35. Variables and Data Types 3 data types: • Number - All numeric and boolean data • String - Character data (Unicode by default) • Date - Date and Time values Variables are global by default Page level local variables may be specified. When possible, use local variables!

  36. Variables and Data Types Declaring variables • A local string: <var expr=“local string s=‘this is a string’”/> <var “local s=‘this is a string’”> Using variables • An expression: <var expr=“total=total+price*discount”/> <var “total=total+price*discount”> Shortcut forms are easier to read, but not XML compliant!

  37. Conditional Logic <if>…</if> Conditionally process code Example: <if "x+y<0"> Less than zero <else> Greater than or equal to zero </if>

  38. Conditional Logic <while>… </while> Used for conditional looping Example: <var "x=0"> <while "x<10"> <var "x=x+1"> <data value=x><br> </while>

  39. Extended Systems UI Elements

  40. Pop Up Windows • Give feedback to the user without changing the screen they are looking at. • See authenticate.txt for sample code.

  41. UI Controls <BUTTON> Allows buttons to be set programmatically. Example: <NAME="BACK" HREF="index.txt“ SCOPE=“global”>

  42. UI Controls <MENUITEM> Allows the navigation menu to be set programmatically <MenuItem Name = item identifier, Value = text, Href = link, Action = add | remove, default = add Image = path/name of bitmap /> Example: <MenuItem name=”cust” value=”Customers” href=“cust.txt”/>

  43. UI Controls Date Pick To specify a date-pick control, use "cal:"+optional (default) date as the content of the textarea block. Example: <AddViewItem label=“thedate" name=“theDate"> <textarea name="varDate" cols=12 rows=1>cal:1/1/2002</textarea> </AddViewItem>

  44. UI Controls Time Pick To specify a time-pick control, use "tim:"+optional (default) time as the content of the textarea block. Example: <AddViewItem label="Time" name="g_time"> <textarea name="varTime" cols=12 rows=1>tim:14:00</textarea> </AddViewItem>

  45. UI Controls Signature Capture Example: <AddViewItem label="Time" name="g_time"> <textarea name="Signature" cols=16 rows=5>sig:</textarea> </AddViewItem>

  46. Chris Leffel: Fix this slide UI Controls dbSelect Example:

  47. Extended Systems Debugging

  48. Debugging • OMA can generate a log file • The log file shows details of PSP code execution • Logging may be activated manually or via code • Debugging online applications can be difficult • Server problem or client problem? • Very important to have a tool (tcpTrace) • Tool shows HTTP request and response data

  49. Chris Leffel: Fix this slide Debugging sysMessage Example:

More Related