Category Archives: professional

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.

PhoneGap is at version 1.0

I’ve just spotted that PhoneGap has reached version 1.0. The release was announced at PhoneGap day in Portland, on Friday 29th July.

I have spent some time trying out various cross-platform mobile development tools. PhoneGap is among the most interesting and popular, and is also open source and free to use. If you believe that using the browser engine as an application runtime is the most sensible route to cross-platform mobile applications, then PhoneGap is the leading contender. It wraps your application to look like a native app, and also provides ways to call the native API when necessary.

PhoneGap received a boost when Adobe built it into Dreamweaver 5.5. I tried it out and was impressed with the design environment, but I am not sure how serious Adobe is about PhoneGap since there is no documentation on how to package your PhoneGap app for release, and my post has comments from puzzled users. My solution was to export the project to Eclipse and the standard PhoneGap tools, which misses part of the value of having it integrated into Dreamweaver.

Adobe installs PhoneGap into the Dreamweaver directory, so another issue is how to take advantage of the latest version if you are using Adobe’s tools. Overall I would suggest that using the PhoneGap SDK and Eclipse is a better option, though there is no problem with bringing in Dreamweaver for parts of the design.

I interviewed Nitobi president André Charland about PhoneGap earlier this year.

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.

Android only 23% open says report; Linux, Eclipse win praise

Vision Mobile has published a report on what it calls the Open Governance Index. The theory is that if you want to measure the extent to which an open source project is really open, you should look at its governance, rather than focusing on the license under which code is released:

The governance model used by an open source project encapsulates all the hard questions about a project. Who decides on the project roadmap? How transparent are the decision-making processes? Can anyone follow the discussions and meetings taking place in the community? Can anyone create derivatives based on the project? What compliance requirements are there for creating derivative handsets or applications, and how are these requirements enforced? Governance determines who has influence and control over the project or platform – beyond what is legally required in the open source license.

The 45-page report is free to download, and part-funded by the European Union Seventh Framework Program. It is a good read, covering 8 open source projects, including the now-abandoned Symbian Foundation. Here is the result:

Open Governance Index (%open)
Eclipse 84%
Linux 71%
WebKit 68%
Mozilla 65%
MeeGo 61%
Symbian 58%
Qt 58%
Android 23%

The percentages are derived by analysing four aspects of each project.

  • Access covers availability of source code and transparency of decisions.
  • Development refers to the transparency of contributions and acceptance processes.
  • Derivatives covers constraints on use of the project, such as trademarks and distribution channels.
  • Community structure looks at project membership and its hierarchy.

What is wrong with Android? I am not sure how the researchers get to 23%, but it scores badly in all four categories. The report observes that the code to the latest “Honeycomb” version of Android has not been published. It also has this to say about the Open Handset Alliance:

When launched, the Open Handset Alliance served the purpose of a public industry endorsement for
Android. Today, however, the OHA serves little purpose besides a stamp of approval for OHA
members; there is no formal legal entity, no communication processes for members nor frequent
member meetings.

By contrast, Eclipse and Linux are shining lights. MeeGo and Mozilla are also praised, thought the report does mention Mozilla’s “Benevolent dictators”:

In the case of conflicts and disputes, these are judged by one of two Mozilla “benevolent dictators” – Brendan Eich for technical disputes and Mitchell Baker for non-technical disputes.

Qt comes out OK but has a lower score because of Nokia’s control over decision making, though it sounds like this was written before Nokia’s Windows Mobile revolution.

WebKit scores well though the report notes that most developers work for Apple or Google and that there is:

Little transparency regarding how decisions are made, and no public information provided on this

Bearing that in mind, it seems odd to me that WebKit comes above Mozilla, but I doubt the percentages should be taken too seriously.

It is good to see a report that looks carefully at what it really means to be open, and the focus on governance makes sense.

Adobe Edge previewed: another step towards HTML 5

Adobe has released a preview of Edge, a new tool for creating animations in HTML 5, JavaScript and CSS3.

Edge is interesting on two levels. First, HTML 5 lacks strong design tools so a new tool from Adobe is welcome. Edge is a timeline-based tool for creating animations. You import elements such as images, or create text and graphic elements in the tool. Using the timeline, you create keyframes and specify effects. Here is the designer:

image

and you can view the output right here. This is one of Adobe’s samples, created by Sarah Hunt.

image

Under the covers Edge uses the JQuery JavaScript library. Here are the includes for this example:

image

and here are the transition effects on offer:

image

Edge is not complete yet.  A future update will add a JavaScript editor, making this more interesting for application developers. There will be a documented Edge library that will let you customise and I presume interact with the Edge output. One of the possibilities that interests me is data visualisation. Will Edge support this? Adobe is not yet saying, but it would be a natural move.

Adobe already has an HTML design tool, Dreamweaver. Why another one? Or put another way, why is Edge not a new designer for Dreamweaver rather than a new product in its own right?

This is an early preview, and all things are possible. However, Adobe has a tricky positioning task, given that Edge is encroaching on territory that used to belong to Flash, timeline-based animation. In its FAQ [PDF], Adobe distinguishes its products like this:

Product Sample use cases
Adobe Edge Preview 1 Advertising, simple animations and motion design for new compositions or using existing CSS-based page layouts
Adobe Dreamweaver Websites and web applications for desktops, smartphones, and other devices
Adobe Flash Professional Immersive interactive experiences, mobile applications, gaming, premium video, advertising
Adobe Flash Builder Rich Internet Applications (RIAs) and mobile applications

This table fails to mention what must be part of the core rationale for Edge, which is working on Apple iOS, the mobile operating system for iPhone and iPad that does not run Flash content. If you view the demo page above on the iPhone 4 or iPad 2, you will find that it works fine.

Adobe’s distinctions in the table above are not particularly clear. Leaving aside the relative merits of Flash and HTML 5 as technologies, a key question for developers and designers is one of reach. HTML 5 has a reach that extends to iOS and to other devices that do not run Flash in the browser. Flash has a reach that replaces browser-dependency with dependency on Adobe’s runtime, which can be a good thing.

Incidentally, I asked Adobe during a press briefing about mobile support and also browser requirements for Edge content, but there is no official statement on this yet.

Is Adobe moving away from Flash towards standards-based HTML tools? The purpose of a table like the one above is to insist that this is not the case and that Adobe will continue to support both. Nevertheless, Edge is a significant move. A gradual decline in Flash usage in favour of HTML 5 is not necessarily bad for Adobe. Designers will use the same Adobe tools to create content for Edge as they do for Flash.

What about Wallaby, another Adobe experimental project which exports Flash content to HTML, in effect making Flash Professional an HTML 5 authoring tool? Adobe says that Wallaby and Edge are separate projects and there is no plan to have Edge import Wallaby content. Still, you would have thought that, if Wallaby makes it into an official product, some compatibility is inevitable.

image

Edge demo on Apple iPhone 4

GPU Programming for .NET: Tidepowerd’s GPU.NET gets some improvements, more needed

When I attended the 2010 GPU programming conference hosted by NVIDIA I encounted Tidepowerd, which has a .NET library called GPU.NET for GPU programming.

GPU programming enables amazing performance improvements for certain types of code. Most GPU programming is done in C/C++, but Typepowerd lets you run code in .NET, simply marking any methods you want to run on the GPU with a [kernel] attribute:

[Kernel]

private static void AddGpu(float[] a, float[] b, float[] c)

{

// Get the thread id and total number of threads

int ThreadId = BlockDimension.X * BlockIndex.X + ThreadIndex.X;

int TotalThreads = BlockDimension.X * GridDimension.X;

for (int ElementIndex = ThreadId; ElementIndex < a.Length; ElementIndex += TotalThreads)

{

c[ElementIndex] = a[ElementIndex] + b[ElementIndex];

}

}

GPU.NET is now at version 2.0 and includes Visual Studio Error List and IntelliSense support. This is useful, since some C# code will not run on the GPU. Strings, for example, are not supported. Take a look at this article which lists .NET OpCodes that do not work in GPU.NET.

GPU.NET requires an NVIDIA GPU with CUDA support and a CUDA 3.0 driver. It can run on Mac and Linux using Mono, the open source implementation of .NET. In principle, GPU.NET could also work with AMD GPUs or others via a vendor-specific runtime:

image

but the latest FAQ says:

Support for AMD devices is currently under development, and support for other hardware architectures will follow shortly.

Another limitation is support for multiple GPUs. If you want to do serious supercomputing relatively cheaply, stuffing a PC with a bunch of Tesla GPUs is a great way to do it, but currently GPU.NET only used one GPU per active thread as far as I can tell from this note:

The GPU.NET runtime includes a work-scheduling system which can distribute device method (“kernel”) calls to multiple GPUs in the system; at this time, this only works for applications which call device-based methods from multiple host threads using multiple CPU cores. In a future release, GPU.NET will be able to use multiple GPUs to execute a single method call.

I doubt that GPU.NET or other .NET libraries will ever compete with C/C++ for performance, but ease of use and productivity count for a lot too. Potentially GPU.NET could bring GPU programming to the broad range of .NET developers.

It is also worth checking out hoopoe’s CUDA.NET and OpenCL.NET which are free libraries. I have not done a detailed comparison but would be interested to hear from others who have.

Microsoft releases Visual Studio LightSwitch: a fascinating product with an uncertain future

Microsoft has released Visual Studio LightSwitch, a rapid application builder for data-centric applications.

image

LightSwitch builds Silverlight applications, which may seem strange bearing in mind that the future of Silverlight has been hotly debated since its lack of emphasis at the 2010 Professional Developers Conference. The explanation is either that Silverlight – or some close variant of Silverlight – has a more important future role than has yet been revealed; or that the developer division invented LightSwitch before Microsoft’s strategy shifted.

Either way, note that LightSwitch is a model-driven tool that is inherently well-suited to modification for different output types. If LightSwitch survives to version two, it would not surprise me to see other application targets appear. HTML 5 would make sense, as would Windows Phone.

So LightSwitch generates Silverlight applications, but they do not run on Windows Phone 7 which has Silverlight as its development platform? That is correct, and yes it does seem odd. I will give you the official line on this, which is that LightSwitch is not aimed primarily at developers, but is for business users who run Windows and who want a quick and easy way to build database applications. They will not care or even, supposedly, realise that they are building Silverlight apps.

I do not believe this is the whole story. It seems to me that either LightSwitch is a historical accident that will soon be quietly forgotten; or it is version one of a strategic product that will build multi-tier database applications, where the server is either Azure or on-premise, and the client any Windows device from phone to PC. Silverlight is ideal for this, with its modern presentation language (XAML), its sandboxed security, and its easy deployment. This last point is critical as we move into the app store era.

LightSwitch could be strategic then, or it could be a Microsoft muddle, since the official marketing line is unconvincing. I have spent considerable time with the beta and doubt that the supposed target market will get on with it well. Developers will also have a challenge, since the documentation is, apparently deliberately, incomplete when it comes to writing code. There is no complete reference, just lots of how-to examples that might or might not cover what you wish to achieve.

Nevertheless, there are flashes of brilliance in LightSwitch and I hope, perhaps vainly, that it does not get crushed under Microsoft’s HTML 5 steamroller. I set out some of its interesting features in a post nearly a year ago.

Put aside for a moment concerns about Silverlight and about Microsoft’s marketing strategy. The truth is that Microsoft is doing innovative work with database tools, not only in LightSwitch with its model-driven development but also in the SQL Server database projects and “Juneau” tools coming up for “Denali”, SQL Server 2011, which I covered briefly elsewhere. LightSwitch deserves a close look, even it is not clear yet why you would want actually to use it.

image

Adobe closes AIR Marketplace, InMarket

Adobe is giving up its efforts to support developers deploying to multiple app stores. The idea of InMarket,  announced at the Adobe MAX Conference in October 2010, was to be a one-stop distribution point for developers seeking to target multiple platforms. Adobe handled distribution and billing. The reason given:

After reviewing our efforts and based on feedback from developers, we have decided that we will deliver the most value by helping developers author and publish their apps on multiple platforms. Given this focus, we have decided to discontinue development and support of Adobe InMarket. We are going to continue to provide support for publishing to different app stores through our tooling. The recent Flash Builder 4.5 and Flash Professional CS5.5 provide support for publishing to multiple mobile platforms including Android and Apple iOS devices.

Adobe is not giving developers much time to adjust. The InMarket URL will terminate on August 31. This is causing some consternation:

I don’t understand how you expect publishers will be able to push an update to all the markets they publish to with enough time to get their user base to update before they’re totally screwed. One month? You do realize that even updates pushed to AppUp can take up to 2-weeks for vetting? This is crazy

That said, the low traffic on the InMarket forum is a clue to what Adobe is closing it down.

InMarket only supported Intel AppUp and AIR Marketplace, which rather misses the point of targeting multiple platforms. Had Adobe been able to offer instant deployment to all the key app stores, including Android Market and Apple’s iOS App Store, it would have been more attractive. Given the complexities of the approval process, it is not surprising that this was hard to achieve. A further complication is that Adobe’s AIR runtime is not allowed on iOS. Apps for iOS have to be packaged as native iOS apps.

What about AIR Marketplace?

When we established Adobe AIR Marketplace three years ago, there were few distribution opportunities for AIR developers. There are now several app stores on desktops, mobile devices and tablets that service AIR developers including Apple App Store, Android Market, BlackBerry App World, Intel AppUp center, Samsung Apps, and Toshiba App Place. We encourage you to use these newer popular app stores to distribute your applications.

This of course describes describes exactly the problem that InMarket was meant to address: the challenge of maintaining support for multiple app stores.

AIR Marketplace is still up and running at the time of writing, and seems to have more life than InMarket:

image

That said, why would any potential customer look specifically for AIR applications? It is a runtime and ideally should be invisible to the user. I was interested to see reference to AIR packagers for Windows, Mac and Android in a recent announcement, suggesting to me that Adobe is de-emphasising AIR as a runtime and making it into something more like a cross-platform development tool.

Microsoft financials: Office and server dominate as Windows falters

Microsoft has released its quarterly figures for January-March 2011. My at-a-glance summary is below.

Quarter ending June 30th 2011 vs quarter ending June 30th 2010, $millions

Segment Revenue Change Profit Change
Client (Windows + Live) 4740 -41 2943 -123
Server and Tools 4643 +494 1774 +214
Online 662 +94 -728 -40
Business (Office) 5777 +402 3618 +399
Entertainment and devices 1485 +341 32 +204

Business as usual? More or less, but there are a few points to note.

The figure that jumps out is the stunning performance of Office, which includes SharePoint and Exchange. Why is everyone buying Office 2010, when a document like the one I am typing now could be done just as well in Word 2.0 from 1991, or more plausibly the free OpenOffice?

The answer is the Microsoft has successfully transitioned many of its customers to using Office with SharePoint and Exchange, making it harder to stick with old versions and selling CALs (Client Access Licences) as well as the Office suite itself. This is highly profitable, though the aspect that puzzles me is that Office 365, which is cloud-hosted SharePoint and Exchange, is more cost-effective for the customer since it includes server software, CALs and in some cases the Office client for a commodity-priced subscription.

In other words, I find it hard to see how Microsoft can remain equally profitable if a significant proportion of its customers switch to Office 365. The company may be depending on its ability to upsell those customers to further online services; or perhaps it has not fully thought this through and has set Office 365 pricing at what it needs to be in order to compete with Google.

Fortunately for Microsoft, there is enough doubt concerning the safety of cloud services to sustain continued strong sales of on-premise solutions.

Second notable thing: Windows is in decline. The reason: it is losing market share to Apple and to Google Android. Netbook sales are down 41% according to the release, and I would guess that those sales have mostly gone to Apple iPad and Android tablets rather than to Windows notebooks.

Will Windows 8 reverse the decline? Speculation of course, but it will not repeat the success of Windows 7. In fact, my guess is that Windows 8 will be a hard sell to enterprises which have finally been persuaded to migrate from Windows XP. They are settling down for another five years of stability. Windows 7 was a consolidation release, just the sort of thing enterprises like. Windows 8 will be a revolution release, with most of the interest focused on what it can do in mobile and tablets. If it does succeed, it will do so slowly; there will be no rush to upgrade from 7 other than from the usual early adopters. It may improve sales in the consumer market, but neither Mac nor iPad nor Android is going away.

That leads on to mobile, the figures for which are buried under a pile of Xbox consoles. A good quarter for Xbox, though note how poor the margins are compared to those for Office or Windows.

Finally, the online money drain continues. Note that this is Bing and online advertising, not Azure or Office 365. Microsoft must feel that it the strategic value of these online services is worth the cost, particularly since they tie into mobile and the ecosystem which Nokia is depending on for a reversal of its fortunes. Given that the company has money to burn, there may actually be some sense in that; though for a segment to make such large and consistent losses over a long period has to be a concern.

Adobe recommends Flash Builder, Adobe Reader users not to upgrade to Apple Mac OS X Lion

Apple and Adobe appear to have a difficult relationship, as shown by Apple CEO Steve Jobs with his Thoughts on Flash last year. Now it seems that there are issues for users of some Adobe products if they upgrade to the new version of OS X, Lion, just released.

Adobe’s FAQ on Creative Suite compatibility starts well:

Adobe and Apple have worked closely together to test that Adobe® Creative Suite® 5 and CS5.5 suite editions and individual products run reliably on Intel® based systems running Mac OS X Lion (v10.7) with optimal performance and user experience.

The FAQ adds that Creative Suite 3 and 4 also mostly work; but it gets worse:

Adobe Flash® Catalyst® CS5.5 and Adobe Flash Builder® 4.5 software are generally compatible with Mac OS X Lion; however, we have discovered issues that may degrade the user experience or affect use of the products. We do not recommend that these customers upgrade to Mac OS X v10.7.

Flash Catalyst CS5 and Flash Builder 4 will not work on Mac OS X v10.7. Adobe does not intend to update either of these products for use on Mac OS X v10.7. It is recommended that customers using these versions not upgrade to Mac OS X v10.7.

What is the problem with Flash Builder 4.5 on Lion? It seems to be to do with 3rd party components:

Flash Builder and Flash Catalyst are dependent upon a number of foundational technologies provided by third parties that are not yet fully compatible with Mac OS X v10.7. As these foundation pieces are certified on Lion, Adobe plans to undertake additional testing and issue a compatibility update to our products if applicable.

It would be good to know what these components are and whether there are real problems, or possibly Adobe is just being cautious.

There are also problems for users of Adobe Reader. Reading between the lines, it seems that Apple is discouraging the use of a third-party plug-in to render PDF in Safari, in favour of its own PDF renderer:

Adobe Reader plug-in and Acrobat plug-in are not compatible with the Safari 5.1 browser, which will ship with Mac OS X 10.7 and for 10.6 in July. Adobe Reader and Acrobat will continue to work as standalone applications on Mac OS X 10.7 and 10.6, and will render PDF documents outside of the browser. In addition, Safari 5.1 renders PDF documents natively. However, the Adobe Reader and Acrobat plug-ins will not function as expected in LiveCycle and Acrobat workflows that require either plug-in to render PDF documents in Safari 5.1

The problem is not with viewing standard PDF documents, but with documents and forms that require advanced features of the Adobe Reader to work. A partial workaround is to open documents outside Safari, but Adobe says this is not always enough:

In other cases, such as Adobe Reader, Acrobat and LiveCycle applications that utilize functionality like forms, digital signatures, portfolios, guides, 3D, extended PDFs and rights management, viewing a PDF inside the browser with the Adobe Reader or Acrobat plug-in may be required, and thus this workaround will not be successful.

and you cannot use Firefox either:

Acrobat Reader plug-in and Acrobat plug-in are dependent on the WebKit WebPlugin API and capabilities that were unique to Safari. Other browsers like Firefox, Chrome, or Opera do not have the required functionality to run the plug-ins properly.

The suggested solution is not to upgrade to Lion.

There are also some issues with the Flash Player. An inconclusive note in the FAQ suggests that hardware acceleration is not working:

Flash Player may cause higher CPU activity when playing a YouTube video. Possibly related to disabled hardware acceleration.

Update: Adobe now says hardware acceleration is OK on Lion.

In addition, if you right-click Flash content in the browser, you will find that the settings do not respond to mouse clicks.

Finally, when I fired up Dreamweaver CS 5.5 on Lion, the system informed me that there is a dependency on Java and prompted me to install it:

image

This went smoothly, Dreamweaver 5.5 opened and seems to work fine.