A few weeks back we had a great discussion on Developer Direct titled "Mind your language(s) - vital expressions you need to know" - the replay for this will be available soon from the Developer Direct Season 3 playlist on YouTube.
One part of the language we covered in this session talked about class helpers and it reminded me of a video I recorded earlier this year as part of the Business Display Engine series. As we start to see all this really interesting material about native iOS development with Delphi it made me think about how I’ve used Class Helpers in the past with remote applications.
One thing I have found very useful when developing applications has been the ability to use class helpers to add functionality to objects that I have imported from external locations. Imagine being able to add your own methods to a simple SOAP object that you have imported from a 3rd party web service. Could be something as simple as a custom sort or a method to return a validation result based on data on the object. (ie has all data been entered correctly?) Well you can do exactly that with Class Helpers without having to change the code you import from the WSDL and whats better, if you have to re-import the WSDL, you are reasonably well protected from having to do any of the work again, as the class helper just links to the new version of the base class.
We also now have in XE3 record helpers as well, really extending this functionality again.
What I love about them, is that just like Interfaces, generics, RTTI etc.. there are a number of Delphi language features that have been around for a long time, that will just work with iOS. There is loads of non trivial code that is out there, that will just work onto iOS (e.g. Marco blogged from last weeks Developer Direct about code from Delphi 2010 for linking to twitter that just recompiled and ran on iOS
Anyway, enjoy the video. How are you using them?Posted by Stephen Ball on March 18th, 2013 under Business Display Demo, Delphi, FireMonkey |