MidWare Version 7 for Delphi XE2/XE/2010/2009/2007/7 ==================================================== (AKA Middleware by F. Piette) Last update: Dec 27, 2012 http://www.overbyte.be Table of content: ----------------- - Legal issues - Disclaimer - Register - Buying Midware - Documentation - Installation - Sample applications - A little bit of theory - Support - Consulting, training, custom development: Legal issues: ------------- Copyright (C) 1998 - 2013 by François PIETTE Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 This software is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software and or any derived or altered versions for any purpose, excluding commercial applications. You may distribute it freely untouched. The following restrictions applies: 1. The origin of this software must not be misrepresented, you must not claim that you wrote the original software. 2. If you use this software in a product, an acknowledgment in the product documentation and displayed on screen is required. The text must be: "This product is based on MidWare. Freeware source code is available at http://www.overbyte.be." 3. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 4. This notice may not be removed or altered from any source distribution and must be added to the product documentation. Disclaimer: ----------- THIS SOFTWARE IS PROVIDED BY FRANCOIS PIETTE "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Register: --------- MidWare is freeware, restrictions applies: see leagl issues above. If you like the components and use it, you must send a picture postcard showing the area you lives in and some beautiful stamps for my daughter who is stamp collectors. Do not use an envelop, I collect USED postcards mailed to me. Address your card to: Francois PIETTE, rue de Grady 24, 4053 Embourg, Belgium. Don't forget to mention your name, address and EMail and why you sent the postcard. Buying Midware: --------------- To use Midware for business or commercial applications, you must buy a license which cost 1100,- EUROS (Add applicable taxes) at the time of this writing. Contact francois.piette@overbyte.be for latest price or special arrangement. Send your complete name, company name, street address and VAT number (if any) so that we can send the invoice. Send your money to: Name: OverByte sprl Address: rue de Grady 24, 4053 Embourg, belgium Bank: ING Belgium, Avenue Marnix 24, 1000 Brussels, Belgium IBAN: BE80 3400 6181 2377 BIC: BBRUBEBB Documentation: -------------- http://wiki.overbyte.be/wiki/index.php/Midware See included MidWare.hlp file (very old file). Installation: ------------- Before installing, be sure to get the latest version from the SVN repository at: http://svn.overbyte.be:8443/svn/ics/trunk or svn://svn.overbyte.be/ics/trunk and http://svn.overbyte.be:8443/svn/midware/trunk or svn://svn.overbyte.be/midware/trunk Use "ics" as both usercode and password. You must have ICS-V7 installed properly. Remove and USE_SSL define in ICS package options and recompile ICS-V7 packages. You may have ICS files delivered with MidWare. When you unzip, be sure to keep the most recent file comming either from Midware distribution or ICS distribution. Be careful to NOT overwrite a file with an older one. In the Install directory, you'll find project groups for each supported Delphi version. Each group contain two packages: one runtime and one design time. You have to compile both and install the designtime one. The project group file name contains Delphi version. For example DXe3MwInstall.groupproj is for Delphi XE3. Select the appropriate for your Delphi version. WARNING: dproj files are not downward compatible between Delphi version. I save the dproj for each supported Delphi version with another extension and provide bat file to copy from/to thoses copies. For example, if you are using XE2, then run CopyFromXE2.bat before running the IDE and you'll get the correct dproj files for XE2. If you have errors or warnings when opening the demo projects, then it is likely you are using the wrong dproj files. In delphi\Midware directory, there are more project group file: one per Delphi version supported. Delphi version is part of the filename, select the appropriate one for your Delphi version (For example OverbyteMwDXe3Sam.groupproj for Delphi XE3). The code should also be compatible with 2006. Use Delphi 7 files. If you have problems, see support below: you shuld post a message in the support mailing list with detailled error message the IDE gives. Once more: You defenitely need ICS-V7 properly installed before installing Midware ! Warning: If it happends you open the demos before having properly installed Midware design time package, Delphi will complain about missing component. Be sure to click "cancel" ! Never click "ignore" or you'll break the demos. To check your installation, run OverbyteSrvDemo application and OverbyteBiolife demo. Click "Request" on the later. You should see a nice fish displayed. Note that OverbyteSrvDemo make use of the old BDE (Bad idea for a new application). If you are using Win7, see the file "Configuring BDE for Windows 7.txt" in the distribution to properly setup - if not already done - BDE to run on Win7. Midware is not dependent at all on BDE. I used a Paradox file because everyone should be able to use it. If I used a database, then this would require the database engine to be installed. Of course in your real applications, you will probably use a SQL database (Firebird, MS-SQL, Oracle, Interbase,...) instead of BDE. In the demos, replace TQuery by the component you want to use to access your database. I mostly use TAdoQuery because I can access many differents databases using the same component. But this is just my preference. Sample applications: -------------------- SRVTST A sample application server with 3 server object - UPPER Just return sent data in uppercase - THREAD Show how to use a thread to make a lengthy request - GETCLIENT Show how to use a TTable and fetch some data - GETCLIENTLIKE Show how to use a TQuery and fetch some data - GETFILE Return an entire file as a blob field CLITST A sample client program to be used with SRVTST (can display BMP files !) TBLTST A sample client program using a DBGrid and DBNavigator Use it with SRVTST (it uses GETCLIENTLIKE). BUFTST A sample program to show how you can manipulate TMWBuffer SRVDEMO Another server - SQL Execute a SQL statement (BETA) - SQLTHRD Execute a SQL statement in athread (BETA, buggy) BIOLIFE A sample client application showing how to use images. TBLMETADATADEMO A sample client showing how to use metadata ICSMWAPPSERVER A server combining ICS WebServer with Midware AppServer. See IcsMw\Readme.txt for long explanation. By default, SrvTst and CliTst use port TCP/2106 and works on localhost. You can change that by running the programs once, closing them and editing the created ini files with what you like most. ChatSrv and ChatCli use port 2121 (client to server) and 2122 (server to client). You need to edit source code to change that. A little bit of theory: ----------------------- MidWare is made to be the glue between you thin client and you application server. The application server is connected to dataserver (RDBMS for example, or mainframe or datawarehouse) to get/update the data base. The application server use standard (or third party) two-tier C/S objects such as TQuery or any BDE replacement component. +--------+---------+ | THIN | | | | MIDWARE |<---+ |CLIENT 1| | | +--------+---------+ | | +--------+---------+ | +---------+-----------+-----+ +---------+ | THIN | | | | |APPLICATION| | | | | | MIDWARE |<-TCPIP->| MIDWARE | | BDE |<----->| RDMBS | |CLIENT 2| (CLI) | | | (SRV) | SERVER | | | | +--------+---------+ | +---------+-----------+-----+ +---------+ | ^ +--------+---------+ | | +---------+ | THIN | | | | | | | | MIDWARE |<---+ +------------------>|MAINFRAME| |CLIENT 3| | | | +--------+---------+ +---------+ The thin client is responsible for data entry and data presentation. The application server is responsible for the business rules (data validation and data retrieval). The RDBMS or MAINFRAME (or Unix box or other application servers for N-Tiers) I the classical data invoincing system, the thin client will present a window to select a client, the user select the client in the list. Then another windows allows to select items to add to the invoice. The user pick an item, add quantity and other informations, then the thin client send the info the the application server for validation before the next item entry. (or you prefer to enter all items and verify them all in once). A client list will be presented, probably in a TMWTable filled with all client conforming to a key entered by the user (for example the first few letters of the client name). The thin client send the key to the app server which returns the client list. The user see the list in any dataaware control. To validate items, the thin client send the items data to the app server which apply the business rules to validate and send positive acknowledge or negative aknowledge with error message. You are not onliged to use TMWTable. You can use TMWBuffer directly to populate and data entry controls. Support: -------- There is a mailing list to discuss Midware. To subscribe follow the instructions given on the support page at http://www.overbyte.be If you find a bug, please make a short program which reproduce the problem attach it to a message addressed to me or to the mailing list. If I can reproduce the problem, I can find a fix ! You are also encouraged to use the support mailing list to ask for enhancements. You are welcome to post your own code. Consulting, training, custom development: ----------------------------------------- You can buy consulting, training, custom development and private support from OverByte. Send your request as email to francois.piette@overbyte.be and you'll get a price. Basically the price is 560,- EUROS per work day. Best regards, -- francois.piette@overbyte.be http://www.overbyte.be