MidWare Version 7 for Delphi XE =============================== (AKA Middleware by F. Piette) Last update: Jul 28, 2010 http://www.overbyte.be Table of content: ----------------- - Legal issues - Disclaimer - Register - Documentation - Installation - Sample applications - A little bit of theory - Support Legal issues: ------------- Copyright (C) 1998 - 2010 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. Documentation: -------------- See included MidWare.hlp file. Installation: ------------- Before installing, be sure to get the latest version from the SVN repository at: http://svn.overbyte.be:8443/svn/ics/branches/icsv7 or svn://svn.overbyte.be/ics/branches/icsv7 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. Install all components from the delphi\vc32 directory. Other files are support files used by components. In delphi\vc32 directory, you can find pre-built packages sources for Delphi 2010: - OverbyteMwDXeDesign.dproj - OverbyteMwDXeRun.dproj In delphi\Midware directory, there is a OverbyteMwDXeSam.groupproj file which has the packages as well demos. The code should also be compatible with Delphi 7, 2006, 2007, 2009 and 2010 It has been tested with Delphi XE only and you have to create the packages yourself (Follow Delphi documentation, there is no magic with MidWare). To install it, do file/open then browse to the OverbyteMwDXeSam.groupproj file and open it. If Delphi complains about uninstalled component, be sure to click "cancel" (If you click ignore, you'll break the forms and will need to unzip them again). Close all pages in the code editor. Only the welcome page should remain. If asked to save changes, you should answer "no". If you get an error "unknown property ExplicitWidth" (or other property) when loading a form, click ignore. This is because the form was opened in a later version of Delphi which add new properties. These new properties are not used in MidWare and can be safely ignored. Be sure to open all forms with Delphi or you'll get that error at runtime. Then show the project manager and right click on the first project and select "from here / rebuild all". Then right click on the design package and select "install". The IDE should tell you that a lot of components has been installed. If you have problems, see support below: you shuld post a message in the support mailing list with detailled error message the IDE gives. 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 CHATSRV A multi-user chat server CHATCLI A client for CHATSRV 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 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. francois.piette@overbyte.be http://www.overbyte.be