Saturday, June 27, 2015

Delphi Blogs of the Week/Month #31

A lot time since the last collection of links, but here is it.

A lot time since the last collection of links, but here is it. (And by the way, I'm going on vacation and will leave the blog quiet for a couple of weeks)

Blogs Etc

Third Party

 





Friday, June 19, 2015

RAD Studio XE8 Update 1

The Update 1 of RAD Studio XE8, C++ Builder XE8, and Delphi XE8 is available for Update Subscription customers, as anticipated.

The Update 1 of RAD Studio XE8, C++ Builder XE8, and Delphi XE8 is available for Update Subscription customers, as anticipated. If you are not under Update Subscription and have XE8, you can subscribe now. Links:

Again, you need Update Subscription for the "Subscription Update 1". If not, you can buy it now, regardless of when you bought XE8. If you don't really want the update subscription, there is a limited general update available. PS: Don't install the full udpate if you are not entitled, as your XE8 product might stop functioning.

New features? A community toolbar and the favorites in the Welcome page:

 

Thursday, June 18, 2015

Windows 10 Notifications from a VCL app with the WinRT API

The WinRT API headers for Delphi are now on GetIt and here is a demo to try out using Windows 10 notifications in a VCL Win32 application.

The WinRT API headers for Delphi are now on GetIt and here is a demo to try out using Windows 10 notifications in a VCL Win32 application.

Windows 10 Webinar

Yesterday, we had a Windows 10 focused webinar, with a Microsoft guest and a few of us (me, David I, Jim McKeeth, and JT) talking about Windows 10 and the support RAD Studio XE8 offers for the coming versions of Windows. If you missed it, the replay will soon be available. What I showed in the webinar, beside some classic demos, was a VCL application using notifications on Windows 10, a feature not available in the traditional Win32 APIs but only using the new WinRT APIs.

How to do you get the headers for that API and how do you get a working demo? Keep reading...

Delphi WinRT Headers for Windows 10 on GetIt

First of all, today we made available the headers for the WinRT API on GetIt, to all developers with Delphi or RAD Studio XE8 (there is no direct support for C++, at this very moment). Just open GetIt in XE8 and click on the corresponding entry, shown below.

Notice that this code is for the Windows 10 preview, it is likely that the APIs and our header translations will change over the coming months. So you might have to change/clean up your code in the future, but it is great to be able to start target WinRT classes today with XE8.

The WinRT Notification Demo

As an example of an interesting feature you can use only from WinRT, this demo is focused on the new notifications, called "toast" notifications. Now, the API is available but not really encapsulated in ready-to-use components, so the code is far from simple and I won't list everything here, only the core elements. This is what we want to obtain:

This is a portion of the code used to create a notification. As you can guess below, WinRT classes are basically used like COM objects, and they share the core architecture. The objects creation doesn't use a CoClass (or class factory) but is a little more complex:

    if Succeeded(RoGetActivationFactory(LString, TGUID.Create('{50AC103F-D235-4598-BBEF-98FE4D1A3AD4}'), LCreated)) then
    begin
      LINotificationManagerStatics := LCreated as IToastNotificationManagerStatics;
      if Succeeded(WindowsCreateString(PWideChar(Edit1.Text), Length(Edit1.Text), LString2)) then
      begin
        LToastNotifier := LINotificationManagerStatics.CreateToastNotifier(LString2);
        LXMLTemplate := LINotificationManagerStatics.GetTemplateContent(ToastTemplateType.ToastText02);
        if Succeeded(WindowsCreateString(PWideChar(SToastNotification), Length(SToastNotification), LString)) then
        begin
          if Succeeded(RoGetActivationFactory(LString, TGUID.Create('{04124B20-82C6-4229-B109-FD9ED4662B53}'), LCreated)) then
          LToastFactory := LCreated as IToastNotificationFactory;
          LToast := LToastFactory.CreateToastNotification(LXMLTemplate);
          LAccepted := TAcceptedEventHandler.Create;
          LToast.add_Activated(LAccepted);
          LToastNotifier.Show(LToast);
        end;
The TAcceptedEventHandler class is the one that has an invoke callback method, that logs in the memo the fact taht the information was accepted (the dismiss portion I'll have to refine). This is the code:
procedure TAcceptedEventHandler.Invoke(sender: IToastNotification; args: IInspectable);
begin
  Form51.Memo1.Lines.Add ('You clicked on the notification!');
end; 
I know the reference to the global form is ugly, but the code is complex enough to avoid the extra indirection. Do you want to give it a go? You can download the complete demo at dl.dropboxusercontent.com/u/133855/WinRTCheck.zip. I'm probably going to update it, and possibly also write a couple more examples, covering other new areas in WinRT. 

Windows 10 is Coming

...and it looks it will be a very important version of Windows, so get the Windows 10 Preview now, and start using XE8 to experiment the integration of your VCL (and FireMonkey) applications with it.

 

Thursday, June 4, 2015

More Information on GetIt Package Manager in XE8

GetIt is the new XE8 package manager for RAD Studio. Information about how to submit your libraries to GetIt has just been made available by Embarcadero.

GetIt is the new XE8 package manager for RAD Studio. Information about how to submit your libraries to GetIt has just been made available by Embarcadero.

The idea behind GetIt is really to make is easier and faster to discover, install, and keep updated some of the best open source libraries for Delphi and C++Builder. The main form of GetIt lets you browse or search for a library, and with one click (plus a second to accept the license) you can get the component installed and ready to use.

You can find more information at www.embarcadero.com/products/rad-studio/tools-and-components, while some technical information is in the help at docwiki.embarcadero.com/RADStudio/XE8/en/GetIt_Main_Window.

What's new is the set of "acceptance guidelines" for submitting libraries to GetIt, something Embarcadero is encouraging. While the process is still manual (and it will get automated) you can read the article to see if your library is within the requirements, which if it is an actively maintained library adding value to the product is likely the case. In the article you can also find the download with the information needed for an actual submission. The link is:

community.embarcadero.com/index.php/article/news/16027-submitting-libraries-to-getit

Beside the initial "TurboPack" group of libraries and a couple of internal add-ons, we already got a couple of submissions, including ICS and OmniThread. A couple of others are being added right now. Let's add many more...

 





Wednesday, June 3, 2015

Events in Japan and China

A few pictures of the XE8 events during my recent trip to Japan and China, and a video of my keynote in Tokyo.

A few pictures of the XE8 events during my recent trip to Japan and China, and a video of my keynote in Tokyo. (Trying to link directly form Google Photo, let's see if this works).

Japan

Event in Osaka (view of the castle from the event room and dinner after event) and Tokyo (during the event and the city)

 

 

China

In Beijing, forbidden city entrance and attendees at the XE8 event.

There was a good crowd at the first event after some time, old customers looking to the new features but also new developers.

I was actually a bit (negatively) impressed by how nothing in my Android Google phone worked in the country, given all Google servers cannot be reached. But that's another story.

Video of Tokyo Keynote

This is in English with subtitles, edited to skip the live translation.

 

 

Monday, June 1, 2015

Delphi Blogs of the Week/Month #30

It has been a while, but here is another round of useful links for Delphi developers.

It has been a while (really going for for monthly posts, than weekly ones these days), but here is another round of useful links for Delphi developers.

XE8 and Windows 10

There is a lot of information floating around about the current support for Windows 10 in RAD Studio XE8. Here are some links:

XE8 Mobile Tidbits

And More

 

 

Wednesday, May 20, 2015

Article on Developing for Windows 10 with RAD Studio XE8

Just wrote an article on Embarcadero Community site you might be interested in.

Just wrote an article on Embarcadero Community site you might be interested in:

community.embarcadero.com/index.php/article/news/15977-windows10withxe8

It covers installing RAD Studio XE8 on Windows 10 preview and building applications for the preview of the coming version of Windows. We are expecting the migration to be smooth, but also very interested in creating "first calss apps" (or universal apps) via the Centennial bridge.

We are working with Microsoft to offer Delphi and C++Builder the best support for Windows 10, whether they keep going with the best Windows library out there (VCL) or follow the multi-device route with FireMonkey. Stay tuned for more information.

 





Wednesday, May 13, 2015

Conferences Last Week London and DDD From Remote

Last week I've spoken to a Delphi conference in London, and after that I've attended online Q&A sessions at the Delphi Developer Days events in Olso and Frankfurt. Here are some pictures.

Last week I've spoken to a Delphi conference in London, and after that I've attended online Q&A sessions at the Delphi Developer Days events in OsLo and Frankfurt.

Spring Delphi Conference, London

The London Spring Delphi Conference was a community event sponsored and promoted by Embarcadero. There were local and Embarcadero speakers, plus Bruno Fierens who showcased among others a new great FireMonkey component, a time planner. The event was also in a great location, London's National History museum. Here are some pictures.

      

Delphi Developer Days, Online Q&A

At Delphi Developer Days 2015, organized by Cary Jensen with Ray Konopka this year, I gave a keynote in Amsterdam (late April), which Cary recorded. For the following European stops they replayed my recording and later I joined for an online audio and video Q&A session. I t was really a pleasure for me and I think attendees appreciated it *yes, being there in person would have been better, but there is so much one can do).

Here are pictures of me speaking, to the audience... wondering if I should move to a nicer looking section of my office in the future.

 

Next, Far East

I'm going to be in Japan (next week) and China (the following one). If you live in those countries (or nearby), I'll be happy to see you in Osaka, Tokyo, or Beijing.

 

 

Monday, May 4, 2015

Microsoft BUILD, Windows 10, and Delphi and C++Builder

Microsoft made a large number of announcements last week at the BUILD conference, some of which surprising, about Windows 10 development. Here are some personal considerations, also regarding RAD Studio (both Delphi and C++Builder)

Microsoft made a large number of announcements last week at the BUILD conference, some of which surprising, about Windows 10 development. Here are some personal considerations, also regarding RAD Studio (both Delphi and C++Builder). Don't take this as an official Embarcadero announcement, as we still need some time to fully evaluate. Rest assured that full support for the Windows 10 platform is in the RAD Studio roadmap and the company is fully committed to it. Also, the information here is based on public information Microsoft has released so far, and that is not really complete or detailed.

Overall Microsoft Directions

At the BUILD 2015 conference, the company substantially reiterated its recent strategy of " cloud first, mobile first ", but gave it considerably more substance. Here I won't really cover much the cloud side, as there is limited direct tie with pure development (as long as you can interact via REST with cloud services, and use them for hosting applications and data). The focus around mobile, however, is very interesting and got a couple of spins:

  • Treat each computer as a device, including a desktop PC. This implies adding services like notifications and push notifications, app advertising, and store purchase of third party applications, something Windows 8 almost totally failed to deliver. (By the way, their marketing spin of considering Android = KitKat to show Windows 10 will be a platform larger than Android looked quite foolish to me)
  • Spread office and other Microsoft apps to all mobile platforms, and offer Azure services to all. This includes API integration for Office on all platforms, something of interest to many developers.
  • Help developers outside of the Microsoft ecosystem (that is, WinRT) target both desktop and mobile version of Windows 10

This last is a new key element of the Microsoft strategy, and something significantly and directly affecting RAD Studio developers. But let's proceed in steps.

The (New) Universal Windows Platform

Until a little time ago, the Universal Windows Platform with WinRT API at its core (in a new version working across desktop and mobile) seemed like a new implementation of the largely unsuccessful "Modern App" strategy around Windows 8 time frame. The announcements at BUILD 2015 radically change the model and make it extremely more flexible and open to all developers.

If you want to read an overall overview of the Universal Windows Platform, you can refer to blog post by Kevin Gallo blogs.windows.com/buildingapps/2015/04/30/a-deeper-dive-into-the-universal-windows-platform/. There are some interesting elements in the strategy, including UI styling, some nice new components (not sure if I'm the only one thinking that the RelativePanel is very similar to FireMonkey MultiView component), and platform extensions.

One side element, but one that is very important to RAD Studio developers, is that some of the new Windows 10 features will become available via the traditional Win32/64 SDK, in a way that should be easy to consume for Delphi and C++Builder native applications. Rest assured that RAD Studio will have support for these APIs.

Universal Windows Platform Bridges

Even more important than the core platform features, was the announcement of a number of projects to host existing applications written with different technologies as part of the Universal Windows Platform. In other words, unlike in Windows 8, there are many ways developers can support the latest Microsoft platform, which is great news. This is done through 4 different "bridges", covered at dev.windows.com/en-us/uwp-bridges:

1. Project Astoria is an Android "compatible" runtime for Windows Phone. According to the current information, it looks like an existing Android APK can be used as is. A developer would need to update it only to take advantage of specific Microsoft services. Microsoft specifically mentions supporting both Java/SDK and C++/NDK, so I'm expecting Delphi and C++Builder Android applications to be supported. This will be great news, as RAD Studio developers will be able to target also Windows Phone with no change to their code.

2. Project Islandwood is an Objective-C toolchain available in Visual Studio for re-compiling iOS applications to target Windows Phone. This is not a direct bridge or a compatibility layer (unlike the Android bridge), as it seems to require opening the source code, adapting it (how much is hard to say) and recompiling it for the new target. This is of little direct interest to RAD Studio developer, who can target iOS from the same code base used for Android and other platforms.

3. Project Centennial is a virtualization environment for "traditional Win32 SDK and .NET desktop applications", so that they can run in a protected and secure environment on a desktop PC, Intel tablet, or notebook. Now the advantage is not to be able to run these applications on Windows 10, as they already work fine. The advantage is that by becoming first class citizen applications, your exsiting VCL apps (for example) will be able to get fully hosted on the Windows Store, with direct sale and installation from the store. This is different from the old scenario of applications that could get listed on the store, but were sold and downloaded in a traditional way. While the specific requirements, if any, are not known, we are already at work to make sure RAD Studio generated applications fully comply with the current Microsoft requirements for store listing. I personally believe that support for "Centennial" could really bolster new life into VCL applications. Microsoft claims these applications will be able to leverage new features using the SDK, but it is not clear if the same code will run also directly in a natively deployed scenario. Finally notice this brigde is for RAD Studio VCL and FireMonkey applications, for Visual C++ MFC applications, for .NET WinForms and WFP applications: In other words, RAD Studio developers are in a good company here!

4. Project Westminster is focused on moving mobile apps to the Windows 10 platform, and is of limited interest to RAD Studio developers.

What About Multi-Device Development?

Notice that the focus of Microsoft at BUILD wasn't as much into using a single tool for targeting multiple versions of Windows (let alone other platforms) but to let developers using other platform specific tools to add support for Windows 10 desktop and phone. While this is interesting, it doesn't help at all with the source code fragmentation witnessed today. How can RAD Studio help? By letting you keep your existing Windows applications on the best native library (VCL) and support Windows 10 platform in full (store included). At the same time, RAD Studio let's you create multi-device FireMonkey applications that with a single code base (written in Object Pascal or C++) can directly and natively target Windows (possibly now including Windows phone), OS X, Android, and iOS. This is still superior than managing a diverse array of tools and apps written in different languages for different platforms.

Given the information from BUILD 2015, RAD Studio looks as an even more impressive tool in today's landscape. If you don't already own XE8, try it today and start building single source applications that works across billion of devices today !

Thursday, April 30, 2015

Delphi Blogs of the Week #29

Another rich set of blogs posts, covering XE8 features but not only.

Another rich set of blogs posts, covering XE8 features but not only. 

More General XE8 Information

Interview with John JT Thomas on RAD Studio XE8 at www.learnxpress.com/rad-studio-xe8-john-jt-thomas.html

Replays of the launch webinar available at forms.embarcadero.com/WindowsAndBeyond_AnnouncingRADStudio

Where are Delphi developers? David I answers at community.embarcadero.com/index.php/blogs/entry/where-in-the-world-are-programmers-using-delphi

Where should you ask XE8 questions. Find out at community.embarcadero.com/index.php/blogs/entry/where-you-should-post-bug-reports-ask-questions-and-have-conversations-about-our-software-development-tools

A great guide to iBeacons (not RAD Studio related) at www.moblized.com/blog/the-business-owners-guide-to-ibeacons-infographic

How Internet of Things Affects Business App Developers (by Brian) at appdevelopermagazine.com/2683/2015/4/27/How-the-Internet-of-Things-will-Affect-Business-App-Developers/

Blogs on XE8 Technical Features

Sarina on using the MapView component on mobile at community.embarcadero.com/index.php/blogs/entry/working-with-the-new-mapview-on-ios-and-android-with-rad-studio-xe8

Premium FireMonkey styles at community.embarcadero.com/index.php/blogs/entry/premium-firemonkey-styles-for-rad-studio-xe8

Hotfix for missing SQLite files at cc.embarcadero.com/item/30197

Using interstitial ads on Android (from Daniele Spinetti) at www.danielespinetti.it/2015/04/how-to-use-admob-interstitial-ads-with.html

Anatomy of a FMX app (very nice summary) at www.fmxexpress.com/anatomy-of-a-delphi-xe8-firemonkey-app-on-android-ios-windows-and-mac/

Another post you can forward to your .NET friends it this one on migrating from C# to Delphi at www.fmxexpress.com/ten-tips-for-migrating-from-c-and-net-to-multi-platform-object-pascal-and-delphi-firemonkey/

Unit testing with TestInsight at parnassus.co/unit-testing-with-testinsight/ (not strictly XE8, but very nice overview)

Things Jeroen learned in the Google+ Delphi Community about XE8 at wiert.me/2015/04/15/delphi-xe8-things-i-learned-from-the-first-week-of-g-reading/

Malcolm on AppTethering (a great overview) at http://www.malcolmgroves.com/blog/?p=1842

And the UK Conference

Finally, I want to remind any of you leaving in the UK (or nearby) of this great event coming up next Wednesday in London that I'll also attend, see forms.embarcadero.com/EM15Q2GBSpringDelphiCommunityConference