{"id":943,"date":"2012-08-02T09:28:31","date_gmt":"2012-08-01T21:28:31","guid":{"rendered":"https:\/\/www.deltics.co.nz\/blog\/?p=943"},"modified":"2012-08-02T09:28:31","modified_gmt":"2012-08-01T21:28:31","slug":"firemonkey-to-support-native-controls","status":"publish","type":"post","link":"https:\/\/www.deltics.co.nz\/blog\/posts\/943\/","title":{"rendered":"FireMonkey to Support Native Controls"},"content":{"rendered":"<span class=\"rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">[Estimated Reading Time: <\/span> <span class=\"rt-time\">4<\/span> <span class=\"rt-label rt-postfix\">minutes]<\/span><\/span><p>In the comments to my previous post, David Intersimone mentioned that Embarcadero are working on enabling support for platform native UI controls within FireMonkey!<br \/>\n<!--more--><\/p>\n<blockquote><p>The team is working to surface native controls for FireMonkey on each platform. Then developers will have the choice to use vector drawn components in their projects across all platforms \u2013 or to choose to have native controls on each specific platform. More to come when additional FireMonkey capabilities are completed.<\/p><\/blockquote>\n<p>This confirms what I had already heard through unofficial channels some weeks ago from a different source.  At that time I was highly skeptical and thought that someone must have misunderstood what was going on.<\/p>\n<p>Surely the whole point of FireMonkey &#8211; it&#8217;s very philosophy and raison d&#8217;etre &#8211; was to <em>eliminate<\/em> native UI bindings in order to provide a unified, and universal, GUI abstraction for all FireMonkey supported platforms ?!<\/p>\n<p>i.e. if you developed a FireMonkey control (or indeed complete GUI) you only needed to do that work once and you would have something that worked on <strong><em>all<\/em><\/strong> supported platforms, using theming and styling to achieve <a href=\"https:\/\/www.deltics.co.nz\/blog\/?p=868\">platform &#8220;native-lookey-likey&#8221;<\/a> where appropriate and necessary.<\/p>\n<p>To now decide to include native controls in the framework surely constitutes a tacit admission that the FireMonkey approach was flawed from the outset ?<\/p>\n<h3>Mixed Blessings<\/h3>\n<p>On the one hand, at least the realisation has finally dawned that native development is not just about the bits and bytes spewed out by the compiler, but also goes deeper (higher?) into the user experience and &#8211; I would argue &#8211; the <em>developer<\/em> experience when targeting a specific platform.  We can perhaps now at least look forward to being able to create <strong>true<\/strong> native GUI applications on the FireMonkey supported platforms in the future.<\/p>\n<p>But on the other hand, this capability is still going to be tied into the shockingly <a href=\"https:\/\/www.google.com\/search?q=firemonkey+bugs\">poor quality FireMonkey<\/a> framework, and the precise approach being taken might itself be problematic.<\/p>\n<p>I advocated all along that the (UI components) in the VCL should remain Windows specific, and that a separate UI framework be created for each supported platform as required.  However, when FireMonkey was first demonstrated <a href=\"https:\/\/www.deltics.co.nz\/blog\/?p=735\">I genuinely believed that this &#8220;abstracted canvas&#8221; approach was actually a pretty good idea and had the potential to be hugely successful<\/a>.<\/p>\n<p>But that was before I actually had any experience developing on the other platforms that I anticipated FireMonkey would be useful for.<\/p>\n<p>Mea culpa.<\/p>\n<p>(<em>As an aside I suspect that this might also be at least partly responsible for the mindset that led to the FireMonkey approach in the first place<\/em>)<\/p>\n<p>My biggest concern with a &#8220;universal native&#8221; approach is that the intention will be still to have a single FireMonkey control that will automagically surface an appropriate native UI control internally.  This appears to be the approach being taken in <a href=\"http:\/\/www.kickstarter.com\/projects\/220786322\/nakeymonkey\">the proposed NakeyMonkey project initiated by Jason Southwell<\/a>, for example.<\/p>\n<p>That is, there will be a <strong>TFMXNativeEdit<\/strong> control (invented\/speculated name) which on Windows\u2122 will surface an <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/bb775458(v=vs.85).aspx\">EDIT control<\/a> and on OS X \/ iOS will surface a <a href=\"https:\/\/developer.apple.com\/library\/mac\/#documentation\/Cocoa\/Reference\/ApplicationKit\/Classes\/NSTextField_Class\/Reference\/Reference.html\">NSTextField control<\/a>.<\/p>\n<p>i.e. that they will still be clinging on to &#8220;the single GUI for multiple platforms&#8221; linch-pin of the FireMonkey approach<\/p>\n<p>When employing native controls, the problem this suffers from is that of &#8220;Lowest Common Denominator&#8221;.  <a href=\"http:\/\/docwiki.embarcadero.com\/RADStudio\/en\/FireMonkey_Application_Design\">A problem that even Embarcadero themselves recognise!<\/a><\/p>\n<p>Any <strong>&#8220;TFMXNativeEdit&#8221;<\/strong> control can only sensibly provide functionality (in the framework exposures) that is common to all of the supported underlying native control variants.  It can only do the things that <em>both<\/em> <strong>EDIT<\/strong> <em>and<\/em> <strong>NSTextField<\/strong> can do, presumably somehow yielding access to the underlying &#8220;true&#8221; native control for those things that need to go beyond that lowest common denominator.<\/p>\n<p>Edit controls are perhaps a bad example to use for raising such concerns as I suspect the capabilities of such controls are pretty much the same on every platform, which is why they are also a bad example to use when testing out the feasibility of such an approach, imho.<\/p>\n<p>In any event, the whole problem is very easily avoided by instead having separate controls for the different platforms.  A <strong>TEdit<\/strong>, being tightly coupled to the <strong>Windows\u2122 EDIT<\/strong> control can provide everything that an <strong>EDIT<\/strong> control can do, and a <strong>TNSTextField<\/strong> can (or rather could) do everything that an <strong>OS X \/ iOS NSTextField<\/strong> can do.<\/p>\n<p>Yes, this means having two separate GUI&#8217;s in your application, but any self respecting developer these days has very, VERY little actual code embedded in their GUI.  The GUI is &#8211; or should be &#8211; a very thin layer on top of underlying business rules that actually perform the functions that the GUI exposes to the user.<\/p>\n<p>And having separate GUI code is an opportunity, not a problem.  It gives the developer the ability not only to use <em>controls<\/em> that are native to each platform, but to also ensure that the <em>entire GUI as a whole<\/em> fits the user experience expectations of the platform, which goes beyond simply having &#8220;familiar&#8221; controls used in the windows presented to them.<\/p>\n<p>I fear that Embarcadero believe that in FireMonkey they have a goose capable of laying Golden Eggs, when all it&#8217;s actually capable of producing is <a href=\"http:\/\/en.wikipedia.org\/wiki\/Curate's_egg\">eggs of the Curate&#8217;s variety<\/a>.<\/p>\n<h3>The Undiscovered Country<\/h3>\n<p>Of course, the future is yet unwritten for those of us not privileged to be under an NDA.  My fears may prove to be unfounded but it is becoming increasingly frustrating that Embarcadero seem intent on dashing my hopes and expectations and all too eager to realise my fears.<\/p>\n<p>But as I say &#8211; we do not yet know, and even now I am trying to remain optimistic.<\/p>\n<p>IMHO it would be far better to at least have some idea, one way or the other.<\/p>\n<p>But even those of us who have already paid for XE3 (i.e. on SA agreements) have NO information about what we will be getting for our money in a month or two&#8217;s time.<\/p>\n<p>It&#8217;s like waiting for the Lotto results.<\/p>\n<p>Or playing Russian Roulette.<\/p>\n<p>Feel free to choose the metaphor you feel most appropriate to your situation.  \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">[Estimated Reading Time: <\/span> <span class=\"rt-time\">4<\/span> <span class=\"rt-label rt-postfix\">minutes]<\/span><\/span> In the comments to my previous post, David Intersimone mentioned that Embarcadero are working on enabling support for platform native UI controls within FireMonkey!<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[4,163],"tags":[292,135,165,166,164],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1TKYv-fd","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1068,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1068\/","url_meta":{"origin":943,"position":0},"title":"Info From the World Tour (Hamburg)","date":"22 Aug 2012","format":false,"excerpt":"In the Embarcadero forums, Roland Kossow posted his report on the first of the \"RAD Studio World Tour\" events in Hamburg yesterday, reporting on what's new in XE3 and adding some more detail to the \"XE3 And Beyond\" blog post. In a nutshell we have \"FM2\" (FireMonkey 2 - no\u2026","rel":"","context":"In &quot;Delphi&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":868,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/868\/","url_meta":{"origin":943,"position":1},"title":"The Emperors New Native","date":"28 May 2012","format":false,"excerpt":"Perhaps this post should be sub-titled: Say a Lie Often Enough and You'll Start Believing it Yourself Apparently some product called ERPLY (yeah, me neither) now has a \"great new FireMonkey native UI\". \u00a0FireMonkey ? \u00a0Native UI ? \u00a0Unless there has been a radical rewrite of FireMonkey in XE3 and\u2026","rel":"","context":"In &quot;Delphi&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":735,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/735\/","url_meta":{"origin":943,"position":2},"title":"RAD STUDIO XE2: Launch Event Report","date":"04 Aug 2011","format":false,"excerpt":"Today I was fortunate to be present in Auckland at the World Premier of the launch event for RAD Studio XE2. \u00a0There is so much good to report that I really don't know where to begin, so apologies if this post is a bit of a disorganised ramble. \u00a0But here\u2026","rel":"","context":"In &quot;Delphi&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":892,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/892\/","url_meta":{"origin":943,"position":3},"title":"Poll: FireMonkey or &#8220;Platform Native&#8221; ?","date":"07 Jun 2012","format":false,"excerpt":"We have had almost a year of monkeying with fire now - enough time I think for people to have formed a view as to whether it is truly a viable multi-platform framework for the future, or just a convenient cross-platform solution with limited, genuine utility. At the same time,\u2026","rel":"","context":"In &quot;Delphi&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2231,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/2231\/","url_meta":{"origin":943,"position":4},"title":"Did you get the Memo ?","date":"01 Aug 2014","format":false,"excerpt":"People looking for a cheap Android tablet have a new option from a respected player: The Asus Pad 7 Although not exactly falling over themselves in excitement (it is an entry level, budget device after all), reviewers are finding a lot to like in this device. But Delphi developers hoping\u2026","rel":"","context":"In &quot;Android&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1660,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1660\/","url_meta":{"origin":943,"position":5},"title":"Fair Comparisons","date":"19 Sep 2013","format":false,"excerpt":"There is an old saying about comparing \"apples and apples\" or more accurately in this case, \"Androids and Androids\". A commenter has already pointed out that an Embarcadero blog post referencing the \"effort\" described by my series of posts demonstrating how to build a camera app for Android using Oxygene\u2026","rel":"","context":"In &quot;Android&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/943"}],"collection":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/comments?post=943"}],"version-history":[{"count":6,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/943\/revisions"}],"predecessor-version":[{"id":949,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/943\/revisions\/949"}],"wp:attachment":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/media?parent=943"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/categories?post=943"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/tags?post=943"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}