

Cocoa developer here. What APIs/tools for writing a commercial Windows app? - GeneralMaximus

Hello.<p>I've been writing Mac OS X desktop applications with Cocoa for quite a while now. I like Objective-C immensely and enjoy developing with Xcode. The best thing about developing for the Mac is that there is a single "official" API and a single set of development tools, which means I don't have to spend time picking a toolset, language and API.<p>Now I want to jump into Windows development. I was not a big Windows fan back in the XP era, but I like Windows 7. C# and Visual Studio are great. A friend -- also a Mac developer -- and I have an idea for a desktop application both of us sorely need, but we cannot decide what API we should use to write our UI.<p>There used to be Windows.Forms, but that's deprecated now. I've heard rumors about Microsoft deprecating WPF over Silverlight in Windows 8. Is this true? Doesn't Silverlight just use a subset of WPF?<p>Windows 8 will also provide a way to write applications using HTML and JS, so there's that.<p>Now we're thoroughly confused. Deciding between different versions of Windows and Visual Studio was hard enough, but I believe we made the right choices there. This one is a doozy, though. We don't want to spend 6-8 months writing an application just to have Microsoft deprecate the API we use.<p>I wouldn't even have dreamed of asking this question if our app was just another CRUD app. But UI is a huge part of what we're planning, so we want to make the right choices there.<p>Help?<p>EDIT: formatting.<p>EDIT 2: more formatting.
======
architgupta
Great question.

I have tried to understand this myself without a good answer.

Google chrome UI team had an article on how they didn't find good user
controls or windowing system for Windows and had to write everything from
scratch. The chromium source was way too complex for our needs so we ended up
not exploring it.

Still open source GUI code. (So good open source GUI code in Windows has been
hard to find, but that's a good bet).

You probably want your app to run on both XP and 7 ?

8 is vaporware as a target platform for releasing and scheduling purposes.

We started with Windows Forms for our work because we were familiar with the
code. (We did use MVC pattern using MVCsharp). We _meant_ to switch to WPF but
we never made the leap. There are UI-controls you can buy (with source) which
you can use as plug and play. There are a few popular vendors.

Windows Forms still look ugly (lipstick on a pitbull kind of thing)

WPF is supposed to be a panacea with XAML being markup and that letting you
generate "fluid-UI" just like HTML with auto-resizing and scaling as in the
browser for your web-app.

I'd explore WPF and figure out a MVC-pattern library for separation of
concerns.

Hope this helps.

~~~
GeneralMaximus
Thanks.

> _You probably want your app to run on both XP and 7?_

No, we're only targeting Windows 7 and up. This is a personal itch we're
scratching. The commercial angle is a bonus ... for now!

> _8 is vaporware as a target platform for releasing and scheduling purposes._

What about, say, 4 to 6 months from now? That's the timeline we're thinking of
right now.

> _WPF is supposed to be a panacea with XAML being markup and that letting you
> generate "fluid-UI" just like HTML with auto-resizing and scaling as in the
> browser for your web-app._

I've read a bit about WPF. It sounds amazing. My major concern is: will it be
actively developed in the future? I know Microsoft will never break backward
compatibility, but will they keep adding new things to WPF? That's what's been
bugging me.

But I guess having this discussion is fruitless. After all, what choice do we
have besides WPF?

------
paulbatum
There are many people out there wondering the same thing - the Win8 HTML/JS
announcement has thrown the rumor mill into a frenzy.

My advice - wait one month for BUILD (<http://www.buildwindows.com/>).

(disclosure - I work at Microsoft)

~~~
GeneralMaximus
Ah. I suppose we'll start working on the core of our application now and
decide on the UI later.

Thanks!

------
runjake
Pick up Visual Studio Express (Visual C# Express) for starters:

[http://www.microsoft.com/visualstudio/en-
us/products/2010-ed...](http://www.microsoft.com/visualstudio/en-
us/products/2010-editions/express)

If you have a .edu or other edu-type email address, sign up for the DreamSpark
program and get a bunch of software for free at <http://www.dreamspark.com>.

Windows Forms is NOT deprecated, nor is WPF.

The good news is that you can jump in anywhere and the skills you learn will
help you down the road. WinForm and, even moreso, WPF programming will help
you if you wish to jump into Silverlight.

It's all the same crap and you'll be able to transition easily. I've been
playing with WPF and Silverlight as of late. Perhaps you should start with
WPF.

You can write your app in whatever today and it probably won't be deprecated
for at least a decade, but in the current eco-system of
WinForms/WPF/Silverlight it's pretty easy to transition code if you keep it
clean.

------
Corvus
There are many graphics APIs for Windows. Which one is best for you depends
entirely on what kind of application you are building, which you have not told
us.

I would not worry about Microsoft deprecating an API in "6-8 months".
Microsoft has been extraordinarily diligent in maintaining old APIs; I know of
new desktop application development being done in WinForms, and 20-year old
16-bit MFC applications that are still being used.

If you are building an application now, choose the best API now. Do not worry
about what will happen in 6-8 months, because by then there will be another
new API coming. Waiting for the ultimate API means you will never start.

------
OzzyOsbourne
I don't want to sound like a live-free-or-die-hard FOSS fanboy (even though I
am), but, you could always use an open toolkit like Qt or GTK. They're
ubiquitous, and especially in Qt's case, totally customisable in terms of look
& feel. Microsoft can't perform any cathedral-style deprecation
(cannibalization) to these toolkits.

~~~
umenline
Qt all the way for windows app

------
gspyrou
My suggestion would be to use Silverlight :

1.Single codebase between Mac & Windows

2.Out of browser support

3.Rich UI capabilities <http://www.silverlight.net/showcase>

Seeismic Desktop 2 is a good example .

