Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 8628 – n-tier Client-ServerArchitectures, Dr. Guimaraes TaskMaster Ken Crosson CS 8628, Summer 2003 Priority Manager.

Similar presentations


Presentation on theme: "CS 8628 – n-tier Client-ServerArchitectures, Dr. Guimaraes TaskMaster Ken Crosson CS 8628, Summer 2003 Priority Manager."— Presentation transcript:

1 CS 8628 – n-tier Client-ServerArchitectures, Dr. Guimaraes TaskMaster Ken Crosson CS 8628, Summer 2003 Priority Manager

2 CS 8628 – n-tier Client-ServerArchitectures, Dr. Guimaraes Sequence of Tasks Add task on handheld or desktop Set task attributes (priority, description, due date, etc.) Synchronize remote and consolidated databases

3 CS 8628 – n-tier Client-ServerArchitectures, Dr. Guimaraes Project Description This program tracks prioritized tasks. The user is able to create, categorize, prioritize, and update tasks, and synchronize his task list between his handheld and desktop computers. The program uses a SQL Server database as the consolidated database, with an Ultralite database on the handheld.

4 CS 8628 – n-tier Client-ServerArchitectures, Dr. Guimaraes E-R Diagram

5 CS 8628 – n-tier Client-ServerArchitectures, Dr. Guimaraes Logical Schema This schema was produced in Microsoft Visio

6 CS 8628 – n-tier Client-ServerArchitectures, Dr. Guimaraes Physical Schema (DDL) CREATE TABLE [dbo].[tbActivity] ( [ActivityID] [uniqueidentifier] NOT NULL, [Name] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [Description] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) ON [PRIMARY] GO CREATE TABLE [dbo].[tbCategory] ( [CategoryID] [uniqueidentifier] NOT NULL, [Name] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [Description] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) ON [PRIMARY] GO CREATE TABLE [dbo].[tbNote] ( [NoteID] [uniqueidentifier] NOT NULL, [TaskID] [uniqueidentifier] NOT NULL, [DateCreated] [datetime] NULL, [Note] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) ON [PRIMARY] GO CREATE TABLE [dbo].[tbStatus] ( [StatusID] [int] IDENTITY (1, 1) NOT NULL, [Name] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [Description] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) ON [PRIMARY] GO CREATE TABLE [dbo].[tbTask] ( [TaskID] [uniqueidentifier] NOT NULL, [Name] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [Description] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [DateCreated] [datetime] NULL, [DateDue] [datetime] NULL, [DateDueOriginal] [datetime] NULL, [DateCompleted] [datetime] NULL, [CategoryID] [uniqueidentifier] NOT NULL, [Priority] [int] NULL, [StatusID] [int] NOT NULL ) ON [PRIMARY] GO CREATE TABLE [dbo].[tbTaskActivity] ( [TaskActivityID] [uniqueidentifier] NOT NULL, [TaskID] [uniqueidentifier] NOT NULL, [Note] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [DateCreated] [datetime] NULL, [ActivityID] [uniqueidentifier] NOT NULL ) ON [PRIMARY] GO

7 CS 8628 – n-tier Client-ServerArchitectures, Dr. Guimaraes Matrix: Forms vs. Tables Tables FormsForms ActivityTaskCategoryTaskActivityNoteStatus ActivityCRUD TaskCRCRUDCRCRUD R CategoryCRUD TaskActivityRRCRUD NoteCRUD StatusR

8 CS 8628 – n-tier Client-ServerArchitectures, Dr. Guimaraes Publication Script # 1 CREATE PUBLICATION pub_tasks ( TABLE tbTask (TaskID, Name, Description, DateCreated, DateDue, Status, Priority, Category ) );

9 CS 8628 – n-tier Client-ServerArchitectures, Dr. Guimaraes Synchronization Script CREATE SYNCHRONIZATION SUBSCRIPTION TO pub_task FOR sub_user TYPE 'tcpip' ADDRESS 'host=localhost'

10 CS 8628 – n-tier Client-ServerArchitectures, Dr. Guimaraes Difficulties Encountered Unfamiliar technology has made this very difficult. AppForge product is somewhat less user-friendly than it could be. New technology provides faster, easier ways to achieve the same result.

11 CS 8628 – n-tier Client-ServerArchitectures, Dr. Guimaraes Screen Snapshot # 1

12 CS 8628 – n-tier Client-ServerArchitectures, Dr. Guimaraes Code Sample # 1 Public Sub LoadTasks() On Error GoTo ErrHandler Dim conn_parms As String Dim open_parms As String Dim schema_parms As String conn_parms = "uid=DBA;pwd=SQL" open_parms = conn_parms & ";" & "FILE_NAME=" & App.Path & "\TaskMaster.udb" schema_parms = open_parms & ";" & "SCHEMA_FILE=" & App.Path & "\TaskMaster.usm" On Error Resume Next Set Connection = DatabaseMgr.OpenConnection(open_parms) If Err.Number <> ulSQLE_NOERROR Then If Err.Number = ULSQLCode.ulSQLE_DATABASE_NOT_FOUND Then Err.Clear Set Connection = DatabaseMgr.CreateDatabase(schema_parms) Else MsgBox Err.Description & Err.Source End If Set oTaskTable = Connection.GetTable("tbTask") oTaskTable.Open oTaskTable.MoveBeforeFirst oTaskTable.MoveFirst If Err.Number <> ULSQLCode.ulSQLE_NOERROR Then MsgBox Err.Description ExitHandler: Exit Sub ErrHandler: RaiseErr Me, "LoadTasks" End Sub

13 CS 8628 – n-tier Client-ServerArchitectures, Dr. Guimaraes Code Sample # 2 Private Sub AddNew() Dim sName As String Dim sDescription As String Dim dDate As Date Dim nStatus As Integer Dim nCategory As Integer Dim nPriority As Integer sName = txtName.Text sDescription = txtDescription.Text If IsDate(txtDate.Text) Then dDate = CDate(txtDate.Text) Else dDate = Date End If nStatus = cboStatus.ListIndex nCategory = cboCategory.ListIndex nPriority = cboPriority.ListIndex On Error GoTo InsertError oTaskTable.InsertBegin oTaskTable.Column("Name").StringValue = sName oTaskTable.Column("Description").StringValue = sDescription oTaskTable.Column("DateDue").DatetimeValue = dDate oTaskTable.Column("Status").IntegerValue = nStatus oTaskTable.Column("Category").IntegerValue = nCategory oTaskTable.Column("Priority").IntegerValue = nPriority oTaskTable.Insert oTaskTable.MoveLast DisplayCurrentRow Exit Sub InsertError: MsgBox "Error: " & CStr(Err.Description) End Sub

14 CS 8628 – n-tier Client-ServerArchitectures, Dr. Guimaraes Conclusion AppForge’s MobileVB environment is an acceptable way to develop for for the PocketPC, but in many ways is inferior to the environment provided by VisualStudio.NET. Ultralite for MobileVB is a useful tool for deploying and synchronizing remote databases, but could stand to be more intuitive.


Download ppt "CS 8628 – n-tier Client-ServerArchitectures, Dr. Guimaraes TaskMaster Ken Crosson CS 8628, Summer 2003 Priority Manager."

Similar presentations


Ads by Google