1 / 35

Advanced Vision Application in 3 Tiers

Advanced Vision Application in 3 Tiers. ActiveX DLL (COM DLL). ActiveX DLL (COM DLL). Vb app.exe. Data Object 1. Bus Object 1. Vb app.exe. Data Object 2. Bus Object 2. Data Object 3. Bus Object 3. web page?. Presentation Layer. Business layer. Data Layer. Three Tier Logical Model.

frye
Download Presentation

Advanced Vision Application in 3 Tiers

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. Advanced Vision Application in 3 Tiers

  2. ActiveX DLL (COM DLL) ActiveX DLL (COM DLL) Vb app.exe Data Object 1 Bus Object 1 Vb app.exe Data Object 2 Bus Object 2 Data Object 3 Bus Object 3 web page? Presentation Layer Business layer Data Layer Three Tier Logical Model

  3. Presentation Services provides the interface to the end user of the system   Business Services takes care of business logic or business tasks, validation and computations. Data Services provides the capability and security required to retrieve, insert, update and delete data that is required by the business service

  4. UML Class Diagram • UML (Unified Modeling Language) -- a graphical language for visualizing, specifying, constructing, and documenting software systems. • A class diagram shows • all the classes in your application • what tier each class is in • the relationships between the classes. Order Order Method1() Method2() <Get>Property 1 <Get>Property 2 <Let>Property 3 Order Class (Expanded) Order Class

  5. Sample Class Diagram

  6. Designing 3 Tier Systems • Most Important Guidelines • Presentation layer • should not contain any information or names that directly relate to the data source or data schema. • should not require a reference to ADO library • should not contain any business logic • Business layer • should contain all calculations and validation. • should not query the database directly • should not communicate directly with the user • Data layer • should not contain business logic • should not communicate directly with the user

  7. <<Form>> frmPatient <<Class Module>> clsInsuranceData <<Class Module>> clsPatient <<Class Module>> clsPatientData <<Class Module>> clsInsurance User Services Business Services Data Services

  8. clsPatient Properties

  9. clsPatient Methods

  10. clsPatient Methods Events

  11. clsInsurance Properties Methods

  12. clsInsurance Events

  13. clsPatientData Properties

  14. clsPatientData Methods

  15. clsPatientData Methods Events

  16. clsInsuranceData Properties Methods Events

  17. Form Load Required Tasks • Create connection • Create patient recordset • Create insurance recordset • Set Connection String • Open the Connection • Open Patient Recordset • Open Insurance Recordset • Fill Insurance Combo box • Close Insurance Recordset • Set Sort Order • Set Form Values • DisplayRecordCount

  18. Form Load Presentation Business Data AVB.mdb Set mobjPatient = New clsPatient clsPatientData Class_Initialize clsPatient Class_Initialize • Create Conn • Create Patient RecordSet • Set Conn String • Open Conn • Open Patient Recordset • Move First • Create clsPatient object • Create clsPatientData object • Properties return values of current record • UpdateProperties

  19. Form Load Required Tasks • Create connection - DONE • Create patient recordset- DONE • Create insurance recordset • Set Connection String - DONE • Open the Connection- DONE • Open Patient Recordset - DONE • Open Insurance Recordset • Fill Insurance Combo box • Close Insurance Recordset • Set Sort Order • Set Form Values • DisplayRecordCount

  20. Form Load Presentation Business Data AVB.mdb clsInsuranceData Class_Initialize Set mobjInsurance = New clsInsurance clsInsurance Class_Initialize • Create Conn • Create Insurance RecordSet • Set Conn String • Open Conn • Open Insurance Recordset • Create clsInsurance object • Create clsInsuranceData object

  21. Form Load Required Tasks • Create connection - DONE • Create patient recordset- DONE • Create insurance recordset-DONE • Set Connection String - DONE • Open the Connection- DONE • Open Patient Recordset - DONE • Open Insurance Recordset - DONE • Fill Insurance Combo box • Close Insurance Recordset • Set Sort Order • Set Form Values • DisplayRecordCount

  22. Form Load Presentation Business Data AVB.mdb clsInsuranceData InsuranceRecords Property mobjInsurance.GetInsuranceList Ins clsInsurance GetInsuranceList Method • Returns Insurance Recordset • Call GetInsurance List Method, Pass the array Ins to hold list • Calls GetRows method of clsInsuranceData. • InsuranceRecords • Sets ByRef array equal to result of GetRows • Fill combobox with contents of Ins Array

  23. Form Load Required Tasks • Create connection - DONE • Create patient recordset- DONE • Create insurance recordset-DONE • Set Connection String - DONE • Open the Connection- DONE • Open Patient Recordset - DONE • Open Insurance Recordset - DONE • Fill Insurance Combo box - DONE • Close Insurance Recordset • Set Sort Order • Set Form Values • DisplayRecordCount

  24. Form Load Presentation Business Data AVB.mdb clsInsuranceData Class_Terminate Set mobjInsurance = Nothing clsInsurance Class_Terminate • Close Insurance Recordset • Close Conn • Terminate Insurance Recordset • Terminate Connection • Terminate Insurance Object • Set mobjInsData = Nothing

  25. Form Load Required Tasks • Create connection - DONE • Create patient recordset- DONE • Create insurance recordset-DONE • Set Connection String - DONE • Open the Connection- DONE • Open Patient Recordset - DONE • Open Insurance Recordset - DONE • Fill Insurance Combo box - DONE • Close Insurance Recordset- DONE • Set Sort Order • Set Form Values • DisplayRecordCount

  26. Form Load Presentation Business Data AVB.mdb mobjPatient.Sort "Patient Number" clsPatientData.Sort clsPatient.Sort • Selects Field Name based on string that is passed • Calls sort method of patient recordset • Raises DataChange Event • Calls Sort Method of clsPatient • Calls Sort Method of clsPatientData mobjPatientData_DataChange() mobjPatient_PropertyChange • Properties return values of current record • UpdatesProperties • Raises Property Change Event • Assigns Form Values

  27. Form Load Required Tasks • Create connection - DONE • Create patient recordset- DONE • Create insurance recordset-DONE • Set Connection String - DONE • Open the Connection- DONE • Open Patient Recordset - DONE • Open Insurance Recordset - DONE • Fill Insurance Combo box - DONE • Close Insurance Recordset- DONE • Set Sort Order- DONE • Set Form Values- DONE • DisplayRecordCount

  28. Form Load Presentation Business Data AVB.mdb mobjPatient.AbsolutePosition clsPatientData.AbsolutePosition clsPatient.AbsolutePosition • mrsPatient.AbsolutePosition • Calls absolute position method of mobjPatient • Calls clsPatientData.AbsolutePosition mobjPatient.RecordCount clsPatientData.RecordCount clsPatient.RecordCount • mrsPatient. • RecordCount • Calls RecordCount Method of mobjPatient • Calls clsPatientData.RecordCount

  29. Form Load Required Tasks • Create connection - DONE • Create patient recordset- DONE • Create insurance recordset-DONE • Set Connection String - DONE • Open the Connection- DONE • Open Patient Recordset - DONE • Open Insurance Recordset - DONE • Fill Insurance Combo box - DONE • Close Insurance Recordset- DONE • Set Sort Order- DONE • Set Form Values- DONE • DisplayRecordCount- DONE

  30. MoveLast Required Tasks • mrsPatient.MoveLast • DisplayRecordCount • Set Form Elements

  31. MoveLast Presentation Business Data clsPatientData.MoveLast mobjPatient.MoveLast clsPatient.MoveLast • mrsPatient.MoveLast • Raise DataChange Event • Calls MoveLast method of mobjPatient • Calls clsPatientData.MoveLast AVB.mdb mobjPatientData_DataChange() mobjPatient_PropertyChange • Properties return values of current record • UpdatesProperties • Raises Property Change Event • Assigns Form Values

  32. Delete Required Tasks • Create Command object • Set Connection String • Set Command String • Execute Command • Requery Recordset • Check to see if deleted last record • Update form elements

  33. Delete Presentation Business Data clsPatientData.Delete mobjPatient.Delete clsPatient.Delete • Creates Command • Sets Conn • Sets Command Text • Executes • Requeries • Raises DataChange Event • Calls Delete method of mobjPatient • Calls clsPatientData.Delete (passes Patient ID) AVB.mdb mobjPatient_PropertyChange mobjPatientData_DataChange() • Properties return values of current record • Assigns Form Values • UpdatesProperties • Raises Property Change Event

  34. Form Unload Required Tasks • Close Patient RecordSet • Close Connection • Set Recordset = nothing • Set Connection = nothing

  35. Form Unload Presentation Business Data Set mobjPatient = Nothing clsPatientData class_Terminate clsPatient Class_Terminate • Set mobjPatient to Nothing • Set mobjPatientData= Nothing • Close Recordset • Close Conn • Set RS = nothing • Set Conn = nothing AVB.mdb

More Related