Mais conteúdo relacionado Semelhante a Delphi / C++Builder 業務アプリケーション 刷新実践法: BDEを使った業務アプリを移行ツールで最新化 (20) Delphi / C++Builder 業務アプリケーション 刷新実践法: BDEを使った業務アプリを移行ツールで最新化 1. © 2017 Embarcadero Technologies, Inc.
All rights reserved. Proprietary and confidential.
BDEを使った業務アプリを
移行ツールで最新化
Delphi / C++Builder
業務アプリケーション 刷新実践法
2017年2月3日(金) 14:00~17:00
2. © 2017 Embarcadero Technologies, Inc.
All rights reserved. Proprietary and confidential.
BDEを使った業務アプリを
移行ツールで最新化
3. 3© 2017 Embarcadero Technologies, Inc. All rights reserved. Proprietary and confidential. #embtwebi_jp
「BDEを使った業務アプリを移行ツールで最新化」アジェンダ
セミナー対象:BDEを使用中のコード資産をお持ちの方
時間: 約50分
• BDEと取り巻く環境
• 既存のコードは財産
• 移行する上でのポイント
• 移行ツールと移行手順実践
• 移行後の広がりと最新化
4. 4© 2017 Embarcadero Technologies, Inc. All rights reserved. Proprietary and confidential. #embtwebi_jp
BDEとは
Borland Database Engine
• Delphi 6以前 にバンドル
• 最新バージョンversion 5.2
優れたデータベース・ミドルウエア
• dBase やParadox, Microsoft Access などに特殊ドライバなしでアクセス
• InterBase, SQL Server, Oracle, DB2などにSQL Linkドライバでアクセス
データベースにビジュアルコンポーネントでアクセス
• TTable, TQuery, TStroedProc, TDataBase, TSession, TUpdateSQL…
5. 5© 2017 Embarcadero Technologies, Inc. All rights reserved. Proprietary and confidential. #embtwebi_jp
2017年におけるBDEの現状
Borland Database Engine
• Delphi6以前 (2001年)に付属 :Windows XP 発表年
• 最終バージョンversion 5.2 :2002 年以降アップデートなし
• 製品のライフサイクル :サポート終了
• Desktop DBのためのdBASE, Paradoxが主たるターゲット
• 対応データベースが最新ではない
• マルチデバイス・クロスプラットフォーム開発非対応
• Unicodeに対応していない
• 16bit / 32bitの開発まで
Windows XPまでサポート対象OS
• ユーザーアカウントコントロールの考慮をしていなお
• Windows XP自体のサポート終了
6. 6© 2017 Embarcadero Technologies, Inc. All rights reserved. Proprietary and confidential. #embtwebi_jp
BDEサポート範囲のままではマイナスの資産?
Windows XPのまま運用
• セキュリティリスク
デスクトップDBで運用
• マルチデバイス運用に対し接続の壁
新データベース接続の壁
• 古いクライアントドライバのみ
• Unicodeデータベース採用時の壁
サーバー、ハードウエアの老朽化
• 古いServer OS、相対的なパフォーマンスの低下
開発した資産が重荷へ…
• 多数のC/Sプロジェクト、FAアプリケーション
7. 7© 2017 Embarcadero Technologies, Inc. All rights reserved. Proprietary and confidential. #embtwebi_jp
移行で古いプロジェクトをプラスの資産に
データベースミドルエアの更新
• 少ない労力で旧BDEから最新FireDACへ更新可能
• 既存のコード資産を生かして最新環境へ
移行によってプロジェクトをリフレッシュ
• 新データベースへの移行
• 新サーバーへの移行
• 新OSの適用
8. 8© 2017 Embarcadero Technologies, Inc. All rights reserved. Proprietary and confidential. #embtwebi_jp
移行においてのポイントとなる点
OSの更新、64bit化
• 32bit → 64bit、UACの考慮
データベース、サーバーの移行
• デスクトップDB: Paradox → InterBase, Oracle 8 → Oracle11g…
データベース接続ミドルウェアの更新
• BDE → FireDAC、コンポーネントの書換え
サードパーティ ライブラリ、コンポーネント
• FastReport, etc
Unicode化
• Ansi → Unicode : Charのサイズ、PCharのでの取り扱い、File I/O
9. 9© 2017 Embarcadero Technologies, Inc. All rights reserved. Proprietary and confidential. #embtwebi_jp
BDEの移行先としての:「FireDAC」
最新データベースミドルウエア・アクセスコンポーネント
• BDEのコンポーネントに対応するコンポーネントを実装
• Delphi / C++Builder 10.1 Berlinで利用可※
• 多数かつ最新のデータベース対応
• VCLのまま使える
• 移行ツールあり
• マルチデバイス対応 (FireMonkey利用時)
※ローカルデータベースアクセスはPro版以上、リモートデータベースアクセスは Pro版 + FireDAC Add-on Pack以上
10. 10© 2017 Embarcadero Technologies, Inc. All rights reserved. Proprietary and confidential. #embtwebi_jp
BDEとFireDACの親和性
親和性の高い対応コンポーネント
BDE
TDataBase
TSession
TTable
TQuery
TStoredProc
TUpdateSQL
TBatchMove
TDatabase
TQuery
TTable
TDataSource
TFDConnection
TFDQuery
TFTable
TFDConnection
TFDManager
TFDTable
TFDQuery
TFDStoredProc
TFDUpdateSQL
TFDDataMove
TFDPhysXXXXDriveLink
TFDGUIxWaitCursor
TDBGrid
11. 11© 2017 Embarcadero Technologies, Inc. All rights reserved. Proprietary and confidential. #embtwebi_jp
DBMS
FireDAC
Delphi/C++Builder
FireDACの構成
FireMonkey および VCL
非ビジュアルコンポーネント[Comp] ビジュアルコンポーネント/フォーム [GUIx]
ローカルストレージ [DatS]
データアダプタ [DApt]
デバッグ/パフォーマンスモニタ
[Moni]
ネイティブドライバ [Phys] ブリッジドライバ [Phys]
Oracle DB2
MS
SQL
InterBase
Firebird
PG
SQL
My
SQL
Sybase
ASA
SQLite
MS
Access
ODBC dbExp
DBMSクライアントソフトウエア
Oracle DB2
MS
SQL
InterBase
Firebird
PG
SQL
My
SQL
Sybase
ASA
SQLite
MS
Access
Sybase
ASE
Informix …
ODBCODBCdbExpress
ドライバ
ODBCODBCODBC
ドライバ
FireDACがDBへのアクセスをコンポーネントとして提供
12. 12© 2017 Embarcadero Technologies, Inc. All rights reserved. Proprietary and confidential. #embtwebi_jp
reFind
• 無料
• コマンドラインツール
Delphi Parser
• GUI付
• 有料
• 変更ルールをカスタマイズ
BDE to FireDAC 移行ツール
13. © 2016 Embarcadero Technologies, Inc. All rights reserved. Proprietary and confidential. 13
ReFind:
BDEコンポーネントを
FireDACコンポーネントに
移行する実践
14. 14© 2017 Embarcadero Technologies, Inc. All rights reserved. Proprietary and confidential. #embtwebi_jp
BDEの移行に必要となる主な手順
デモのポイント
ツールで一括変換
BDEプロジェクト→FireDACで動作
FireDAC のログツール
BDE to FireDAC : コンポーネント変換
データベースマッピングの調整
接続設定プロパティの更新
非使用コンポーネントコードの削除・変更
新規コンポーネントの追加 (ドライバ、Wait)
互換性のないプロパティの調整
API・クエリの更新
https://community.embarcadero.com/blogs/entry/delphi-c-builder-bde-japan
15. 15© 2017 Embarcadero Technologies, Inc. All rights reserved. Proprietary and confidential. #embtwebi_jp
デモ 参考:Delphi 6 での BDE使用画面
参考となる資料:DockWiki「FireDAC_への_BDE_アプリケーションの移行」
http://docwiki.embarcadero.com/RADStudio/Berlin/ja/FireDAC_への_BDE_アプリケーションの移行
16. 16© 2017 Embarcadero Technologies, Inc. All rights reserved. Proprietary and confidential. #embtwebi_jp
FireDAC データマッピング
参考Dockwiki - データ型マッピング :
http://docwiki.embarcadero.com/RADStudio/Berlin/ja/データ型マッピング(FireDAC)
プロパティ 説明
PrecMin/PrecMax ソース データ型の数値精度の範囲を定義します。
ScaleMin/ScaleMax ソース データ型の数値スケールの範囲を定義します。
SizeMin/SizeMax ソース データ型の文字列長の範囲を定義します。
SourceDataType ソース(変換元)データ型
TargetDataType ターゲット(変換先)データ型
NameMask 列名マスク
TypeMask 列のデータ型マスク
17. 17© 2017 Embarcadero Technologies, Inc. All rights reserved. Proprietary and confidential. #embtwebi_jp
FireDAC移行後は
FireDACの機能を生かそう
• DML配列機能
• マクロ…
三層への対応
• リモートデータベース化
• 中間サーバーの構築
マルチデバイス開発と対応
• 中間サーバーへのモバイルデバイス接続
• クロスプラットフォーム開発
18. 18© 2017 Embarcadero Technologies, Inc. All rights reserved. Proprietary and confidential. #embtwebi_jp
移行後に検討可能なアプリケーション形態
RDBMS
Windowsクライアント
典型的なC/Sシステム
レガシーシステム
独自のプロトコルで接続
EMS
DataSnap
中間サーバー
IoTデバイス
モバイル
クライアント
ビッグデータ
デスクトップ
クライアント
HTTP(S)
REST
JSON
HTTP(S)
REST
JSON
HTTP(S)
REST
JSON
クラウドサービス
RAD Server
IntraWeb
VCL for Web
ウェブ
ER Studio
19. 19© 2017 Embarcadero Technologies, Inc. All rights reserved. Proprietary and confidential. #embtwebi_jp
「BDEを使った業務アプリを移行ツールで最新化」まとめ
セミナー対象:BDEを使用中のコード資産をお持ちの方
時間: 約50分
• BDEと取り巻く環境
• 既存のコードは財産
• 移行する上でのポイント
• 移行ツールと移行手順実践
• 移行後の広がりと最新化
20. 20© 2017 Embarcadero Technologies, Inc. All rights reserved. Proprietary and confidential. #embtwebi_jp
FireDAC : 参考となる資料
Embarcadero DockWiki
• FireDAC
http://docwiki.embarcadero.com/RADStudio/Berlin/ja/FireDAC
• FireDAC への BDE アプリケーションの移行
http://docwiki.embarcadero.com/RADStudio/Berlin/ja/FireDAC_への_BDE_アプリケーションの移行
• データ型マッピング(FireDAC)
http://docwiki.embarcadero.com/RADStudio/Berlin/ja/データ型マッピング(FireDAC)
28thデベロッパーキャンプにおけるFireDACの紹介
• はじめてのFireDAC : PDF
http://edn.embarcadero.com/article/images/43368/a2.pdf
• YouTube
https://www.youtube.com/watch?v=lDD6z4NuGEo
https://www.youtube.com/watch?v=ZcLu6yq3wHE
21. 21© 2017 Embarcadero Technologies, Inc. All rights reserved. Proprietary and confidential. #embtwebi_jp
移行 : 参考となる資料
エンバカデロ Webサイト
• RAD Studioマイグレーションセンター http://www.embarcadero.com/jp/rad-in-
action/migration-upgrade-center
エンバカデロ ホワイトペーパーダウンロード
• RAD Studio / Delphi / C++Builder 旧バージョンからの移行
http://forms.embarcadero.com/rad-migration-papers
エンバカデロ デベロッパーズ ネットワーク
• BDE から FireDAC への移行 - Paradox から InterBase の場合
http://edn.embarcadero.com/jp/article/42974
エンバカデロ 日本人ブログ
• BDEを使った業務アプリを移行ツールで最新化
https://community.embarcadero.com/blogs/entry/delphi-c-builder-bde-japan
22. 22© 2017 Embarcadero Technologies, Inc. All rights reserved. Proprietary and confidential. #embtwebi_jp
移行ツール: 参考となる資料
reFind
• http://docwiki.embarcadero.com/RADStudio/Berlin/ja/Perl_RegEx_式を使
用する検索および置換ユーティリティ:_reFind.exe
Delphi Parser
• https://delphiparser.com/
先日のセミナー内容を
弊社ブログに掲載
23. © 2016 Embarcadero Technologies, Inc. All rights reserved. Proprietary and confidential. 23
THANKS!
www.embarcadero.com/jp