Is Xamarin.Forms the panacea we seek?

This is a serious post, not just me thinking aloud.

We all love and use Xamarin (irrespective of it's on a Windows box or OS X), some of us make a living from it, write books on it and even produce video series with it. It has grown incredibly over the last year (especially after MS made it free).

One of the big reasons we use it is that we can reuse the business logic side of the code irrespective of the platform we target (this gives rise to the oft claimed 85% reusable code). Code something once, use it multiple times on completely different platforms and architectures.

Often someone will ask for an application to be written cross platform and for this ask for Xam.Forms to be used. There is nothing wrong in asking for that, it abstracts the UI so if you're careful, you can get away with just about zero required for the platform UI. Obviously, anything platform specific has to be grabbed via injection (for services such as network connectivity, anything hardware based or the likes of the common settings) or via a custom renderer (for UI work).

This leads to the question. If the UI does need custom renderers and information grabbed from the platform, are developers better off not using Forms, but going down the MVVM route and creating the UI natively? After all, creating a custom renderer and playing with DI are not always the simplest of things and therefore the time gained using Forms may turn out to be a false economy. Certainly code such as

var lblMyLabel = new Label {Text = "Hello world"};

is simpler than creating the UI on a Storyboard, Xaml designer or the Android designer then having to link that up to the code behind, but when you then consider that the designer will allow you to size, change colour and assign the text without pretty much doing anything else and more importantly, position on the view without having to work out where it goes in the StackLayout (or whichever layout you decide to use).

Given the number of people asking for forms development, I wonder how many have considered alternate routes and how many see forms to be that panacea resulting in very fast development and delivery times without either understanding the technology or the pitfalls of use.

I'll let you go back to sleep.

You are having a laugh yeah? Out of the two apps you did with forms with my company 1) had to be rewritten as forms was incapable of the visuals and full of visual defects. 2) only just hangs together and offers very clunky behaviour. you weren't able to find any visually compelling forms app when I asked. Seems it might be fit for purpose with basic data entry but for compelling/beautiful end user apps it is a no go.

Mittch van Vliet

Software Engineer / Owner of Titans B.V.

8 年

Good read

回复

要查看或添加评论,请登录

Paul Johnson的更多文章

  • Relay Riders ride done - what next?

    Relay Riders ride done - what next?

    Two very soggy teddies! In my last post, I made mention that I was taking part in the annual Relay Riders around the UK…

  • My life as a biker

    My life as a biker

    I'm in a very fortunate position. I love my job, I love my wife and family (both natural and extended down in Aus) and…

  • When goodbye is not the hardest word

    When goodbye is not the hardest word

    As with all things in life, relationships inevitably come to an end and as usual, the parting can be hard or easy…

  • Sheer bad manners?

    Sheer bad manners?

    I've been a contract developer for around 6 years now and in this time I've had the pleasure of knowing a good number…

    5 条评论
  • The good, the bad & the ugly

    The good, the bad & the ugly

    I've just finished a contract (I'm not going to mention the name of the company I worked for or the recruitment company…

  • Manners cost nothing, but are worth more than money

    Manners cost nothing, but are worth more than money

    In my time, I've been let down by 3 companies who didn't have the good manners to even wave a goodbye, just had…

  • Scammers delight

    Scammers delight

    A scammer is a polite name for a thief. It doesn't matter what the scammer is after, they are attempting to steal from…

  • Let the buyer beware (or learn to love a recruiter - they will save you money!)

    Let the buyer beware (or learn to love a recruiter - they will save you money!)

    I'm not really that big a fan of recruiters. I know many, have had experience of many and to be honest, with the…

    1 条评论
  • Use what is right for a job and not the current flavour (the case against blackbox solutions)

    Use what is right for a job and not the current flavour (the case against blackbox solutions)

    I've been writing code now since 1981. I've seen computers, operating systems and even languages come and go.

    3 条评论
  • Is it a mobile app you need or a mobile strategy?

    Is it a mobile app you need or a mobile strategy?

    I've been contracting in the mobile arena now for nearly 4 years and have worked with many different companies on a…

    5 条评论

社区洞察

其他会员也浏览了