Tag Archives: Native

Native Development on Windows

Yesterday I asked on Twitter…

I got one serious answer and some fun poked at the question, which is fine, but I think it points to a real problem on the Windows Desktop. 

Has Microsoft given up on native applications at a time when native on Apple Platforms and Android have never been more popular?

On Apple Platforms we have clear, well defined, native development tools for creating serious desktop applications. Think of apps like Photoshop, or more modern takes on graphics like Sketch, Acorn, Pixelmator, or OmniGraffle. Most of these applications are written in Objective-C against Cocoa (Apple’s Framework for writing applications.) Sure, Photoshop is the old guy in the mix and is built on a custom framework written in C++ that communicates down to Cocoa (and possibly some Carbon API’s?) also worth noting, with the exception of Photoshop, not a single app mentioned above is cross platform (I’m not including Mac to iOS as cross platform, many of the API’s are the same and the act of going from one to the other is much easier than going to a completely different platform.)

All that brings me back to the question of developing native applications in the vein of Visio or Photoshop on the Windows Desktop. I’ve seen plenty of talk about creating Universal Apps, but those seem geared toward a lighter weight style of application, singular purpose apps focused on lightweight tasks, like Twitter or Facebooks clients, not hard core productivity applications that need to perform well and provide their best experience on the Desktop.

We still have Visual Studio, C++, and the Windows API, as a development platform but it feels somewhat abandoned. I know the folks working on the C++ compiler would probably argue against that statement because Microsoft is definitely investing in C++, but what about OS level API’s? That is the level that sort of feels abandoned. We have WinRT today, which seems like it might be part of the story for native desktop development, but do you mix and match that with the Windows API to build a great native application, do you use WinRT alone, or do you just continue to plug away with the Windows API?

It seems that apps built for the modern Metro look should use WinRT? Based on that it seems the old tried and try combination of C++ and the Windows API would still be the best choice for hard core desktop development.

But what about C# and XAML? Maybe those are a good choice for serious desktop development? I’m unclear on that subject. I’ve heard that the Visual Studio IDE was rewritten in C# for Visual Studion 2012, but I don’t know if that’s true or not. If someone reads this post and can point to MS Office, Visual studio, or Photoshop class applications written in C#/.NET I’d love to hear about them. Worth noting is the wonderful toolset by the folks at Xamarin, it makes C#/.NET app development truly cross platform.

Being a long time C++/Windows API guy I still gravitate toward that toolset. Hey, I have a lightweight class library I wrote in 1993-94 that still works today; it builds with Visual Studio 2015 and runs fine on Windows 10, but it could certainly use some refactoring given the state of modern C++. Think C++14.

I’ve been working on a cross platform project recently using Qt, which has me think about portable C++ for Mac, iOS, Windows, and Android. Given C++14 as a starting point for most OS level services; file I/O, threading and synchronization, etc, what would it take to build a modern C++ library that handled native user interface creation and interaction and didn’t feel too constraining on the platform? Remember, most cross platform tools come at a price. They’re always a little behind, they tend to be least common denominator, and can feel non-native. Qt, for instance, doesn’t use native controls on Windows (NOTE: this may not be true today. This was true around 2008, the last time I looked), I find that terribly annoying. I’m sure any Mac, iOS, or Android developer worth their salt would also find it annoying. 

A nice new C++ framework for building native OS level user interfaces using modern C++ as a base would be great to see. I really wonder how long it would take to build such a thing?

Choosing Native

Links the kitty!Andrey Butov: “The people who really seem to benefit from using the abstraction layers are web developers who aren’t comfortable with native code (C/C++/Obj-C/Java), but who are very strong in Javascript/HTML5/CSS. I’m not in that camp, so having to skip a native-code implementation, in favor of Javascript, would actually be a disadvantage for me, rather than a benefit.”

Andrey does a great job of sharing some of the reasons it’s best to choose a native platform over something like Titanium.

I guess we all go to our comfort zone when it comes to life, and that holds true for software developers as well. I prefer to use the platform tools, so I have a history of writing in C, C++, and now Objective-C. Yes, it’s painful to learn a new platform, but I think it’s worth it.

UPDATE (8/26/2012, 2:20PM)

Branch: A Blow To HTML5: “Facebook has now largely moved away from HTML5 in favor of native Objective-C code with their new iOS apps. And the results speak for themselves. Facebook had been one of the companies that most vocal in their support of HTML5 as the future of everything. The apps suffered as a result. And now they’re changing their tune. Is HTML5 still just not ready for prime time? At least on mobile?”

HTML5+JavaScript is never going to be as fast as a native application. I think it depends on the goals for you application. If you’re ok with a lowest common denominator experience, a web site will do just fine. If you need a rich, interactive, experience you may want to create a native application, especially on mobile. When I use my desktop I don’t mind visiting website based services as much. I think it comes down to screen real estate and I can easily switch away from the site and dow something else, while it loads.

I guess the bottom like is, I believe native is a better choice, at least for the foreseeable future.

No

Rob Fahrni, binary formLoic Le Meur: “How do you think it will evolve? One platform will win? When html5 is good enough apps will die and web based on all devices will win? How many appstores will we have to register our app to?”

I say ‘No’ because I don’t think a web browser can beat a native application. The web is definitely a least common denominator way to reach an audience and give them a taste of what’s possible, but if you want a rich, and deep, experience nothing beats native. Most mobile applications tend to be fairly shallow, not all, but most. That leads to the question Loic is posing. His products are fairly shallow (that’s not an insult, just an observation) so an HTML 5 version may be plenty “good enough” to satisfy his users.

I for one would go off and write a native app because that’s how I roll. I’m a native snob.