specialising in clinical database solutions for Australian hospitals
Posts tagged Delphi
Upgrade your project to Delphi XE6 and add VCL Styles to give a modern look – watch out for a few issues
Jun 27th
I have successfully migrated my very complex Delphi XE database application to Delphi XE6 after upgrading my 3rd party control sets such as Infopower, 1st Class, Devart’s UniDac, QuickReports and TMS Smooth controls.
Adding a VCL style to your application:
So I decided I would add in some VCL Styling which is extremely easy to add in – just go to Project Options, Application, Appearance, then tick the VCL styles you would like available to your application (these will be stored within the EXE), and select your Default style via the drop down box at the bottom.
The Delphi IDE writes to your project source file (the DPR file) the following: adds vcl.Themes and vcl.Styles to the Uses clause, and adds the default style to your application run code such as: TStyleManager.TrySetStyle(‘Aqua Light Slate’);
The files for the VCL Styles are located at C:\Users\Public\Documents\Embarcadero\Studio\14.0\Styles.
Don’t forget, you may be able to download Embarcadero’s “Premium Styles Pack” as part of your purchase of Delphi or RAD Studio – if so you will need to copy these to the above folder. This pack includes “Diamond”, “Jet” and “Sterling”
Let your user change style at runtime:
If you wish to allow your end users to change styles at runtime, then you can create a dialog form, place a combobox on it and add code:
Uses vcl.Themes, vcl.Styles;
procedure TdlgStyling.ComboBox1Change(Sender: TObject);
begin
TStyleManager.TrySetStyle(ComboBox1.text);
end;
procedure TdlgStyling.FormCreate(Sender: TObject);
var i:Integer;
begin
for i := 0 to High(TStyleManager.StyleNames) do
begin
ComboBox1.items.Add(TStyleManager.StyleNames[i]);
if (TStyleManager.StyleNames[i] = TStyleManager.ActiveStyle.Name) then
ComboBox1.itemIndex := i;
end;
end;
A few gotchas to take care of:
Not all controls display well with every style, so either avoid the style or turn off styling for the controls.
Things to watch out for include:
- readability of hints – especially on the 1st Class OutlookBar
- readability of coloured grid cells, especially if you set an Infopower wwDBGrid cell to pink or green and the style converts your black font to a light font.
- readability of Infopower wwDBGrid title buttons – you can set DisableThemes or DisableThemesInTitles to True.
- control brush colour will get over-ridden by styles – if you want toi ensure a particular colour is used, you will need to turn off style elements of seFont and seClient for that control, but you could probably leave seBorder active.
- you may need to make some controls larger such as radiogroups as the checkboxes may become larger with certain styles.
- some controls do not display or function correctly with styles active such as:
- TwwDBRichEditMSWord on a dialog form displays some of the background form until the scrollbar is moved by the user – thus turn OFF style elements seClient and seBorder
- TDateTimePicker – becomes a unusable mess with corruption of the form display if user tries to change date – thus turn OFF style elements seClient and seBorder
- some colour schemes will just not suit your app!
- allowing 28 of the provided styles available in your application will increase your exe size by about 1.3Mb in reality you would probably only use 1 orgive a few options at most.
Menus will get deranged if any menu items have visible = false and a VCL style is active
This is a Delphi vcl bug and applies to both TMainMenu and TPopup – items get changed in position and become associated with incorrect OnClick events!
There are a few reports posted on Quality Central indicating there are issues with DXE6 Update 1 – see http://qc.embarcadero.com/wc/qcmain.aspx?d=124944 and similar.
Menu issue workaround: The issue appears to resolve if you ensure there are no menu items with visible := false.
Access violations may occur which need sorting out:
Code which previously appeared to work flawlessly, may throw access violations as soon as you have a VCL style running
This may be happen due to some unorthodox ways forms are used – I managed to fix one of these by removing a call to a password dialog from the mainform’s OnCreate (I had it there as I used the type of log on to customise how the main form displays.
Making your own styles:
Delphi IDE includes are tool to let you do this – see Tools > Bitmap Style Designer
More information on VCL Styles:
http://docwiki.embarcadero.com/RADStudio/XE6/en/Working_with_VCL_Styles
https://code.google.com/p/vcl-styles-utils/source/browse/#svn%2Fwiki
Upgrading from Delphi XE to Delphi XE 6 – relatively painfree but some issues
Jun 26th
Issues for those upgrading from Delphi XE to XE6:
Variants.EmptyParam issue:
If you use COM, in addition to this not being cross-platform technology, if your code passes Variant.EmptyParam (as an OLEVariant) in code XE or earlier, you will need to modify your code as EmptyParam as of XE2 is a function not a OLEVariant variable you can pass as a Var in a procedure or function.
Solution:
To solve, this, for each var parameter, you must explicitly declare a variable as an OLEVariant, then use that variable in the procedure or function after you have set it’s value to Variants.EmptyParam.
for example:
procedure doSomeCOM;
var docfilename, docpassword:Olevariant; docs: Documents; doc:Document;
begin
docfilename := ‘mydoc.doc’;
docpassword := Variants.EmptyParam;
Docs := WordApp.Documents;
Doc := Docs.Item(Index);
Doc.someCOMFunctionTakingOLEVariants(docfilename, docpassword);
end;
NativeInt instead of Integer in some procedures and functions;
This will require changing variables for some functions such as Application.OnHel from LongInt to NativeInt;
Deprecated and removed Delphi language:
sysutils.shortdateformat no longer compiles, you need to create a variable of TFormatSettings, then you can access the global shortdateformat
More upgrade issues:
You will need at least 30GB free hard drive space on your C: drive to actually do the install!
BDE on 64 bit Windows:
See my earlier blogs on running this but assuming you have it running successfully, if you had BDE ticked in the Delphi XE6 install wizard then you may find you need to go into regedit and manually ensure that the path to the BDE library is correct. under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Borland\BLW32\
You will need to download and install the latest versions of other code sets such as:
Jedi JCL – 17th April 2014 version installed without issue
Jedi JVCL – I couldn’t get this one to load the jvclstdcontrols due to an error in the entry point – keep an eye out for latest version
IDE Fix pack – you need v5.6 for XE6 but seems there is no update of the MIDAS speed fix – so I disabled the older version I had as it caused syntax error.
Quickreports – at least their XE to XE6 upgrade is free BUT seems now you must explicitly set the default printer by adding qrepname.PrinterSettings.PrinterIndex := -1;
Infopower Studio – but now there is also a Firemonkey component set – but not for the 1st Class VCL components at this stage at least.
Unidac database components from Devart – if you don’t want to try the task of migrating your code to Firedac components
TeeChart Pro – Delphi XE 6 does come with standard and “Lite” TeeChart components sets but if you need pro then you need to upgrade.
Is it time for Delphi XE VCL programmers to upgrade to Delphi XE 6 before the 30th June 2014 offer expires?
Jun 19th
Delphi programmers who have not upgraded since Delphi XE and thus have been very happy just sticking to their VCL programming have until 30th June 2014 to upgrade to Delphi XE 6. After this date, they will not be able to upgrade but will have to pay the full NEW price of the latest Delphi or RAD Studio version.
Should one upgrade now from a purely financial view point?
Short answer … probably yes especially if you really want to start using the many new features of XE 6 now rather than wait for XE 7 which will presumably be even better and will presumably have additional features such as support for iOS 8 development, Bluetooth tethered apps, etc.
Let’s do a little math using the Australian retail prices:
If we assume Delphi XE 7 prices will be similarly priced, then later this year or early next year, one could “upgrade” to Delphi XE 7 Enterprise via 3 mechanisms:
Buy Delphi XE 6 Enterprise now then upgrade again:
- Delphi XE6 Enterprise upgrade from XE Enterprise = $AU2027 + 10% GST = $AU2290
- Upgrade 3rd party tools from XE versions: QuickReport = $0 as same major version; Infopower Studio = $AU450; TMS packs eg. $AU 300; TeeChart Pro. ~$250 = $AU1000
- Delphi XE 7 Enterprise upgrade (“recharge”) from XE 6 Enterprise = $AU963 + 10% GST = $AU1059 (NB. RRP is actually $AU1624!)
- Upgrade 3rd party tools from XE6 versions – may be minimal if the subscription license is for 12-24 months
- Total cost = $AU2290 + $AU1000 + $AU1059 = $AU4349
Purchase Delphi XE 6 Enterprise upgrade and maintenance:
Cost for the upgrade to XE 6 will be ~$AU1000 more but then you get the next new version(s) released in the following 12 months for free – presumably that will give you XE 7 and XE 8, so it could be more cost effective than going for just a re-charge to XE 7, particularly, as I understand you also get access to every prior version as well which can be handy.
Ignore Delphi XE 6 and await Delphi XE 7 Enterprise:
- Delphi XE7 Enterprise new price = $AU3379 + 10% GST = $AU3717
- Upgrade 3rd party tools from XE versions: QuickReport = $0 as same major version; Infopower Studio = $AU450; TMS packs eg. $AU 300; misc. $250 = $AU1000
- Total cost = $AU3717 + $AU1000 = $4717
Conclusion – buying XE 6 now will get you started on the new features, and may just save a few hundred dollars (even more if you decide you don’t really need the XE 7 upgrade).
What do Delphi XE VCL programmers gain by upgrading to Delphi XE 6?
FireDAC database components and technology
- very easy to migrate legacy BDE apps to FireDAC which is a far better solution than the now deprecated BDE
- easily support different data types when programming for different databases such as Oracle vs MS SQL Server
Compile for 64-bit Windows applications
VCL styling – but XE6 Update 1 has bug issues with menus if any menu item has menuitem.visible = false
Live bindings to allow making almost any control data aware with a much improved binding interface
Easy REST client programming
Support for Windows 8 and “metro” style windows apps optimised for touch
Support for portable device sensor technologies such as location, gyroscope, etc.
Taskbar manager to allow nice taskbar icons showing app screen shots or button controls
Improved Datasnap
Zip file support
Easier remote debugging
Improved IDE Insight to help you find things while you program
App tethering
- this allows your apps to easily discover and talk to each other across a network – this could be Win-Win or Win-iOS or Win-Android, etc
- NB. Bluetooth tethering will probably come in XE 7
Improved IDE stability and quality control
Access cloud based BaaS – although these services are quite expensive
Wait, and there is more – the now maturing FireMonkey cross-platform technology
Much of the initial issues and bugs in FireMonkey and the process of developing for other platforms such as MacOS, iOS 7, and Android has been improved and simplified.
XE6 now also allows Google Glass development.
In app monetization via advertising banners and in-app purchase functionality – BUT only for Android and iOS apps
If developing native apps for these platforms is important then one should at least consider what FireMonkey can offer.
Others may prefer to just create web apps based upon HTML5 technology, but this may miss out on providing the same user experiences.
And as and added bonus, before 30th June – you get one free Embarcadero tool and some free goodies :
The price of the Embarcadero tool cannot exceed the price of your upgrade, and you must have installed and registered your upgrade, then accessed the bonus tool before 15th July.
The other free goodies include TMS VCL components including Smooth Controls Pack, Metro Pack and Windows 7 pack, total value of which would be worth around $AU300.
More information:
The ADUG president, Lachlan Gemmell, has created an excellent webinar describing these benefits for VCL programmers and this can be downloaded from Steve Arena’s online store for free.
What can we expect in Delphi XE 7 later this year?
- Multi-Device Designer and Smart Layout Components.
- iOS Native Controls.
- DataSnap (EMS) device tracking/reporting mgmt. console, etc.
- Bluetooth component with App Tethering Support.
- More device support (Pebble Watch, Google Wearables SDK).
- iOS8 and Android version upgrade.
- more bug fixes – especially the VCLStyles menu bug – although hopefully this will be addressed in XE6 via a hotfix
Happy upgrading.
Migrating to DevArt’s UniDAC database connection components
Feb 13th
I have a complex Delphi 2007 multi-user 24×7 MS SQL Server and Sybase ASE database application which uses dozens of TClientDatasets connected to TDatasetProviders which then connect to separate datamodules containing TDatasets (eg. TQuery or TSQLQuery) which link to a connection component (eg. TDatabase or TSQLConnection).
I have 3 almost identical versions with different datamodules:
- a BDE version using TQuery components and this gives good performance and can do nested SQL statements but the BDE is problematic to install in a network environment, particularly with 64bit windows becoming more common, but more importantly, the BDE truncates varchar fields to 255 characters which is very limiting unless in SQL you convert them to text in which case they become memo fields, but then you need to inform user their input will be truncated to maximum of varchar setting.
- a DBExpress version using TSQLDatasets which gives good performance but tends to have a few issues and cannot do nested SQL statements for complex reports.
- an ADO version using TADOQuery components which gives poor performance, presumably as the ADO components also cache the data as do the TClientDatasets. I no longer use this version.
The word from Embarcadero now that they have purchased the excellent 3rd party database components – AnyDAC, is that AnyDAC will be included in Delphi XE4 – presumably late 2013 – but is no longer available for purchase separately, and that the DBExpress technology is likely to be deprecated given they had troubles addressing a few of its issues.
Given this news and not wanting to wait until Delphi XE4, I decided to jump in and buy DevArt’s UniDAC components for Delphi which come highly recommended.
The process of migration and the issues it raises.
After installing the Unidac components – very painless process indeed, you will discover a new item on the Delphi IDE menu bar – UniDAC under which you will find a Migration Wizard tool.
The good news is that the Migration Wizard is very easy to use and seems to work well by converting the BDE components to UniDAC components – just tell it which folder to convert and away it goes (best to back everything up first of course, although the wizard does have an optional backup functionality).
The bad news is that although the wizard will migrate from BDE, ADO and other DevArt components such as SDAC, there is no option to migrate from DBExpress – this seems like it would require a significant amount of search and replace work in the pas and dfm files.
Obviously some BDE features will not be supported such as aliases and if your database connection or your code relies on this then these aspects will need addressing.
You will have to set the properties on the TUniConnection component (UniDAC database driver, server, database, username, password, then look in SpecificOptions to enter ApplicationName, WorkstationID, etc), plus you will need to reconnect all your dataset.connection properties to the TUniConnection component, plus if you are like me and using TClientDatasets, then you should set all the TUniQuery.UniDirectional = true.
If any of your SQL has double quotes, these will need to be changed to single quotes – easiest way to do this is by opening the datamodule as text file (right click then select “View as text”), then do a search and replace, replacing all ” with two single quotes.
Finally, you will need to drop the UniDAC provider components onto your datamodule – eg. TSQLServerUniProvider, TASEUniProvider.
Issues thus far:
- certain TClientDatasets with Sybase “text datatype” fields crash the system when active set to true in either IDE or runtime if using the Sybase ASE connection – I am yet to work out what specifically is causing this when other similar datasets function well, and the TUniQuery opens rapidly without issue and the supplied DevArt dbMonitor suggests all is well. This is presumably an issue with the Sybase ODBC driver rather than UniDAC, and I would try changing to the DBExpress Sybase driver via UniDAC if I didn’t have to change all my datetime fields to SQLTimestamp fields.
- UniDAC TUNiQuery does not allow nested SQL statements even if these are returning a single dataset.
- Sybase ASE, Access, DB2, DBF databases are accessed via ODBC driver instead of a Direct UniDAC driver as is the case with Oracle, MS SQL Server, PostgreSQL, SQLite, and NexusDB
- I am getting key violation errors which I didn’t get with record inserts with the BDE version – this may be related to the Sybase ODBC component – will investigate
Benefits of UniDAC:
- no dll’s or BDE to install on end-user system which allows for a self-installing, self-configuring application to be easily made
- performance seems good
- ability to use multiple database engines and even write database-specific SQL with macros allowing clauses such as if Oracle then … etc. “server-independent SQL”
- built-in debug option – set debug property to true and when dataset is opened, a dialog will display the SQL statement being sent
- supplied with a dbMonitor which will show each SQL command sent, including parameters and time taken – just drop a TUniDBMonitor component on your datamodule and set it to active to allow this functionality (dbMonitor must be running prior to running your application).
- it has far more versatility than DBExpress including:
- ability to do SQL batch scripting to create and delete tables.
- map data types – this can be particularly useful when using persistent fields and different database drivers
- encryption functionality
- assign table update SQL statements – although not needed if using TClientDatasets
- stored procedure call generator
- improved transaction control
- ability to set a server table lock mode for each TUniQuery
- each UniDAC driver has server specific options which can be set and these as well as the UniDAC driver are compiled within your application
- ability to use other DevArt drivers such as SDAC if you need even more control over SQL Server or you wish to access SQL Server Compact Edition.
- Disconnected Model with automatic connection control for working with data offline
- Connection timeout management
- Ability to search for installed servers in a local network
- Local Failover for detecting connection loss and implicitly reexecuting certain operations
- it seems fairly simple yet versatile
Delphi XE3 announced
Aug 24th
Embarcadero’s Delphi RAD Studio programming IDE has a new version coming Sept 2012 – Delphi XE3.
I attended their World Tour presentation in Melbourne today and this post is to briefly inform of the new features it brings.
Windows 8 support:
- easy VCL or FireMonkey form conversion to Windows 8 “Metro” style
- ability to compile Windows 8 Desktop applications (32bit or 64bit) in either Delphi Object Pascal or with C++ (although 64bit C++ compiler will be in Q4)
- new Windows 8 GUI “Metropolis” components such as MetropolisUIListBox
- Office 2013 styling
- Live Tiles WinRT support (but no WinRT application Delphi compiler as yet – this is coming, although you can compile WinRT apps using Delphi Prism and .NET via Visual Studio 2013)
- video playback utilises DirectShow
- support for gyrosensors, location services, etc
- support for Surface Pro and Slate tablets
- “Fat Finger” touch ready
- the “Metropolis” Win8 Metro GUI-style Desktop apps can be used on Win XP, Vista, Win 7 or Win 8 and work as touch-enabled apps thanks to Delphi gesture control functionality
Mac OS X Mountain Lion support:
- FireMonkey components automatically can detect and be optimised for pixel-perfect display on either Retina or non-Retina displays in the same binary executable
- video playback utilises Quicktime
- non-client area FireMonkey styling
- Mac Apple store compatible
Revamped Firemonkey framework:
- vector based, cross platform FireMOnkey framework was introduced in Delphi XE2
- the framework has been revamped in XE3 and is now called FireMonkey2
- it has been simplified via adding Visual Live Bindings, wizards, and support for anchors, layouts, non-client area styling, audio/video controls, actions and action lists
- Mac OS Retina display optimised
- a new component TPrototypeBindSource allows one to automatically generate a virtual dataset complete with data to link to to assist with mock up application development without need to create an actual database, and this component can also be used to create Live Bindings to custom classes.
- TDatasource is no longer needed, just link a BindSource to a dataset such as TClientDataset
New Visual Live Bindings:
- makes creation of Live Bindings far easier – just drag and drop
- ability to group various Live Bindings together into a “layer” which allows simplification of the visual appearance of these by optionally “disabling” other layers to make the layer you are working with easier to see.
- layer data is stored in files with extension .vlb
- seems the Visual Live Bindings functionality can only represent one form at a time?
- improved dataset lookup support
- can be used in VCL or Firemonkey
New HTML5 Builder:
- a totally revamped IDE of what was formerly RadPHP
- visual design of HTML5, CSS, javascript for client side, while using PHP scripting for server side web apps
- utilises jQuery technology
- deployment to mobile devices via PhoneGap services
- “Phonegap takes your generated html, javascript and css files and injects it into a real .exe file for both Android and iOS. This real .exe file creates it’s own browser instance, puts the browser in full-screen – and disables the security restrictions that public browsers impose on you. Once wrapped, you can create persistent (non cached) databases beyond the usual 5 to 10 megabyte limitation.”
- extensive code completion and help
- embedded multimedia playback in web browsers
- as I understand, this module does not allow one to program in Object Pascal while the compiler generates javascript so it will be interesting to see how this compares with IDE’s which generate HTML5, javascript from Object Pascal code such as Smart Mobile Studio (costs ~$450)
“Mobile”:
- there will be a new, separate software package for compiling native mobile apps for iOS, android, Blackberry, and Windows Phone 7 called “Mobile”
- this can be purchased and used separate to Delphi, or it can be added into the Delphi IDE as an optional add-on
- it is NOT included in RAD Studio XE3 pricing!
- it REPLACES the Delphi XE2 mechanism for compiling mobile apps which relied upon FreePascal and compiling in XCode
- the new mechanism is MUCH easier to use and does not require external management
- allows same Object Pascal code to generate native iOS, Android apps
- new Interbase ToGo database can be deployed to mobile devices as an alternative to SQLite
- Datasnap compatible
- SQLite driver for DBX
- supports device hardware such as gyro, GPS, camera and accelerometer
- mobile device form designers
Delphi XE3 is a very timely product launch which will leverage the new requirements of Windows 8, and Mac OS Retina displays whilst significantly extending and simplifying cross-platform and mobile application development with tools such as FireMonkey and HTML5/CSS/javascript apps.
This will be a must buy version for those interested in such application development.
Connecting to a password-protected Microsoft Excel spreadsheet using Delphi TADOConnection
Mar 11th
There is a little trick to connecting to a password protected .xls Excel spreadsheet using the Jet 4.0 OLEDB driver.
If one uses the obvious Password=xxx;User Id=Admin you will get an error “Workgroup Information file missing or file is in use by another user”.
The ADOConnection will return an active connection is using the following connection string but in Delphi 2007 I am still getting an error on trying to read the file “Could not decrypt file”.
So here is the Connection String which will open the connection successfully in Read Only mode:
Provider:=Microsoft.Jet.OLEDB.4.0;Data Source=C:\temp\MyExcel.xls;Mode=Read;Extended Properties=Excel 8.0;Jet OLEDB:Database Password="xxx";
It appears that “Could not decrypt file” error is due to a well known limitation of the Jet OLEDB 4.0 engine in that it always returns this error on trying to read a password protected Excel file even if passwords are known.
The hack around this is to open the file in Excel first in full read/write mode BEFORE opening the TADOConnection – just opening it in READ ONLY mode in Excel WILL NOT work!
This is not only an issue in Delphi but in any application that uses Jet 4.0 OLEDB engine.
Of course, another solution is to use COM OLE automation such as:
- CreateOLEObject method – see here
Excel 2007 and higher files (.xlsx):
If you are dealing with .xlsx Excel 2007 or later files, you cannot use the Jet engine, but you can use the ACE OLEDB driver:
- ACE 32bit OLEDB driver if 32bit Office is installed:
Provider := Microsoft.ACE.OLEDB.12.0;Data Source="C:\temp\MyExcel.xlsx";Extended Properties="Excel 12.0 Xml;HDR=YES;
“;Jet OLEDB:Database Password=””;- ACE 64bit OLEDB driver if 64bit Office installed and 64bit ACE installed:
Provider := Microsoft.ACE.OLEDB.14.0;Data Source="C:\temp\MyExcel.xlsx";Extended Properties="Excel 12.0 Xml;HDR=YES;
“;Jet OLEDB:Database Password=””;- NB. YES you read correctly, that is Jet OLEDB:Database Password=””; and NOT ACE OLEDB:Database Password=””; !!! AND strangely enough, you can connect to a password protected file without supplying a password at all BUT, whether or not you supply a password, the password protected Excel file MUST be already open in full edit mode within Excel first!
- NB. to install ACE 64bit on a machine which already has ACE 32bit installed, use command line: AccessDatabaseEngine_X64.exe /passive
- to connect to Excel 97-2003 .xls via ACE use Extended Properties=”Excel 8.0;HDR=YES;”
- to connect to Excel 2007-2010 .xlsx via ACE use Extended Properties=”Excel 12.0 Xml;HDR=YES;”
- to connect to Excel 2007-2010 .xlsm via ACE use Extended Properties=”Excel 12.0 Macro;HDR=YES;”
- to connect to Excel 2007-2010 .xlsb via ACE use Extended Properties=”Excel 12.0;HDR=YES;”
- if you get the error “could not find installable ISAM”, you have probably made an error with the connection string.
- unfortunately, if the Excel file is password protected to read, you will get an error “External table is not in the expected format” unless it is already opened in Excel and user has edit rights to the spreadsheet! So we have the same old situation as with the Jet OLEDB provider!
- and don’t bother trying Password=”xxx”;User ID=Admin; as additional parameters, because as soon as you add a value for password, you get the same old Jet issue of “The workgroup information file is missing or opened exclusively by another user”.
Database application development pathways with RAD Studio XE2
Aug 30th
Embarcadero’s RAD Studio XE2 allows the following database development pathways:
Delphi Object Pascal or C++ generated DataSnap middle tier data servers which run on a Windows server and allows the following thin clients to connect to it:
- Delphi Object Pascal or C++ VCL WinForms clients compiled for either Win32 or Win64
- Delphi Object Pascal FireMonkey compiled for native client application for any of the following platforms:
- Win64
- Win32
- Mac OS X
- iOS
- and in 2012, Linux and Java for Android
- via Mobile Connectors:
- Eclipse compiled java client for Android
- XCode compiled iOS client for iPad, iPhone
- Blackberry client
- Windows Phone 7 client
- isapi.dll web client hosted on a Windows web server
- RADPhP web application hosted on a web server (requires the DataSnap server to be a REST application)
- RADPhP mobile application packaged for mobile devices via PhoneCap
- .NET client created using Delphi Prism (REMObject’s Oxygene) Object Pascal for .NET running in MS Visual Studio
- ASP.NET web database application created using Delphi Prism (REMObject’s Oxygene) Object Pascal for .NET running in MS Visual Studio.
- Java client created using REMObject’s Cooper project – Object Pascal for java running in MS Visual Studio (in development)
Third party REMObjects is extending its Hydra technology to allow FireMonkey plugins to work on VCL Winforms, and vice versa, as well as WPF plugins to work in FireMonkey apps and vice versa – see here.
RADPhP web database application using MySQL database.
Embarcadero’s RAD Studio XE2 Delphi upgrade brings new exciting technology opportunities – native Win32, Win64, OSX, iOS, and Android apps and a new development platform – FireMonkey!
Aug 4th
Delphi developers are in for a big surprise as the World Tour of RAD Studio XE2 brings them some very unexpected opportunities as well as the expected Win64 compiler.
Here are a few of the new features in XE2:
64 bit Windows compiler:
- for most Win32 projects, just select compile to Win64 and you have native 64bit Windows executable or DLLs!
- if your project uses 32-bit assumptions, then these will need to be addressed, but otherwise it should just work.
- NB. NativeInt, NativeUInt, pointers, indexes to dynamic arrays, tag properties (now nativeInt) are 64bit
- Use your same source code and project files – just select an additional platform to build for in the project window
- Use the same Windows API calls in your code, although Microsoft have renamed some (eg. SetWindowsLong is now SetWindowsLongPTR)
- Use the same Runtime Library classes and functions
- Use the same VCL components and non-visual components
- new compiler directives include Win64, CPUX64
- can only access 64bit versions of dlls, ActiveX controls, bitmaps and COM objects (eg. 64bit MS Office will only work with 64 bit exe’s and vice versa)
- Win64 now ignores register, pascal, cdecl, and stdcall, so these are ignored in 64bit compilations.
- No Extended type
- issues with assembly code, SHL and SHR
New FireMonkey GPU framework for NATIVE deployment to Win32, Win64, OSX, iOS and Android:
- 1st the bad news – to convert your existing projects, you will have to migrate all your VCL-based code and components to FireMonkey components as the two are not compatible in the same project (because it does not directly use Windows messaging like the VCL does), and instead of data-aware components as in VCL, we now have Live data bindings for all components (these are also now available in VCL)
- Now, the fantastic news:
- awesome 2D and 3D rotatable, visual forms and components with enormous potential for native GUI apps
- you can apply the Gaussian Blur filter on your form at a strength you deem appropriate when a modal form is activated in front of it
- improved animations of visual controls
- compatible with TClientDataset and DBExpress components
- NATIVE deployment as Object Pascal code to target platforms including iOS and thus satisfies Apple’s iTune apps requirements
- Create a single application and target both Windows and OS X
- the framework makes extensive use of interfaces to establish contracts, not inheritance
- it is not managed code like .NET nor does it use AIR, Silverlight, HTML5 or CSS for its functionality but native code
Enhanced DataSnap DBExpress functionality:
- DBExpress ODBC driver
- new mobile and cloud connectivity in RAD Cloud – Microsoft Azure and Amazon support
- supports https
- new Datasnap server functionality includes client connection information and management of the connection from the server with ability to limit number of requests per connection, and ability to detect connects, disconnects, and to forecfully disconnect clients.
- DataSnap clients can be created for nearly every common device natively via FireMonkey although Linux, Android and Blackberry devices currently are limited to using java Datasnap mobile connectors, while Windows Phone 7 devices are limited to using C#/Delphi Prism Datasnap mobile connectors.
- one creates an Android Datasnap client in Delphi XE2 by creating a REST application and ticking the mobile connectors option which adds a DSProxyDispatcher component which will generate project java files such as DSProxy.java which can then be imported into Eclipse IDE for packaging as an Android app.
Enhanced VCL functionality:
- the VCL is NOT being made redundant as it is needed for Windows specific applications (eg. using COM, etc) and backward compatibility
- new functionality includes option of using the incredibly versatile LiveBindings functionality (see next post on FireMonkey) and new VCLStyles which allows a different mechanism of skinning to FireMonkey as it allows the use of a vsf file to be loaded at runtime, or added to the executable in Project options application appearance section, and then allows use of TStyleEngine and TStyleManager to set styles or load from file, but these styles are not applicable to menus, popupmenus or ribbons.
New RadPHP functionality:
- rich jQuery mobile components
- Create mobile-optimized web applications and standalone apps for iOS and Android devices using RadPHP – PhoneGap wizard allows packaging your application by creating java files for import into Eclipse java IDE, selecting a target platform (eg. Android v2.2) and running in the emulator before uploading to the Android store.
- Create mobile optimized web applications that work on all types of mobile devices with elements that behave similar to native mobile apps.
- Take advantage of touch optimized layouts, user interface elements, and professional looking theming using HTML5, CSS3, and JavaScript on the client and PHP on the server in an easy-to-use and visual way that only RadPHP can offer.
- Using jQuery in RADPHP and a technology called PhoneGap, you can now package up a PHP application and deploy it as a native Android application
Very exciting times indeed!!
You can register for the Australian part of the World Tour demonstrations here – the Melbourne event is next Thursday, the 11th August 2011.
Microsoft buys Skype for $8.5 billion – not bad for a Delphi application!
Jun 3rd
Skype was written in Delphi which made it easy to download to users with any Windows machine without having to worry about users having to download MB’s of java or .NET support files.
This ease of configuration from the net was one of the reasons that made Skype so popular.
It will be interesting to see what Microsoft does with it now that Google is also entering into the VOIP marketplace with its Google Voice product which uses SIP addresses (SIP technology is now in some of the new mobile phones) – Google Voice is currently only available in the US.
Recent Comments