Windows Phone: A developers dream wrapped up in a developers nightmare

I was thinking about it tonight and that was the phrase that popped in my head. And it is absolutely the truth. It will take me a while to get to the end of this, but the build up is important to fully make my point.

I respect what lower level languages like C, C++ and even assembly have to offer. I've even learned each of them, to an extent, in a classroom environment during my university years. They are incredibly powerful, but also overtly granular and tedious.

Are they better than so called higher level languages? Yes and no. Most people blindly make claims that .Net doesn't compile to very comparatively efficient code. That simply isn't true. The .Net compiler and runtime are VERY well written and write VERY efficient code almost all of the time and are able to often compile poorly written code in much more efficient code. They are in fact far more reliable than the average human being. What makes .Net slow, if anything, is it isn't compiled directly to machine language. With a language like C/C++ the code is only as efficient as the developer is able to make it.

This is getting off track fairly quickly. Where I was going with this is, iOS and Android implement what I would argue are lower level programming languages than Windows Phone. And this makes them less suited to the modern app development world.

First I'll start with Android. One might argue that Android effectively uses Java and that Java and C# are basically at parity. I spent 5 years in university writing in Java for most of my classes. My first professional job as a developer was in Java. Java and C# have a lot of syntactic similarities at a rather basic level, but VERY quickly diverge. And Android uses a bastardized Java, that is really a bastardized subset of Java and forces you to implement in a very specific fashion. So, while the code under the hood often looks identical to pure Java, the end to end development and deployment of the application is even further from out of the box Java than C# is.

Android development is a pain in the ass. I've been there for a brief period. It was TERRIBLE. And I didn't even get to a point where I need to deal with the nightmare that was the fragmentation of the Android universe. And as bad as Android is, it is still in my opinion, from a developers standpoint just the middle of the road. Developing on Android makes me feel like I'm trapped in a development world from the late 90's. As a developer it is worse than pure Java development but certainly "better" than something like C++.

To break off for a second. I said "better" instead of better for a specific reason. Virtually every programming language serves a purpose. C++ is a fantastic language for a great many thing. Where it isn't great is modern app development. As stated, C++ provides a lot of power and flexibility, but it does so at a cost. More code is often required to achieve the same results, it is therefore typically harder to read. Simple code fragments may be more or less identical, but higher level programming languages are called so because they contain higher levels of abstraction whereby one or a series of steps are simplified which is why there tends to be more code to accomplish the same thing in a lower level programming language.
Without those abstractions, things like user interfaces and memory management tend to be much more complex to code and manage. These things are fine for small libraries written by professionals (real professionals who are actually capable of writing code better than what .Net would compile your code into, which in my experience comprises a group of less than 1% of the dev community). It isn't really the ideal language for a quick turnaround project complete with UI, logic and a DAL. And when you're looking at developing apps that range in price from free to ad supported to maybe $4-5 tops... you really don't want to be getting into bed with a language as complex as it is powerful.

Back to Android quickly. So, while I feel Android's mock-Java implementation is worse than Java as a high level programming level, and thus robs developers of a little of what made Java good there is a flip side. Android isn't as bad as iOS from a development standpoint and Android wraps that up in an environment which lets you do almost anything. So, while the development process may not be the most seamless and dev friendly, it is still a fairly high level programming language and delivered in an environment with almost limitless freedoms.

At this point you can probably see where I'm going. iOS is development is based on Object C, which as the name implies shares similarities with C/C++. This is a FAR worse state of affairs than Android. Their IDE deals with the biggest challenge, UI design, but unfortunately, such an archaic language is fraught with a multitude of other problems over which nothing is done to mitigate the headaches of. And to make matters worse, for all of this low level code you need to deal with, you are given very limited access to the system. Direct access to memory addresses, low level systems and the likes are one of the defining reasons why people turn to languages like C/C++, but on iOS, Objective C gives you none of this. And you're left without modern development amenities like garbage collection. Its barbaric. To give you a sense of how bad this paradigm is, Apple's own apps crash... regularly. Remember when I said less than 1% of the population can write quality code? That was probably optimistic, even a company with Apple's cash flow can't find enough quality developers to sort out all of the memory leaks and issues with their own apps on their own OS running on their own hardware.

While Apple apps may live in an even more archaic development world than Android, their UI tools are better, and their device ecosystem is much more consistent. I would suggest that initial development on Apple would take longer than on Android, but that the same application designer for both OS's would reach a stable point on iOS quicker than on Android. But, for the sake of this article, developing for iOS is a nightmare wrapped in a nightmare, putting it firmly in last place.

Which leads me to Windows Phone. .Net is a joy to work with. And while you're given a stripped down version in Windows Phone, all of the tools look and act the same as with its big brother (XAML + C# previously known as WPF). Unlike the Java to Android shift, there is no uncomfortable transition from WPF to WP. The language incorporates a UI designer on par with Apple's, but developers can optionally work in pure XAML which is a reasonably mature XML based design language... or if you're truly into it you can even write the screens in code. It is a modern, high level programming language with all of the trimmings. If you want to turn out quality apps fast it is the ideal language. The problem is the environment you need to deploy that code into. It is locked down just like iOS. So, while it has the superior language and IDE, it is handcuffed by an OS that treats those that write apps for it like second rate garbage.

Yes, I get why Microsoft and Apple lock down their systems. Apple was able to ride on the coattails of the iPod to get people accept their OS anyway. Microsoft doesn't have that brand appeal any more though. And people don't want to write apps for an OS that won't let them serve up the kind of apps they want to deliver.

From a development language perspective, WP takes the cake. But, I guess the conclusion is, in the light of what this post was all about. I have to say that overall Android wins this arena.

Comments

Popular Posts