Tag: firemonkey

Delphi XE2 – features aside from the hype: TVirtualInterface

While prolly almost everyone was creating fancy FireMonkey or VCL applications for Windows (32-bit and 64-bit), OSX and/or iOS with Delphi XE2 today I took a look at one of my favorite units in the RTL - System.Rtti.pas.When you look at the RTL Changes for XE2 you will see a new addition to the RTTI - TVirtualInterface. Along with this comes another improvement: RTTI can finally tell the implemented interfaces of a class (and its ancestors). But back to the TVirtualInterface!Documentation says: "Provides functionality for remote procedure call marshaling. TVirtualInterface creates an implementation of an interface at run time." Wow, this sounds interesting. Further reading states that it's main purpose is SOAP messaging. A client can consume a service with several methods just by calling them through an interface which then "just calls" the remote methods of the service. I think this is awesome because it leads to clear defined interfaces (literally) when working with remote services or other things that just hide behind the interface and which are not necessary to be known. Other things I say...Some while ago when I came across the Emballo Framework I was impressed by the DLLWrapper which basically imports exported functions of a DLL and provides them through an interface. Of course there have to be some rules like the calling conventions and the parameters have to match. But you can do define an interface like this:type IMyLibrary = interface ['{8B47F556-673B-44D6-8F90-09985B3C53E0}'] function SayHello: string end;And then simply import a DLL which exports this function and just call it. It was a bit rough and actually only supported a few types and not all calling conventions. So I am very happy to have a tool out of the box that makes it possible to write something like this:if Supports('MyLibrary.dll', IMyLibrary, LMyLibraryIntf) then ShowMessage(LMyLibraryIntf.SayHello()); Those of you that worked with .Net in RAD Studio 2007 may know this - it was called Virtual Library Interfaces. I have not tried yet, but I am sure if you have the correct signature in your interfaces methods you can call almost every DLL. Actually the Supports functions does not exist in Delphi but you can find it in the brand new unit DSharp.Core.Plugins.I uploaded a simple sample how to use this (including the new unit which can also be downloaded from the svn repository).I also added the DSharp packages for XE2 today (only 32-bit for now, 64-bit compatibility will follow soon). I know there is some issue with the asm code in the DSharp.Core.Events (that has to go for 64-bit anyway) which break bindings for now - but I am working on it. Also more about LiveBindings vs DSharp soon.
Read More

Delphi XE2 – A few of my favourite things…

If you follow Delphi at all, then you will have noticed lots of recent activity around the upcoming release of Delphi (Rad Studio) XE2.  And with big ticket items like native 64 bit, Mac and iOS support, FireMonkey, VCL themes, data binding (VCL and FireMonkey), etc, there is a lot to be excited about.  I find myself looking for opportunities to use some of these new features. However, and with
Read More

LiveBindings – what do you expect?

Since the start of the RAD Studio XE2 World Tour the word is out. Delphi XE2 will have 64-bit compiler, support for OSX and iOS applications with their new FireMonkey GUI framework and LiveBindings. If you haven't read the detailed RAD STUDIO XE2: Launch Event Report yet - now is the time to do it.When I heared about some built-in data binding architecture for the first time I was very excited. It was just a headword on the roadmap for Project "Wheelhouse" but now we know it will be coming with XE2!Unfortunately there have been much more informations and speculations about the 64-bit compiler, the support for other operating systems and the FireMonkey framework than for those LiveBindings.On the official Embarcadero forums there has been some discussion about what to expect. WPF and Cocoa have been mentioned. It has also been mentioned in Auckland that there will be some expression engine to do more than just simply add the TCustomer.LastName property to some TEdit.Text but use some kind of scripting. How will this work? Will there be some designtime support for it to make sure you don't have typos in it (one of the major drawbacks in my current implementation)? Also will the whole binding architecture be supported by new language features to make it save at compile time (like property references or built-in change notifications)?Lots of questions but only few informations (yet). But we can guess, speculate and wish. So please feel free and leave a comment about what you expect from LiveBindings in Delphi XE2.
Read More

Delphi for iOS!

I attended the Rad Studio World Tour today in Auckland. Delphi XE2 has some nice features (x64, OSX, FireMonkey) but the standout for me was the iOS support.Developing for the iPhone et al is mostly a pain in the proverbial. XCode is somewhat of a mess and Objective C was designed by someone with an unholy fetish for square brackets. The last time I did iPhone dev, I did most of my coding in c++ on Windows and only booted into OSX for deployment and testing on the iPhone.Embarcadero are looking to fix that with Delphi XE2. You can write and test your code in Delphi on Windows. When you need to try it on iOS, you create a xcode project (1 mouse click, only needed once) and then boot into OSX and open the xcode project there. From xcode you can edit, compile, run and debug your 100% Delphi code. If you have either Windows or OSX in a virtual machine you can flick from one tother as you wish. Yor app can be compiled and run in both Windows and iOS.Awesome!It's not all perfect, xcode is still there, OSX is a must and the whole code signing is probably as irritating as before, but it's much better than the objective c alternative. It only works with new apps written using FireMonkey but you will be able to pull in older code.The iOS app is full native code, with access to hardware such as gps, accelerometer and camera.Note: Accessing the phone hardware means that your app will no longer run under windows due to either the hardware or the support units not being there. I suspect that this is resolvable with some conditional defines and a bit of hacking.Much to my supprise I am now excited again; both about delphi programming and about iOS programming.
Read More

Delivering software continuously and why you should

I’ve recently really been getting into a Software Delivery methodology which for me, wraps up a selection of the most potent benefits of Agile, TDD, Continuous Integration which requires Development and Operations to work very closely. Holy cow, all those flashy words in a single description, that must mean this is some enterprisey buzzwordy new […] … Read More

Read More

Flotsam and Jetsam #35

Read More

Read More

June 17 2011: Software Development Network Event, The Netherlands

On Friday June 17, 2011, the next SDN event will take place in the Achmea Eureko Conference Center in Ziest, The Netherlands will take place, with a full Delphi track consisting of 5 sessions by speakers Brian Long (2), Olivier Olmer, Filip Demuynck, and Bob Swart. Brian Long will talk about Programming for Android with Delphi Prism and Mono for Android, as well as Project Cooper, which brings native Android programming to Delphi developers.
Read More