1 / 23

Delphi 2009 / C++Builder 2009 의 DataSnap 2009 박지훈 . 임프 cbuilder1@borlandforum

Delphi 2009 / C++Builder 2009 의 DataSnap 2009 박지훈 . 임프 cbuilder1@borlandforum.com. Database Access in Delphi/C++Builder. Desktop Applications Client/Server Applications Multi-Tier Applications. 2. Desktop Applications. BDE Local Engine Paradox, dBASE, Access ClientDataSet MyBase

jayden
Download Presentation

Delphi 2009 / C++Builder 2009 의 DataSnap 2009 박지훈 . 임프 cbuilder1@borlandforum

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. Delphi 2009 / C++Builder 2009의 DataSnap 2009 박지훈.임프 cbuilder1@borlandforum.com

  2. Database Accessin Delphi/C++Builder • Desktop Applications • Client/Server Applications • Multi-Tier Applications 2

  3. DesktopApplications • BDE Local Engine • Paradox, dBASE, Access • ClientDataSet • MyBase • XML • XML UTF-8 • Binary 3

  4. Client/Server Applications • (BDE SQL Links -> Desktop Only) • dbExpress • InterBase Express (IBX) • dbGo for ADO 4

  5. dbExpress • 배포 크기 및 시스템 리소스 사용 최소화 • 성능 극대화 • 크로스 플랫폼 (Win32, .NET, …) • 쉬운 개발 • 드라이버 개발 쉬워짐 • 메모리 사용과 네트워크 트래픽 관리 • 지원 데이터베이스: • Oracle 10g, Microsoft SQL Server 2000 & 2005, Sybase SQL Anywhere 9, Sybase 12.5, MySQL 4.1 & 5.0, Informix 9x, IBM DB2 8.x, InterBase, Blackfish SQL

  6. dbExpress – Benefits • Short transaction life • Make any rows editable • Instantaneous sorting and searching • Automatic summary information • View subsets of data • Multiple simultaneous views of data • Calculated fields with no server overhead • Fetch portions or rows • Easier deployment, Easier driver creation

  7. Driver Driver Driver Client Library Client Library Client Library Database Database Database dbExpress Architecture Database applications Reporting applications DataSnap Provider/Resolver dbExpress Components dbExpress core interface

  8. dbExpress 2009 • 유니코드 지원 • 성능을 위해 WideString을 UnicodeString으로 대체함 • 유니코드 지원: Oracle, Interbase, MySQL dbExpress • 직관적인 커넥션 속성 에디터 • Custom driver properties • Support for delegate drivers • Simplified driver packaging • Separate unit and driver package for each driver

  9. InterBase Express (IBX) • IBDatabase - connection to databases • IBTransaction - separate transactions and database connections • IBTable - live dataset on a table or view without SQL • IBQuery - execute any SQL statement returning a result set • IBDataSet - execute any SQL statement returning a result set. • IBStoredProc – execute a stored procedure that returns, at most, one row of information • IBSQL – for data operations that need to be fast and lightweight. • IBUpdateSQL - update read-only datasets • IBSQLMonitor - monitor the communications between application and the InterBase server • IBDatabaseInfo - retrieve info about a particular database • IBEvents - register interest in, and asynchronously handle, events posted by an InterBase server.

  10. dbGo for ADO • TADOConnection - connection component for an ADO data store • TRDSConnection - connection component to an ADO-based application server • TADODataSet - dataset used for retrieving and operating on data • TADOTable - table-type dataset for retrieving and operating on a recordset • TADOQuery - query-type dataset for retrieving and operating on a recordset produced by a valid SQL statement • TADOStoredProc - stored procedure-type dataset for executing stored procedures (may or may not retrieve data) • TADOCommand - component for executing commands (SQL statements that do not return result sets)

  11. Multi-Tier Applications • DataSnap (“MIDAS”) • Remote Data Module, COM based • DataSnap 2009 • DSServerModule/Server Method • Project Indy 11

  12. DataSnap 2009 • 서버/클라이언트 Delphi 컴포넌트 • 100% Object Pascal • 가벼움 • 구축이 쉽다 • COM에 의존하지 않음 • 호환성 • 기존의 RemoteDataModule도 포함 가능 • Some migration required for any COM usage

  13. DataSnap 2009 • New TDSServerModule • 기존의 IAppServer 동기화 프로토콜 지원(TRemoteDataModule과 비슷) • TProviderDataModule에서 상속 • Server Method • Remote Method Invocation for Delphi • Simple. No IDL, just regular Delphi methods. • Public methods on any TPersistent class including TDSServerModule and TRemoteDataModule

  14. DataSnap 2009 • Clients • TSQLServerMethod 컴포넌트 • TSQLStoredProc과 비슷 • Server Method를 stored proc처럼 사용 • Strongly typed client classes • Client proxy generator that provides strongly typed classes to call server methods • TDSProviderConnection 컴포넌트 • TDCOMConnection, TSocketConnection 등을 대체

  15. DataSnap 2009 • 서버 커넥션 • Middle-tier connectivity solution • 클라이언트 드라이버 (100% Object Pascal) • DB vendor clients installed on middle tier • Enables middle tier connection, command caching. • Easy to create new transports • ie Http(s), SSL/TLS, etc

  16. DataSnap Server Database Accelerator Server Methods • Middle-tier database driver deployment • Connection Pooling • Statement, MetaData Caching Remote/Server Data Modules Plain Objects • Method Parameters: • Table readers • DB connection • Scalar values Existing Delphi RDMs, No-COM ServerModules Delphi Delphi / C++ DBX / ADO.NET Connection/Session management and RPC dispatching. JSON/RPC messaging layer TCP/IP transport ADO.NET ASP/Desktop Delphi/C++ DBX Client

  17. COM 기반 DataSnap AppServer를 DBX DataSnap AppServer로 변환하려면 서버 프로젝트의 변환 1. COM 기반 app server의 등록해제 (예: MyAppServer /unregserver) 2. RemoteDataModule 유닛에서 initialization 섹션 삭제 3. 프로젝트에서 tlb / ridl 파일들 삭제 4. RemoteDataModule 유닛에서 UpdateRegistry 선언 및 구현 삭제 5. 프로젝트 메인 폼(컨테이너)에 TDSServer, TDSServerClass, TDSTransport 컴포넌트를 추가하고 서로 연결 6. 클라이언트에서 호출할 인터페이스 메소드들을 public 섹션으로 이동 (protected 섹션에 있었을 것임) 7. 드라이버를 등록하기 위해 프로젝트 어딘가의 uses에 적절한 Dbx* 유닛을 추가할 것. (혹은 런타임 패키지 사용) 예를 들어 Interbase의 경우 DbxInterbase 를 uses에 추가. 클라이언트 프로젝트의 변환 클라이언트 래퍼를 생성하기 위해 DSProxyGen.exe 실행- 생성된 유닛을 프포젝트에 추가- uses에 DbxClient 추가

  18. C++Builder 2009에서의 문제 • 클라이언트 • IDE에서 ClientClass 자동 생성이 안됨 • 서버 • IDE에서 ServerModule 생성이 안됨 • 향후 개선 전망

  19. VCL for the Web Rapid Application Development for the Web Component suite Multi-form applications with state management AJAX support Microsoft Silverlight support Delphi and C++ Builder

  20. VCL for the Web • Page Mode • Similiar to ASP.NET • Pages loosely coupled • Create, Show, Destroy, Redirect approach • No automatic session or state management • Application Mode • RAD for Web applications • Automatic Session and State management • Ajax with extensive security features • Full control over Form and Module lifetime • VCL for the Web‘s strength

  21. Demo

  22. Q&A

More Related