更新至kbmmw 5.04. (2017.12.14)
---------------------
目前的KbmMW 最新版是4.0 beta 版,它支持最新的delphi XE2 ,同时支持win32,win64,mac osx的编译开发。
增加了原生的JSON 的支持(看来JSON 是越来越热了:)),同时提高了http web 的功能,作者已经用最新的KbmMW 替换了
原来使用aspx 的下载网站,其使用kbmMW 的web服务,并使用AJAX 来实现数据列表,经过我的使用,效果还不错。
由于kbmMW 安装不是一次到位的,而且里面配置繁多,为了方便大家使用,下面我就先来说一下kbmMW 的安装与配置。
1.安装kbmMemTable 专业版
要让kbmMW能够运行起来,首先要安装kbmMemTable 专业版,kbmMemTable 正如其名,
是一个非常好的内存表控件,可以实现内存表所需的各种基本功能。最新的7.12.10版开始支持win32,win64,mac osx和ios,
同时其支持sql 查询,即可以直接利用sql 来查询和操作内存表。当然了,它也是kbmMW
多层开发中的客户端的查询表的基础,因此要使用kbmMW,就必须先安装它。kbmMemTable
安装起来非常简单,直接运行安装包就可以了。
选择好路径,一路点下一步就可以了。
安装后,用XE2打开kbmMemRunDXE2Pro.dpk,然后编译,再打开kbmMemDesDXE2Pro.dpk 点install 就可以把
kbmMemTable 安装到XE2 的控件面板里面了。以下为安装后的控件图:
当然要运行kbmMemTable 附带的例子,别忘了在XE2 的LIB路径里面把它的源码路径加上。
2.安装KbmMW 企业版
安装kbmMW 企业版时,会出现很多个配置选择的页面,由于kbmMW 不是直接到IDE 里面的,为了保证能安装成功,
因此我建议选择配置时,尽量少选,安装完后,如果需要那些配置,再手工选择。以下是数据库配置的选择
它支持的数据库访问方式实在是太多了。
以下是数据传输方式的选择
这是加密和压缩方式的选择
选择完了,就可以一路点Next 下去了。剩下的就是在IDE 里面安装包了。
3.kbmMW 的配置
很多同学可能没有安装程序,只有源代码(呵呵,不要问我要安装程序和源码,希望大家用正版),其实没有
任何问题,我们只需要编辑源码目录里面的kbmMWConfig.inc 文件就可以实现以上的功能。
以下是这个文件的一部分内容
{$DEFINE KBMMW_REMOTEDESKTOP_SUPPORT} // 这个选项定义是否支持远程桌面功能
// ===========================================================================
// Performance settings.
// Remove the // from the following lines to enable specific performance
// optimizations
// ===========================================================================
//{$DEFINE KBMMW_OPTIMIZED_MEMORYSTREAM} // If to use an optimized memory stream handling.
// ===========================================================================
//这些选项定义支持那些传输协议
//要支持Synapse的话,先要下载Synapse,地址在http://synapse.ararat.cz/doku.php
// Transport support.
// Remove the // on the following lines to enable specific transports.
// ===========================================================================
{$DEFINE KBMMW_LOCALTRANSPORT_SUPPORT} // Client/Server in one app.
{$DEFINE KBMMW_INDYTCPIPTRANSPORT_SUPPORT} // Indy TCPIP support.
//{$DEFINE KBMMW_DXSOCKTCPIPTRANSPORT_SUPPORT} // DXSocks v. 3.0 TCPIP support.
{$DEFINE KBMMW_ISAPITRANSPORT_SUPPORT} // ISAPI support.
//{$DEFINE KBMMW_NEXUSDBTRANSPORT_SUPPORT} // NexusDB transport support.
{$DEFINE KBMMW_INDYUDPSAFTRANSPORT_SUPPORT} // Indy UDP messenging support.
//{$DEFINE KBMMW_SYNAPSETCPIPTRANSPORT_SUPPORT} // Synapse TCPIP support.
//{$DEFINE KBMMW_SYNAPSEUDPSAFTRANSPORT_SUPPORT} // Synapse UDP messenging support.
{$DEFINE KBMMW_INDYTCPIPSAFTRANSPORT_SUPPORT} // Indy TCPIP messenging support.
//{$DEFINE KBMMW_STREAMSEC_SSHSAFTRANSPORT_SUPPORT} // StreamSec Tools V3 SSH messenging support.
//{$DEFINE KBMMW_SYNAPSETCPIPSAFTRANSPORT_SUPPORT} // Synapse TCPIP messenging support.
{$DEFINE KBMMW_RTMPGATEWAY_SUPPORT} // Adobe RTMP Gateway server transport support.
{$DEFINE KBMMW_AMQPGATEWAY_SUPPORT} // Advanced Message Queue Protocol 0.92 (AMQP) Gateway client support.
{$DEFINE KBMMW_HTTPSYSTRANSPORT_SUPPORT} // HTTPSys REST oriented transport support (Windows only).
// -------------------------------------------------------------------
// Specific settings for Indy TCPIP transport stream.
// Enable the entry (by removing the //) for the version of Indy you
// are using. Other entries should be remarked.
// -------------------------------------------------------------------
{$DEFINE KBMMW_USING_INDY_10}
//{$DEFINE KBMMW_SUPPORT_INDY_10_2_3}
//{$DEFINE KBMMW_SUPPORT_INDY_10_5_8}
//{$DEFINE KBMMW_SUPPORT_INDY_10_5_9}
{$DEFINE KBMMW_SUPPORT_INDY_10_6_0}
// -------------------------------------------------------------------
// Specific settings for DXSock TCPIP transport.
// -------------------------------------------------------------------
//{$DEFINE KBMMW_ISAPITRANSPORT_USING_DXSOCK} // Use DXSock 3.0 for ISAPI support.
// -------------------------------------------------------------------
// Specific settings for NexusDB.
// -------------------------------------------------------------------
//{$DEFINE KBMMW_USING_NEXUSDB2} // Use NexusDB v2/V3 support.
// ===========================================================================
// Transport stream support.
// Remove/insert // on the following lines to enable/disable specific transport streams.
// ===========================================================================
{$DEFINE KBMMW_HTTP_TRANSPORTSTREAM_SUPPORT} // HTTP Tunneling transport stream format.
{$DEFINE KBMMW_ZIPPED_TRANSPORTSTREAM_SUPPORT} // Compressed binary transport stream format.
{$DEFINE KBMMW_ZIPPED_HTTP_TRANSPORTSTREAM_SUPPORT} // Compressed HTTP Tunneling transport stream format.
// The Zipped transportstreams require use of ZLib.
{$DEFINE KBMMW_XML_TRANSPORTSTREAM_SUPPORT} // XML transport stream format.
{$DEFINE KBMMW_SOAP_TRANSPORTSTREAM_SUPPORT} // SOAP transport stream format.
{$DEFINE KBMMW_AJAX_TRANSPORTSTREAM_SUPPORT} // AJAX transport stream format.
{$DEFINE KBMMW_AMF3_TRANSPORTSTREAM_SUPPORT} // Adobe AMF3 transport stream format.
{$DEFINE KBMMW_REST_TRANSPORTSTREAM_SUPPORT} // REST smart service transport stream format.
// ===========================================================================
// Database adapters.
// Remove the // on the following lines to enable specific database support.
// ===========================================================================
// 这些选项定义支持那些数据库访问控件,一定要记住,只能定义自己有的数据库控件,没有的一定要注释掉,否则无法安装的
{$DEFINE KBMMW_BDE_SUPPORT} // BDE Support.
//{$DEFINE KBMMW_FF2_SUPPORT} // Flashfiler 2 support.
//{$DEFINE KBMMW_DBISAM3_SUPPORT} // DBISAM 3 support.
//{$DEFINE KBMMW_ADS6_SUPPORT} // Advantage 6 support.
//{$DEFINE KBMMW_IBX5_SUPPORT} // Interbase Express 5 support.
//{$DEFINE KBMMW_IBO_SUPPORT} // Interbase IBO support.
//{$DEFINE KBMMW_ADOX_SUPPORT} // ADO Express support.
//{$DEFINE KBMMW_DADO_SUPPORT} // Deer-Soft ADO support.
//{$DEFINE KBMMW_ZEOSMSSQL_SUPPORT} // Zeos 5 MSSQL support.
//{$DEFINE KBMMW_ZEOSMYSQL_SUPPORT} // Zeos 5 MYSQL support.
//{$DEFINE KBMMW_ZEOSPROGRESS_SUPPORT} // Zeos 5 Progress SQL support.
//{$DEFINE KBMMW_ZEOSDB2_SUPPORT} // Zeos 5 DB2 support.
//{$DEFINE KBMMW_ZEOSORACLE_SUPPORT} // Zeos 5 Oracle support.
//{$DEFINE KBMMW_ZEOSIB_SUPPORT} // Zeos 5 Interbase support.
//{$DEFINE KBMMW_ZEOS6_SUPPORT} // Zeos 6 support.
{$DEFINE KBMMW_MT_SUPPORT} // kbmMemTable backend support.
//{$DEFINE KBMMW_DBX_SUPPORT} // dbExpress support.
//{$DEFINE KBMMW_DOA_SUPPORT} // DOA support.
//{$DEFINE KBMMW_ODAC4_SUPPORT} // ODAC v4 support.
//{$DEFINE KBMMW_DAO_SUPPORT} // Diamond Access support.
{$DEFINE KBMMW_X_SUPPORT} // kbmMW Cross adapter support.
//{$DEFINE KBMMW_MYSQLDAC_SUPPORT} // MySQLDAC support.
//{$DEFINE KBMMW_NEXUSDB_SUPPORT} // NexusDB support.
//{$DEFINE KBMMW_SD_SUPPORT} // SQLDirect support.
//{$DEFINE KBMMW_DBISAM4_SUPPORT} // DBISAM 4.01+ support.
//{$DEFINE KBMMW_UIB_SUPPORT} // Unified Interbase support.
//{$DEFINE KBMMW_FIB_SUPPORT} // DevRace FIBPlus support.
//{$DEFINE KBMMW_ABS_SUPPORT} // Absolute Database support.
//{$DEFINE KBMMW_APOLLO_SUPPORT} // Apollo Database support.
{$DEFINE KBMMW_SDAC3_SUPPORT} // MSSQL Direct Access Components (crlib).
//{$DEFINE KBMMW_POSTGRESQLDAC_SUPPORT} // PostgreSQL DAC support.
//{$DEFINE KBMMW_NATIVEDB_SUPPORT} // NativeDB support.
{$DEFINE KBMMW_ODAC5_SUPPORT} // ODAC v5 support.
//{$DEFINE KBMMW_EDB_SUPPORT} // ElevateDB support.
//{$DEFINE KBMMW_ADSDBF_SUPPORT} // Advantage DBF support.
//{$DEFINE KBMMW_SQLITE_SUPPORT} // SQLite v. 3.3.1+
{$DEFINE KBMMW_MD_SUPPORT} // kbmMW Memory Dataset support.
//{$DEFINE KBMMW_ANYDAC_SUPPORT} // ANYDAC support.
{$DEFINE KBMMW_UNIDAC_SUPPORT} // UNIDAC support.
{$DEFINE KBMMW_IBDAC_SUPPORT} // IBDAC support.
// ===========================================================================
// UIB version support.
// Remove/insert // on the following lines to enable specific UIB support.
// Only one must be selected.
// ===========================================================================
//{$DEFINE KBMMW_UIB_JV} // UIB JV version.
// ===========================================================================
// Crypt support.
// Remove the // on the following lines to enable specific crypt support.
// ===========================================================================
//{$DEFINE KBMMW_CRYPT_SS2} // StreamSec II (2.1.8.232+).
// ===========================================================================
// Zip Compression support.
// Remove the // on the following lines to enable specific compression support.
// Only one should be enabled at any time.
// ===========================================================================
//{$DEFINE KBMMW_ZIPPED_USE_FASTZLIB} // FastZLib.
// ===========================================================================
// Transport plugin support.
// Remove the // on the following lines to enable transport plugins.
// ===========================================================================
//{$DEFINE KBMMW_TRANSPORTPLUGIN_SS2_TLS} // StreamSec II TLS/SSL plugin.
// -------------------------------------------------------------------
// Special service support.
// Enable the entries (by removing the //) for the services you want to use.
// -------------------------------------------------------------------
//{$DEFINE KBMMW_JAVA_SERVICE_SUPPORT} // Define this if you want to use the custom Java service (LEVEL6+ compilers).
//{$DEFINE KBMMW_ACTIONSCRIPT_SERVICE_SUPPORT} // Define this if you want to use the custom ActionScript service (LEVEL6+ compilers).
{$DEFINE KBMMW_FASTCGI_SUPPORT} // Define this if you want to support FastCGI servers.
// -------------------------------------------------------------------
// ReportBuilder DADE support.
// Enable the entries (by removing the //) for the ReportBuilder settings you want to use.
// -------------------------------------------------------------------
// -------------------------------------------------------------------
//{$DEFINE KBMMW_RBDADE_SUPPORT} // ReportBuilder DADE support
{$DEFINE KBMMW_USING_5_1_OLDER_RB} // If using RB 5.1 or older.
//{$DEFINE KBMMW_USING_7_NEWER_RB} // If using RB 7 or newer.
定义好以上的各个配置变量,保存文件,就可以在IDE 里面打开kbmMWRunDXE2Ent.dpk ,然后build,再打开kbmMWDesDXE2Ent.dpk
安装这个包,就可以了。当然如果以后需要支持新的配置的话,重新编辑kbmMWConfig.inc,再build 和安装就可以了。
安装完成后,控件面板就会出现以下的控件:
到此为止,kbmMW 就安装成功了,我们后面就可以进行多层之旅了。