Don of the Day

Don of the Day


Adventures in software development with Xamarin and the Web

Software developer, building things with code in sunny Scottsdale, AZ.

Share


Twitter


iOS UI Tools vs. Microsoft UI Tools

Don FitzsimmonsDon Fitzsimmons

Maybe that title is wrong. But, I'll be totally honest here, this is a rant (so take this with a grain of salt, it's not totally rational). I don't know if that's the best title. What I do know is, I want to compare the design/ui experience of building an iOS app vs. building an app for Windows; namely, Windows Phone (that dead platform) or any WPF application since 2008.

But first, there's some serious irony that needs pointing out. Here's what I mean. iOS apps are typically beautiful, thoughtful and often involve eye candy (iCandy?). On the other hand, most of us have a lot of experience with Windows applications that look, well, like shit. They don't offer much in the way of aesthetics, but are often functional. Now, that's not a universal truth, there are some nice Windows applications, especially on the phone and more recently, on Windows 10.

Back to the irony. Microsoft's design-time experience, the tools we developers have available to us to actually build these applications, are decades ahead of what Apple offers iOS developers. I know this because I've worked with both...intimately. And I can tell you, I'd take Microsoft's development tools over Apple's any day. Using these two toolsets, it's like living in two different eras.

These poor iOS developers (I'm among them now) are suffering with problems that were solved by Microsoft, literally a decade and a half ago (the year 2000). I'm talking WinForms. WinForms had better design-time tools than Xcode 7-point-whatever it is now. Like, way better. I could build a Windows app years ago, for multiple screen sizes, and not have to deal with springs, struts or the dreaded Autolayout. 15 years ago!

Since the early days of WinForms, we Windows developers got something much, much better: Windows Presentation Foundation (WPF; circa 2006). A major evolution in the design-time experience with some serious advancements in the area of UI abstraction (I'll get to that). Meanwhile, iOS didn't exist yet and Xcode was as primitive as could be. I remember playing around with Xcode early on, in 2003 and wondering how Apple would survive with this ugly language (Objective-C, which is just my early opinion of the language with no experience using it) and this primitive IDE (compared to Visual Studio).

WPF gave us a markup language for defining a UI declaratively known as XAML. It's not perfect, not even today, but it's really, really nice compared to other tools. In fact, it's better than anything I've seen or used. Not only did we get a great markup language, we got a sweet design tool called Expression Blend: a real UI design tool that reflects how your app will truly look as you build it. You can use Expression Blend to design your app with static data (bind to mock objects), but when it runs, it's bound to real data. That's nice.

And the tool itself, Expression Blend, was built with XAML and WPF using something called MVVM, or Model-View-View-Model. It's a great way to build UI's without tightly coupling your UI logic to your actual UI. That markup language also has something really unique built into it. It's called data binding and it's magical. Combined with MVVM, data binding greatly reduces UI coupling and the tedious UI code we developers have to write on a daily basis.

Using these tools, XAML, Expression Blend and MVVM, a Windows developer has the best toolset on the market for creating great user experiences. So, why so many crappy Windows applications? Why aren't Windows developers known for creating the best user experiences in the industry? I have no answer for that, but, if the toolset is the criteria for a great user experience and design, Windows developers have no excuse for building crappy UI's.

Let's contrast that with the current iOS design-time tools and UI abstraction layer. We have Xcode, which is Apple's version of Visual Studio, Interface Builder and the MVC abstraction model. Xcode is nice. It does the job, but it's so far behind Visual Studio, it's embarrassing. Interface Builder and Autolayout (Apple's way of handling differing screen sizes and resolutions) is an abomination. I can't emphasize how bad these tools are. Not so much Xcode, but IB and MVC.

Let's talk about Autolayout vs. XAML. With XAML, I don't have to think about screen size, resolution or positioning much. XAML is smart enough to handle most of that for me. I just need to use the right containers and it's an afterthought. With Autolayout, I have wasted days...days, trying to align a few buttons under a progress bar. It's unbelievably bad. Maddeningly frustrating. Apple has taken some very rudimentary tips from XAML and created UIStackViews (which is a revolutionary breakthrough to iOS developers). But they suck horribly and are a poor attempt to mimic the StackView XAML established years ago.

Now what about the MVC model? Apple loves to tout this paradigm in it's developer documentation as way to separate concerns. Really, it's as primitive as the rest of the iOS development experience. Most of your UI code will end up stuffed into your view controller. Much like lousy .Net developers stuff everything into a code behind (same concept). The code I see for most iOS examples is tightly coupled and far from reusable. They don't know MVVM yet and that was well-established in 2008. If Apple starts promoting MVVM to decouple UI code, it will be a revolution in software development, I'm sure.

Yet, iOS developers, despite the crappy tools they have, produce better UI's than Windows developers...consistently! Why is that? I have no idea. But it's true. Windows developers have the best tools on the planet for creating great user experiences and iOS developers have nearly the worst tools. Yet iOS apps almost always look better. I give a lot of credit to iOS devs for creating so much with so little.

Now that I'm writing iOS apps, I'm suffering. I'm hurting. There's existential pain in my innermost being. You know why? Because I know a world where the design-time experience is so much better. Where the UI abstraction model is so much cleaner. A world where I can bind two-way data. Yet, Windows apps have no where near the market share that iOS apps have. Windows Phone users are a fraction of a fraction of the market. So, I will suffer with Apple's antiquated tools that are decades behind in order to reach a larger market. I'll do it, but it hurts.

Thankfully, I have the ability to use C# to write my iOS apps because of Xamarin. I can also use MVVMCross to abstract my UI code. But, I long for the day when I can layout my iOS (or Android) UI with XAML using Expression Blend. That's the dream. It's a dream iOS developers can't even conceive of, yet they often churn out better UI designs than those of us with the most advanced toolset on the market. Kudos to them.

Software developer, building things with code in sunny Scottsdale, AZ.

Comments