Category Archives: embarcadero

Delphi and RAD Studio XE2 gets its first update as Embarcadero confesses copyright issue

Embarcadero has posted its first update for Delphi XE2 and C++Builder XE2. Whether this shows commendable responsiveness, or that that the original release was buggy and premature, is a matter for debate.

Either way, the list of fixed bugs is extensive. There is also a copyright issue, since Embarcadero says – note use of that mightily abused word “may”:

We were recently made aware that some code in the 3D support in FireMonkey may be similar to code in GLScene, an MPL open source project. We worked with Eric Grange, a key contributor to the GLScene project to remedy the issue and replace the code in question.

Unfortunately applying the patch means a full uninstall and reinstall, though Embarcardero says that future patches will be based on this new build which I presume means this surgery will not be required again.

Delphi for Windows, Mac and iOS: screenshots and video of cross-platform development

Embarcardero is drip-feeding information about its forthcoming RAD Studio XE2 in an annoying manner; nevertheless the product does look interesting and promises cross-platform native code apps for Windows 64-bit, Windows 32-bit, Mac OS X and Apple iOS. I have grabbed some screens from a video recently posted by Embarcadero’s Andreano Lanusse; the video is also embedded below.

Here is Delphi XE2 showing a FireMonkey application in the designer. FireMonkey is a new cross-platform GUI framework.

image

Note the list of target platforms on the right. If you squint you can see 64-bit Windows, OSX, and 32-bit Windows.

image

How do you compile for the Mac? It is clear from the demo that Lanusse is running in a VMWare virtual machine on a Mac. He also has a Remote Profile option set to target the host Mac:

image

He then refers to a “Platform assistant” which you can see running in a terminal window on the Mac.  He is then able to compile and run from the Windows IDE:

image

Finally, he targets iOS, though this is a separate project, not just another target. The process exports the project to Xcode, Apple’s Mac and iOS IDE:

image

Next, we see the app running on the iPad simulator:

image

The ability to target the Mac is nice to have, but I suspect it is iOS that will attract more interest, given the importance of Apple’s mobile platform.

Here’s the complete video where you can perhaps puzzle out a few more details.

Update: there is also some Q&A in the comments here.

Graphics rendering is Direct2D or Direct3D on Windows, OpenGL on Mac. FireMonkey renders all components through the graphics API, it does not support use native OS components, though Embarcadero’s Michael Swindell says:

FireMonkey client area controls are rendered by OpenGL on Mac, but appear and work just like Cocoa controls – or however you want them to. There are many different Cocoa UI styles in OSX apps, and Firemonkey can render any of them – including iTunes, or Prokit which is an Apple UI style for Pro apps like Final Cut, not available to devs via Cocoa. Windows are Cocoa Windows and the client areas and all user controls are rendered by OpenGL in HD(2D) or 3D. Menus are std and rendered by Cocoa in the menu bar, and common dialogs are rendered by Cocoa. If the “true OSX” look isn’t for you, you’re welcome to use any included Style, download a custom style, or create your own custom style.

Swindell also addresses the matter of Linux and Android:

We do plan Linux and Android. But no eta yet until we get Win/OSX/iOS out. We would also like to provide language bindings for other languages.

Finally, a bit more about that Platform Assistant:

Developer requires a PC and a Mac (or Mac with VM running Windows). You will develop on Windows, and use the platform assistant (PA running on your Mac) to compile natively to your Mac and the PA handles debugging communication between the Mac and your IDE running on Windows. Delphi (or C++Builder) and Firemonkey create compiled stand alone OSX executables that you can sell/distribute to your users. They are native Mac apps. They “copy install” and run like any other Mac app, or you can use a Mac installer if you like.

What’s coming in Delphi RAD Studio XE2: more details of 64-bit and Mac announced, introducing FireMonkey

Embarcadero’s David Intersimone has posted more details of what is coming in the new version of Delphi and RAD Studio XE2, to tie in with an international publicity tour.

One intriguing comment is a reference to FireMonkey:

with FireMonkey, the GPU-powered next-generation application platform, you’ll be able to create visually stunning HD and 3D business applications

Here is the teaser list of features:

  • Create GPU-powered FireMonkey applications
  • Build 64-bit Delphi applications
  • Create a single application and target both Windows and OS X
  • Extend your multi-tier DataSnap applications with new mobile and cloud connectivity in RAD Cloud
  • Connect any visual element to any type of data using LiveBindings™
  • Modernize the look and feel of your Windows applications with VCL styles
  • Create mobile-optimized web applications and standalone apps for iOS and Android devices using RadPHP

Hmm, so RAD Studio XE2 is targeting iOS and Android not with Delphi, but with RadPHP. That suggests some sort of HTML and JavaScript approach rather than a true native executable.

I was not greatly impressed with Delphi for PHP when I first looked at it. That was four years ago though, and since then Embarcadero has acquired Qadram, the third-party developer behind Delphi for PHP, so I would expect something more worthwhile in the forthcoming new version.

Update: Embarcadero’s Andreano Lanusse has posted more details about FireMonkey.

Embarcadero RAD Studio XE2 will have cross-platform compilation

A Google search for RAD Studio XE2, presumably the successor to RAD Studio XE which includes Delphi, Delphi Prism (for .NET), C++ Builder and RAD PHP, throws up the following page:

image

The actual links need a login for a closed beta unfortunately.

Hmm, what caught my eye is the entry for cross-platform applications. Good to see this coming soon.

Embarcadero promises Delphi everywhere: Mac, iOS this year, Android, Blackberry, Windows Phone to follow

I noticed the following remark from Embarcadero’s David Intersimone regarding Delphi, its application builder based on Pascal.

We are putting Delphi (and C++Builder) everywhere this year and over the next 5 years. Today you can use Delphi for Desktop, Client/Server, Multi-Tier, Cloud, Web, Web Services (REST and SOAP). This year you will also be able to build for Macintosh and iOS. Linux is also on the roadmap for the coming years along with Android, Blackberry and Windows Phone 7.

Welcome news; though Delphi enthusiasts are all too familiar with bold promises. Two years ago I interviewed Embarcadero’s CEO Wayne Williams and he promised cross-platform Delphi in 2010; but when Delphi XE appeared last year neither Mac nor 64-bit (another longstanding request) was included.

That said, I am still a big Delphi fan. Mobile is a particularly interesting prospect. I have tried numerous cross-platform mobile toolkits and they all have problems; on the other hand they are improving fast and in a couple of years things like Appcelerator’s Titanium and  Nitobi’s PhoneGap may be hard to catch.

Update: what will Delphi’s Android support look like? I would be interested to know whether Embarcadero is working on its own compiler, or whether it is partnering with RemObjects and that what Intersimone is referring to is Project Cooper:

“Cooper” is a new and exciting research project going on in the RemObjects Software Labs, to bring the Oxygene language to the Java and Android platforms. The original Oxygene for .NET set out to bring a modern and “next generation” Object Pascal to the .NET world; Project “Cooper” is taking this endeavor to the next level, expanding the reach of Oxygene to the second big managed platform.

In other words, Project Cooper will compile Delphi code to Java.

Note that Embarcadero officially adopted Oxygene and offers it as its own product called Prism. It seems plausible that the same will happen with Project Cooper. Since Windows Phone is a .NET platform, there is also potential for Oxygene/Prism to target Microsoft’s mobile platform:

Windows Phone 7 – Microsoft’s new Windows Phone 7 uses Silverlight for application development,  and did I mention Delphi Prism does Silverlight?

says Jim McKeeth at RemObjects.

What about Delphi on the Mac and on iOS? There is also a possible Oxygene/Prism route here, via MonoMac: Delphi to .NET/Mono to Mac. However, I suspect Delphi developers would be disappointed if this turned out to be Embarcadero’s approach to Mac and iOS support. Programmers choose Delphi because they like compilation to native code.

Another Windows app store – but this time it is virtual. Embarcadero’s AppWave promises instant installs

Embarcadero has announced the AppWave Store, a forthcoming app store for Windows which uses application virtualization to avoid the hassles and risks of the usual Windows install process.

image

The idea is that purchasing apps for Windows will be as simple as installing an app on a mobile using the Apple app store or Android Market.

The underlying technology was developed to simplify deployment of Embarcadero’s tools. The All-Access subscription includes a tool box application that lets you run tools using “InstantOn”, which means no installation, just click and run. I have used this for a while now and it works well.

image

When you run an InstantOn tool for the first time, you are prompted to download:

image

There is of course a pause while the app downloads. This is not thin client technology where the app actually runs remotely. It is installed on your local machine, but isolated so there are no dependencies or conflicts.

image

Once downloaded, you just launch the application. No other setup, other than software agreement and registration prompt.

image

The download is cached, so you can launch next time without delay, and it works offline too. AppWave is a rebranded version of InstantOn, and is also available for internal deployment of Embarcadero tools.

The AppWave store takes this technology and applies to a store for the general public. Developers will pay $99 per year (though the fee is waived if you sign up now) and get AppWave Studio, which lets you convert software to run under AppWave. The conversion process is called “mastering” and only takes a few hours, according to the FAQ [pdf].

Windows XP, Vista and 7 are supported clients, availability will be worldwide at launch, and Embarcadero takes 30% of your sale price. No launch date has been announced.

I guess the first big issue is whether developers will feel that the 30% fee is good value bearing in mind that there are many other ways to sell and deploy software.

Second, there are other app stores out there or coming, not least Microsoft’s own which is likely to be part of Windows 8. Will AppWave compete effectively?

Third, does Embarcadero have what it takes to market AppWave and make a destination for Windows users looking for apps?

App virtualization is a neat trick though, and could save significant support costs as well as being appealing for customers. Deploying apps using runtimes like Silverlight or Adobe AIR can be equally seamless, but apps have to be written specifically for those runtimes, whereas AppWave works with apps written for the full Windows API.

It is surprising that Embarcadero is not also marketing the AppWave technology for developers for general purpose use. Possibly this is coming; or maybe the company will try to keep it as an exclusive benefit for the AppWave store. There are alternatives, including Microsoft App-V and VMWare ThinApp.

See also Marco Cantu’s post Understanding Embarcadero AppWave, which is what alerted me to the AppWave store.

Using SQLite 3 with Unicode in Delphi

I’ve updated my SQLite3 Delphi wrapper for Unicode in Delphi 2009 and higher. Previous versions of the wrapper ducked the issue by using Ansi strings throughout.

image

I actually used Embarcadero Delphi XE for the development, but I would expect it to work in Delphi 2009 and higher, since it was in that version that Delphi first properly supported Unicode. Converting older Delphi projects is meant to be seamless, except in cases where you are using pointers or doing interop with native DLLs; of course this wrapper does both.

The SQLite 3 API expects either UTF8 or Unicode strings. To be more precise, some functions have Unicode versions indicated with a “16” suffix, and some do not, in which case they expect UTF8 if they accept string values. Although UTF8 strings support Unicode characters, most characters generally occupy a single byte just as in Ansi strings, so one of the things I discovered was that I could not simply rely on PChar, Delphi’s null-terminated string type, which from Delphi 2009 is a Unicode type with double-byte characters. Instead, for cases where the SQLite 3 API expects a UTF8 string, I have used PAnsiChar as before.

It is all somewhat confusing, and there are a few cases where Delphi does not do quite what you would expect. I recommend Marco Cantu’s paper Delphi and Unicode [pdf], one of the best resources I found. This article by Nick Hodges on Unicodifying your code is handy too.

Finally, in the example I keep an object in memory and it is easy to end up with code paths that do not free it. I love this feature of Delphi (since at least 2007) which informs you of your mistake when the application closes:

image

I have uploaded the code and you can find it linked here.

Update: My assumption that Delphi 2010 would work the same way as Delphi XE was incorrect. I have some code that reads a blob field containing a UTF8 string and returns it as a string. I read the stream into a byte array and then cast it to a UTF8String:

str := UTF8String(bytes);

where str is a UTF8string variable. This worked in Delphi XE, but in Delphi 2010 I got garbage. I have modified the code to use a TStringStream and now it works in both.

Updated SQLite wrapper for Embarcadero Delphi (and Free Pascal)

A while back I worked on a Delphi wrapper for SQLite 3, which I published on this site as an open source project. Others amended it to support Free Pascal and Lazarus, so you can use it on Linux and on the Mac. I’ve not touched it for a couple of years; but recently received an email requesting support for the SQLite 3 backup API. There are only a few functions involved so I added them to the wrapper, and also updated the Sqlite DLL to version 3.7.5.

Although I used Delphi XE to work on the wrapper, I did the build for the repository with Delphi 7, running in a virtual machine, because I know this version still has plenty of use. The problem though is that Delphi 2009 introduced full Unicode support, causing compatibility issues. My wrapper is compromised because it uses the old AnsiString, so that it works with all Delphi versions. I have in mind to fix this so you get full Unicode support when I have time to do so.

There is no support for Delphi’s data binding, and the wrapper appeals to developers happy to code their own SQL. Of course it works like lightning.

Delphi and C++ Builder XE Starter Editions announced

Embarcadero has announced Starter Editions for both Delphi XE and C++ Builder XE, rapid development environments for native Windows applications.

These are not toy versions. The main technical difference between the Starter editions and the Professional versions are the absence of UML modelling, Class Explorer and Resource Manager tools. You also miss out on code completion for HTML, Live Code Templates, Subversion support, translation manager, refactoring and unit testing.

Not a big deal: most of these lacks are either not critical or can be addressed in other ways. Most features are the same, and you can build excellent high-performance applications with these Starter Editions.

The real restriction is the licensing:

Delphi XE Starter can be used by individuals who will earn less than US $1,000 for the applications they create with Delphi, or organizations or companies with five or fewer developers and less than US$1,000 in total annual revenue. Purchase the Professional edition or higher for larger scale commercial use.

with a similar wording for C++ Builder XE Starter.

The other question: how much? At the time of writing the Starter Editions are not in the online store, but according to this article in SD Times they will be $199 each or £149 for upgrades. Ownership of a Starter Edition gives you $100 discount if you later upgrade to a higher edition.

Delphi is as good as ever, especially bearing in mind that Microsoft has no real equivalent. Visual Studio is mostly .NET-based, whereas Delphi compiles to native code; and Visual C++ is more challenging to learn and arguably less productive. It is true that developers are waiting impatiently for 64-bit Delphi and for a promised compiler for OS X (and perhaps iOS?); but in the meantime if you need to build Windows applications do not ignore it.

Update: the European price is €199 each, or upgrades for €149.

Delphi XE still not quite ready for Vista/Windows 7

I’ve successfully installed Embarcadero RAD Studio XE (including Delphi). I’m running Windows 7 64-bit. On first quitting RAD Studio (which is still called bds.exe – it stands for Borland Development Studio) I got this message:

image_thumb2

Fortunately I know exactly what this means. Read here for my earlier explanation. And if I go to the registry editor I can see these entries:

image_thumb4

I also still get the error:

Error executing ‘C:\ProgramData\{7DE921C9-42C8-4DA3-8A44-043C3349FD1D}\Setup.exe’: The requested operation requires elevation

In one sense the error is not important, and the dialog does not reappear. It is still an ugly dialog, and as you can see from my Registry Editor, not a new one. Maybe next time?