delphi 2009 / c++builder 2009 의 datasnap 2009 박지훈 . 임프 cbuilder1@borlandforum

23
22-6-9 목목목 Delphi 2009 / C++Builder 2009 목 DataSnap 2009 목목목 . 목목 [email protected]

Upload: jayden

Post on 04-Feb-2016

148 views

Category:

Documents


0 download

DESCRIPTION

Delphi 2009 / C++Builder 2009 의 DataSnap 2009 박지훈 . 임프 [email protected]. 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 - PowerPoint PPT Presentation

TRANSCRIPT

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

23-4-22 토요일

Delphi 2009 / C++Builder 2009 의DataSnap 2009

박지훈 . 임프[email protected]

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

23-4-22 토요일

Database Accessin Delphi/C++Builder

• Desktop Applications

• Client/Server Applications

• Multi-Tier Applications

2

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

23-4-22 토요일

Desktop Applications• BDE Local Engine

– Paradox, dBASE, Access

• ClientDataSet–MyBase

•XML•XML UTF-8•Binary

3

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

23-4-22 토요일

Client/Server Applications• (BDE SQL Links -> Desktop Only)

• dbExpress

• InterBase Express (IBX)

• dbGo for ADO

4

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

23-4-22 토요일

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

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

23-4-22 토요일

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

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

23-4-22 토요일

dbExpress Architecture

DataSnap Provider/Resolver

dbExpress core interface

Database applications

dbExpress Components

Reporting applications

Client Library

Driver

Database

Client Library

Driver

Database

Client Library

Driver

Database

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

23-4-22 토요일

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

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

23-4-22 토요일

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.

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

23-4-22 토요일

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)

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

23-4-22 토요일

Multi-Tier Applications• DataSnap (“MIDAS”)

– Remote Data Module, COM based

• DataSnap 2009– DSServerModule/Server Method

• Project Indy

11

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

23-4-22 토요일

DataSnap 2009• 서버 / 클라이언트 Delphi 컴포넌트

– 100% Object Pascal

• 가벼움– 구축이 쉽다– COM 에 의존하지 않음

• 호환성– 기존의 RemoteDataModule 도 포함 가능

• Some migration required for any COM usage

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

23-4-22 토요일

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

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

23-4-22 토요일

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 등을 대체

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

23-4-22 토요일

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

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

23-4-22 토요일

TCP/IP transport

JSON/RPC messaging layer

DataSnap Server

Existing DelphiRDMs, No-COMServerModules

• Middle-tier database driver deployment • Connection Pooling• Statement, MetaData Caching

Delphi

Connection/Session management and RPC dispatching.

Database Accelerator

Remote/ServerData Modules

Server Methods

DBX / ADO.NET

Method Parameters:• Table readers• DB connection• Scalar values

Delphi / C++

Plain Objects

Delphi/C++DBX Client

ADO.NETASP/Desktop

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

23-4-22 토요일

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 추가

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

23-4-22 토요일

C++Builder 2009 에서의 문제• 클라이언트

– IDE 에서 ClientClass 자동 생성이 안됨• 서버

– IDE 에서 ServerModule 생성이 안됨

• 향후 개선 전망

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

23-4-22 토요일

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

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

23-4-22 토요일

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

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

23-4-22 토요일

Demo

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

23-4-22 토요일

Q&A

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

23-4-22 토요일