How to develop n-tier applications for ios using kbmmw



Similar documents
REBRANDING THE KBMMW REMOTE DESKTOP PAGE 1/4

New Features in XE8. Marco Cantù RAD Studio Product Manager

What's new in RAD Studio XE7

Delphi XE8 Development Essentials

The full setup includes the server itself, the server control panel, Firebird Database Server, and three sample applications with source code.

Parallels Transporter Agent

Check current version of Remote Desktop Connection for Mac.. Page 2. Remove Old Version Remote Desktop Connection..Page 8

USB HSPA Modem. User Manual

Tutorial: Hybrid App Package Development. Sybase Unwired Platform 2.2 SP02

DocAve Upgrade Guide. From Version 4.1 to 4.5

It is recommended that you use a clean installation of Lion client before upgrading to Lion Server.

Tutorial: Creating a CLX Database Application

Implementation Guide. Version 10

AdminToys Suite. Installation & Setup Guide

Access the TCNJ Palo Alto Networks VPN using the GlobalProtect VPN client

Building Mobile Applications Creating ios applications with jquery Mobile, PhoneGap, and Drupal 7

Visual COBOL ASP.NET Shopping Cart Demonstration

Table of Contents. FleetSoft Installation Guide

Thank you for using Synapse Hosted Exchange service. Please find the instructions for setting up your clients are below:

Tutorial: Hybrid App Package Development. SAP Mobile Platform 2.3

Parallels Desktop Enterprise Edition

TestManager Administration Guide

Out n About! for Outlook Electronic In/Out Status Board. Administrators Guide. Version 3.x

Iron Speed Designer Installation Guide

Installation Instructions

Parallels Containers for Windows 6.0

SQL Server 2008 R2 Express Edition Installation Guide

System Requirements for Microsoft Dynamics NAV 2016

Knappsack ios Build and Deployment Guide

Remote Access - Mac OS X

Training. for. Print Audit 6 Full Training Module

Setting up Radmind For an OSX Public Lab

Installing and Using No Machine to connect to the Redhawk Cluster. Mac version

Migrating helpdesk to a new server

Nesstar Server Nesstar WebView Version 3.5

Application Note. Cacti monitoring. Document version: v1.0 Last update: 8th November 2013

InHand Device Cloud Service DN 4.0 Quick Start Guide

Server & Workstation Installation of Client Profiles for Windows (WAN Edition)

This document is provided to you by ABC E BUSINESS, Microsoft Dynamics Preferred partner. System Requirements NAV 2016

Setting Up Resources in VMware Identity Manager

Sophos Mobile Control Installation guide. Product version: 3.6

Sophos Mobile Control Installation guide. Product version: 3

Suite. How to Use GrandMaster Suite. Exporting with ODBC

SIMIAN systems. Setting up a Sitellite development environment on Windows. Sitellite Content Management System

GE Intelligent Platforms. Activating Licenses Online Using a Local License Server

Setting up IIS on Windows 7: Build Web Services with RAD Studio 2010

ORACLE BUSINESS INTELLIGENCE WORKSHOP

How to protect, restore and recover SQL 2005 and SQL 2008 Databases

How To Test Your Web Site On Wapt On A Pc Or Mac Or Mac (Or Mac) On A Mac Or Ipad Or Ipa (Or Ipa) On Pc Or Ipam (Or Pc Or Pc) On An Ip

Code::Blocks Student Manual

Web+Center Version 7.x Windows Quick Install Guide 2 Tech Free Version Rev March 7, 2012

Data Crow Creating Reports

Embarcadero DB Change Manager 6.0 and DB Change Manager XE2

LICENSE4J FLOATING LICENSE SERVER USER GUIDE

, SHAPE Services

eggon SDK for ios 7 Integration Instructions

Migrating Trend Micro Mobile Security for Enterprise (TMMS) 8.0 to TMMS 9.0 Patch 1

How to start with 3DHOP

Local Caching Servers (LCS): User Manual

DOCSVAULT Document Management System for everyone

Hyperoo 2.0 A (Very) Quick Start

2X ApplicationServer & LoadBalancer Manual

Microsoft SQL Server Express 2005 Install Guide

Using Microsoft Visual Studio API Reference

Load balancing and failover For kbmmw v ProPlus and Enterprise Editions

How to install bentley software with license

Certificates and Application Resigning

RSA SecurID Token User Guide February 12, 2015

Transition your MCPD Web Developer Skills to MCPD ASP.NET Developer 3.5 (VB)

1. Open the License Manager either via the Start Menu or from C:\Keri\DoorsNET directory.

How to wipe personal data and from a lost or stolen mobile device

Response Time Analysis of Web Templates

Creating OpenGL applications that use GLUT

Initial Setup of Mozilla Thunderbird with IMAP for OS X Lion

DameWare Server. Administrator Guide

System Requirements. Microsoft Dynamics NAV 2016

CSA Software Listing Table of Contents. Both Windows and Mac platforms are supported.

Configure Backup Server for Cisco Unified Communications Manager

DiskPulse DISK CHANGE MONITOR

VP-ASP Shopping Cart QUICK START GUIDE Version th Feb 2010 Rocksalt International Pty Ltd

Using desktop ANYWHERE

StoreGrid Backup Server With MySQL As Backend Database:

Fiery EX4112/4127. Printing from Windows

4D Plugin SDK v11. Another minor change, real values on 10 bytes is no longer supported.

Sophos Mobile Control Installation guide. Product version: 3.5

FmPro Migrator - FileMaker to SQL Server

SalesPad for Dynamics GP DataCollection Installation & Setup

Stored Documents and the FileCabinet

TechTips. Connecting Xcelsius Dashboards to External Data Sources using: Web Services (Dynamic Web Query)

Product Manual. MDM On Premise Installation Version 8.1. Last Updated: 06/07/15

DeviceAnywhere Enterprise. ios Device Onboarding Guide

Remote Application Server Version 14. Last updated:

E-Blocks Easy Internet Bundle

SonicWALL Mobile Connect. Mobile Connect for OS X 3.0. User Guide

Getting Started with the Ed-Fi ODS and Ed-Fi ODS API

Avira Secure Backup INSTALLATION GUIDE. HowTo

How To Write A Data Snap Server In A Microsoft Datasnap (Server) And 2.2 (Client) (Server And Client) (For A Microsnet 2.4.1)

Remote Application Server Version 14. Last updated:

Quick Start Guide. User Manual. 1 March 2012

Transcription:

How to develop n-tier applications for ios using kbmmw starter expert Delphi XE2 With the latest kbmmw beta, it's possible to use just about all of its main functionality on iphones, ipod Touch and ipads. What are the implications for you, the developer? Basically this means that you are able create client and server applications on ios, which can communicate with their surroundings using regular request/response type transports and/or the Wide Information Bus. Your ios application can utilize XML, SOAP, JSON, AJAX, database adapters (there is a SQLite adapter bundled), query and file services, and all the other features bundled with kbmmw. This article describes how to get a kbmmw development environment up and running, and how to create a simple client application that can communicate with a standard Windows-based application server. Installation Prerequisites MacOS with XCodeYou need a Mac with Xcode 3.2.6 or Xcode.0.x (or newer) installed. If you use Xcode 3.2.6, and you want to debug your kbmmw-based applications in Xcode on the Mac, you will need to turn off Load symbols lazily via the Xcode Preferences Debugging menu. On Xcode.0.x you will not need to do that. By Roger Nyberg Delphi/RAD Studio XE2 You need Delphi XE2 or RAD Studio XE2 which both support ios development. Make sure you set up your Delphi development environment according to Embarcadero's instructions which you can find here: http://docwiki.embarcadero.com/radstudio/en/firem onkey_development_setup_for_ios Synapse On ios, kbmmw uses the Synapse transport adapter, hence you will need to download Synapse to your development machine. You can find it here: http://www.ararat.cz/synapse/doku.php. kbmmemtable and kbmmw kbmmemtable (Standard or Professional) and kbmmw (Professional or Enterprise Edition) needs to be installed in your Delphi environment. Make sure you have configured kbmmw for Synapse transport support, by modifying the kbmmwconfig.inc file as follows: {$DEFINE KBMMW_SYNAPSETCPIPTRANSPORT_SUPPORT} {$DEFINE KBMMW_SYNAPSEUDPSAFTRANSPORT_SUPPORT} {$DEFINE KBMMW_SYNAPSETCPIPSAFTRANSPORT_SUPPORT} // Synapse TCPIP support // Synapse UDP WIB support (Enterprise Only) // Synapse TCPIP WIB support (Enterprise Only) On the MacOS, you must ensure that only supported features are defined. It typically (with kbmmw Enterprise Edition) includes: {$DEFINE KBMMW_SYNAPSETCPIPTRANSPORT_SUPPORT} {$DEFINE KBMMW_SYNAPSEUDPSAFTRANSPORT_SUPPORT} {$DEFINE KBMMW_SYNAPSETCPIPSAFTRANSPORT_SUPPORT} {$DEFINE KBMMW_X_SUPPORT} {$DEFINE KBMMW_MT_SUPPORT} {$DEFINE KBMMW_MD_SUPPORT} {$DEFINE KBMMW_SQLITE_SUPPORT} {$DEFINE KBMMW_HTTP_TRANSPORTSTREAM_SUPPORT} {$DEFINE KBMMW_SOAP_TRANSPORTSTREAM_SUPPORT} {$DEFINE KBMMW_XML_TRANSPORTSTREAM_SUPPORT} {$DEFINE KBMMW_AJAX_TRANSPORTSTREAM_SUPPORT} {$DEFINE KBMMW_AMF3_TRANSPORTSTREAM_SUPPORT} // Synapse TCPIP support // Synapse UDP WIB support (Enterprise Only) // Synapse TCPIP WIB support (Enterprise Only) // kbmmw Cross adapter support. // kbmmemtable backend Support. // kbmmw Memory Dataset Support. // SQLite support. // HTTP Tunneling transport stream format. // SOAP transport stream format. // XML transport stream format. // AJAX transport stream format. // AMF3 transport stream format. 55

How to develop n-tier applications for ios using kbmmw (Continuation 1) You can use {$IFDEF IOS} {$ELSE} {$ENDIF} to include and exclude sections in the kbmmwconfig.inc. That will allow you to use the same kbmmwconfig.inc file in both Mac and Windows environments. All source code for kbmmw and Synapse needs to be made available both on your Mac and on the PC where Delphi is installed. You can accomplish this by making a shared folder on a network drive, to which you copy all kbmmw/kbmmemtable/kbmsql/synapse source files (*.dfm, *.lfm, *.pas, *.inc). Configuring the Free Pascal Compiler on MacOS Set up your path to the source code by modifying /etc/fpc.cfg. It contains a section with lines ning -Fu/. In that section you need to add additional lines with absolute paths (seen from the Mac's perspective) to all the directories containing the above mentioned source files (e. g. Fu/Users/someuser/somepath/kbmmw). /etc/fpc.cfg is a protected file, so it can only be overwritten by the system administrator. That requires using the sudo command. An example scenario would be to start a terminal server on MacOS and do the following: cp /etc/fpc.cfg. vi./fpc.cfg Alter this according to your setup (Instead of vi you could also use MacOS TextEdit) sudo cp./fpc.cfg /etc/fpc.cfg Making your IOS client application After these required files have been edited and copied to the correct folders you are ready to create a new IOS HD application in Delphi. Click File New Other and select FireMonkey HD ios application. When you finish creating the application framework (via the wizard), you will see a FireMonkey form shown. Save the application project and units to a directory that is shared between your MacOS and Windows environments. Let's say we name the project client. You may notice that the kbmmw components are disabled (grayed out) or do not show up in the component palette. To fix that, close the Delphi project, and via the file explorer, find the project directory and delete client.dproj (only that one file!). Then reopen client.dpr in the Delphi XE2 IDE. Now both kbmmw and kbmmemtable components are available. This also allows you to code, execute and test your application on Windows. When you come to put business code into your application this will make development much easier. Notice that most but not all FireMonkey features are working on ios. When you are satisfied with your application, you can export it via the Xcode exporter and test to check that it can compile and run in the ios environment. When you are satisfied, choose the menu Tools Export to Xcode in the Delphi IDE. Figure 1: Start Finder on the Mac, and locate the client.xcodeproj file. Double click it on the Mac, which will open the Xcode environment. 56

How to develop n-tier applications for ios using kbmmw (Continuation 2) Figure 2: Xcode opens up: Figure 3: Click Build and debug If the compilation on Windows or MacOS fails, stating it can't find specific standard units, then add the word FMX to the unit scope names. In Delphi: Project Options Delphi Compiler Unit Scope Names 57

How to develop n-tier applications for ios using kbmmw (Continuation 3) Figure : When the compilation succeeds, it will automatically start the ios emulator, and run the application in it. Figure 5: Let's click the Run Query component. It will ask a kbmmw-based application server for data from the standard demo database 'Events'. What does this sample client contain? The client application demonstrated in this article contains some TEdits, a TMemo, a TImage, a couple of TButtons, and some kbmmw client components (TkbmMWTCPIPSynapseClientTransport, TkbmMWClientConnectionPool, TkbmMWClientQuery, TkbmMWBinaryStreamFormat). 58

How to develop n-tier applications for ios using kbmmw (Continuation ) procedure TForm1.Update; var ms:tmemorystream; bs:tstream; if kbmmwclientquery1event_name.isnull then Edit1.Text:='(n/a)' else Edit1.Text:= kbmmwclientquery1event_name.asstring; if kbmmwclientquery1event_description.isnull then Memo1.Text:='(n/a)' else Memo1.Text:= kbmmwclientquery1event_description.asstring; if kbmmwclientquery1event_photo.isnull then Image1.Bitmap.Clear(TAlphaColorRec.Red) else bs:=kbmmwclientquery1.createblobstream (kbmmwclientquery1event_photo,bmread); try // Required to skip 8 bytes of header. Embarcadero 'detail'. bs.position:= 8; Image1.Bitmap.LoadFromStream(bs); finally bs.free; The [Next] and [Previous] button handlers are as follows: procedure TForm1.btnNextClick(Sender: TObject); kbmmwclientquery1.next; Update; Figure 6: Form1 in sight procedure TForm1.btnPrevClick(Sender: TObject); kbmmwclientquery1.prior; Update; As there is no true data binding available on ios at the moment, we need to populate the TEdits, TMemo and TImage in code. Application server on ios? The event handler for the [Run Query] button contains this code: If you want to create a kbmmw-based application server that runs on ios, you do it in the same way as if you were creating a kbmmwclientquery1.close; regular ios application, merely adding kbmmw application server kbmmwclientconnectionpool1.killconnections; components as described in other articles. kbmmwtcpipsynapseclienttransport1.host:= Because ios supports SQLite as its only database type, only eip.text; the kbmmwsqlite database adapter can be used on ios (in kbmmwclientquery1.open; addition to the kbmmwmd and kbmmwx adapters). kbmmw's Update; SQLite database adapter is intelligent enough to map most data types for easy integration. It ensures that the query dataset is closed (if it was opened on a previous If you are adding a SQLite database file to your IOS device click), and in this example we force disconnections of all TCP/IP you need to make sure it's read/write. Adding it to the application connections between the client and server applications. path/package will cause it to end up read only. This is purely optional. In fact one would probably want to use If you are running a server on ios, Unicode is not the kbmmw failover/loadbalancing/reconnect features to ensure supported for regular strings, and Unicode clients must be that a connection is established to a capable application server from configured to communicate in a non-unicode way with the ios a farm of application servers, if you plan to serve millions of ios server. You do that by setting the client's transport parameter devices. correctly: e. g. Update is a method that ensures that the current record in the query component is displayed in the visual controls. The reason is kbmmwtcpipindyclienttransport1.params.values that data binding is not fully supported in FMX on ios. [KBMMW_STREAM_FORMATTER_PARAM_NOUNICODESTRINGS] := '1' Hence our update method looks like this: Notice that wide strings are supported on ios and datasets containing ftwidestring fields are fully supported. However, service names and versions must be ansi strings; hence the above setting. Happy n-tiering on ios! 59

New V.10.00 available for DELPHI XE2-32 and 6 On ipad and iphone Full kbmmw support The Delphi Starter Edition now also has the ability to do multi tier development for no cost at all. Pro/Ent is available for Win32/Win6/OSX/FPC The CodeGear Edition is for Delphi XE2/Win32 only and provides access to SQLite in addition to the standard Delphi Starter Edition database connectivity frameworks, BDE and IBExpress. Delphi Starter Edition also lacks proper XML support and the local TClientDataset, which is also to be found as part of kbmmw CodeGear Edition in the form of TkbmMWDOMXML and the high performance TkbmMemTable. In addition its possible to upgrade to kbmmemtable Standard Edition for only US$30. The upgrade includes full source for kbmmemtable, and includes kbmsql which provides a SQL frontend to kbmmemtable. (client and server) For kbmmemtable now available: full XE2 support (32/6/osx) For kbmmw there are multiple new items: Remote Desktop Client/Server/Proxy Support, NEW JSON support, JSON streaming of kbmmemtable datasets, bugfixes and more. Improved HTML template support, improved Cookie Support etc. Lots of improvements related to using kbmmw as a web server producing dynamic web pages. kbmmemtable on Win6. Tests done: 10 million records in memory with multiple fields and indexes... ESB, SOA,MoM, EAI TOOLS FOR INTELLIGENT SOLUTIONS. kbmmw IS THE PREMIERE N-TIER PRODUCT FOR DELPHI / C++BUILDER BDS DEVELOPMENT FRAMEWORK FOR WIN 32 / 6,.NET AND LINUX WITH CLIENTS RESIDING ON WIN32 / 6,.NET, LINUX, UNIX MAINFRAMES, MINIS, EMBEDDED DEVICES, SMART PHONES AND TABLETS.