Category Archives: delphi

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.

DevExpress developers ask for more Windows Forms, say Silverlight and WPF not ready

DevExpress, which creates add-on components and tools for Windows and Delphi, has posted its 2011 roadmap. This shows more convergence between components for Silverlight and WPF:

In essence, by the end of the year, the functionality of DXGrid, DXEditors, DXDocking, and DXRibbon will be the same across both platforms.

As for Windows Forms, or winforms, the roadmap says:

With regard to the Windows Forms controls, it is most likely that there will be a large number of smaller enhancements and new features rather than any large complex new control. The reason for this is simple: we believe that our offerings for this platform are very mature and robust.

Customers posting comments to CTO Julian Bucknall’s blog are not happy:

It is sad to see Winforms pushed back so much. WPF is still too slow on most computers for major apps and SL is not mature enough for a complete ERP app.

says Sigurd Decroos, while Heiko Mueller is more blunt:

Sorry guys, but with this roadmap I will not extend my subscription. I use only WinForms and ASP.NET and I’m not interested in WPF/Silverlight – WPF at this time for me is not suitable for my kind of applications (larger business Apps). Silverlight in my eyes is a dead technology – HTML5 is the future for rich internet applications.

Porting is also an issue says Ioannis Mpourkelis:

I believe that you should put more resources on the WinForms controls for 2011. Winforms is here to stay for many years, especially for the companies who want to support existing Winfroms applications. Currently it is impossible to port WinForms applicaitons to Silverlight and very difficult to port WinForms applications to WPF.

Check the full comments for more.

More evidence for the uncertainty around where Microsoft is going with its rich client API.

Update: Bucknall comments on this specific issue here.

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 includes licenses for older versions back to Delphi 7

I’ve just picked up that Delphi XE, the latest RAD Windows development suite from Embarcadero, includes licenses for older versions going back to Delphi 7.

There’s an explanation and list of what’s on offer here. Delphi 7 was the last version to use the old fully native code IDE and is delightfully fast and lightweight by today’s standards. Delphi 2007 was the last version before big Unicode changes in Delphi 2009, which often broke code, so could be useful for older projects.

The FAQ includes a few points of interest. Embarcadero is dismissive of the old Delphi for .NET (before Prism) and will not supply it:

That is an old technology that was replaced by Delphi Prism and we don’t want to encourage use of that old product.

If you have purchased XE and want to take advantage of the offer, you must do so within 180 days.

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?

New Delphi, RAD Studio XE announced

Embarcadero has announced RAD Studio XE and will be showing a number of “sneak peaks” during August prior to release in “early September”. You can see the previews and further information here.

The suite includes Delphi XE, C++Builder XE, Delphi Prism XE (Delphi for Visual Studio and .NET) and RadPHP XE.

The first preview focuses on integrated Subversion support, a nice feature but hardly a game changer – most IDEs have had this for years, though this looks comprehensive with differencing, file history and so on within the IDE.

image

There’s also a look at RadPHP, which is a new version of Delphi for PHP. It is reminiscent of ASP.NET Web Forms, in that it gives a drag-and-drop visual designer and lets you quickly hook up code to event handlers such as a button click. There’s also a component model and the ability to set breakpoints for debugging. We even get the old listbox and editbox demo which I recall from Delphi 1 days.

image

Embarcadero’s Mike Rozlog blogs about the new product here.

I am a big fan of Delphi and C++ Builder, but my initial reaction is that developers are going to say, where is cross-platform for Mac and Linux that was talked about last year, where is 64-bit Delphi? None of this looks remotely cutting-edge.

The published Roadmap is short on dates, but I’m guessing some of this may come next year.

What next for Embarcadero Delphi? Roadmap with Mac, Linux support published.

Embarcadero has published an updated roadmap for its Delphi development tools: Delphi, C++Builder and the RAD Studio shared IDE. These tools combine the Object Pascal (Delphi) or C++ language with a visual component library and native code compiler for Windows.

Chief Technical Architect Michael Rozlog outlines four products which are being worked on, including “Fulcrum”, “Wheelhouse”, “Commodore” and “Chromium”. He says work is being undertaken on all of these, so the exact release schedule is not specified. Embarcadero has an annual release cycle for these products so you might reasonably project that Fulcrum is set for release later this year, Wheelhouse for 2011, and Commodore for 2012. Delphi 2010 came out in August 2009.

Delphi “Fulcrum” introduces a cross-compiler for Mac OS X, with the emphasis on client applications. The IDE will run only on WIndows. Rozlog also talks about integration with Microsoft Azure so that Embarcadero can tick the Cloud Computing box.

Delphi “Wheelhouse” adds Linux support, on a similar basis where the IDE runs only on Windows. It also adds a focus on server applications for both Linux and Mac OS X, including support for Apache modules.

Delphi “Commodore” is the 64-bit release, with 64-bit and easier multi-core development on all three platforms. Rozlog also tosses in “Social Networking integration” and “Better documentation”.

2012 is a long time to wait for 64-bit, particularly as the Windows server world is now primarily 64-bit. Embarcadero is promising a 64-bit compiler preview for the first half of 2011, though this will be command-line only.

Delphi “Chromium” is a revamp of the Visual Component Library with a new look and feel and “natural input integration” – location, voice, video motion.

In addition, Rozlog talks about updates for Delphi Prism, which is loosely the Delphi language plus a .NET compiler, and integrates into Visual Studio. Prism 2011 will work with Visual Studio 2010, and includes support for Mono. This extends to working “with MonoTouch to create Apple iPhone ready applications.” Rozlog doesn’t state whether this has been cleared with Apple’s Steve Jobs, who is opposed to use of languages other than Objective C for iPhone or iPad development.

Is Embarcadero doing enough to keep Delphi current? I’m not sure. Delphi is a fantastic RAD and native code compiler for Windows; in the past it suffered when Borland tried to extend it beyond that, to Linux and .NET, distracting development effort from its core role. The risk here is that the Mac and Linux effort may be more of the same. Of course this will be nice to have, though running the IDE on Windows and compiling for Mac is a limitation that means it will not appeal to Mac developers, only to Delphi Windows developers hoping to extend their market. But there are other ways to do cross-platform now –  Silverlight, Flash, web applications – and I wonder if the time for this has passed.

A compiler for iPhone and iPad would now be bigger news, especially since Silverlight and Flash are not available on these platforms, but for this Embarcadero would need to overcome Apple’s cross-compiler restrictions as well as solve the technical problems.

Windows 7 has breathed some new life into Windows client development. I hope Embarcadero is not neglecting areas like great RAD support for features like Jump Lists and thumbnail previews, for the sake of the uncertain cross-compiler market.

There is a discussion of the new Roadmap in the Delphi forums here, and Marco Cantu also comments.