Cross-platform development - Go with a cross-platform UI toolkit or native on multiple platforms?

后端 未结 8 1280
灰色年华
灰色年华 2020-12-30 17:06

I\'m looking for some arguments to pitch to my boss and fellow developers.

We\'re currently finishing up the preliminary UI mockups and getting ready to move on to

相关标签:
8条回答
  • 2020-12-30 17:49

    Personally, I'd rather stick multiplatform and don't give a damn for that eyecandy, but if I wanted to pitch the use of those native APIs, I'd work out the (end-user-visible) differences between how things are done in different GUIs. If you can convince them that, in order to feel native, the program's user interface has to look and feel very differently on Windows and OSX (because of different design guides/philosophies/whatever), they should understand that, even with wx, you would still have to implement it twice, to accommodate those different requirements, so you might just as well use the real thing, i.e. the native API.

    0 讨论(0)
  • 2020-12-30 17:50

    Writing two font ends is a lot of work, maintaining two front ends is a huge amount of work, if you need your program to run on multiple platforms go with a multi-platform toolkit.

    If you write platform specific front-ends, each using the state of the art tools for that particular platform, you will get a much better user experience - but the cost of developing and maintaining those will be on the same order of magnitude as developing the entire application from scratch for each platform (yes, even with MVC).

    0 讨论(0)
  • 2020-12-30 17:54

    Also see this thread on the Google Chrome mailing list discussing the same choice of UI for Chrome on different platforms.

    0 讨论(0)
  • 2020-12-30 18:00

    Create your core code in Standard C++ and use Objective-C++ with Cocoa to create your user experience on the Mac and C++/CLI plus C# with WPF to create your user experience on Windows. Follow the platform guidelines for the Mac in your Mac version, for Windows in your Windows version, and don't even bother thinking about trying to share user interface code.

    One good way to manage this is, instead of just Model-View-Controller, following a Model-Model Controller-View Controller-View architecture. Your Model Controllers are platform-independent and manage the higher-level functionality of your application. (For example, its entire concept of documents, file format, job queues, and so on.) Your View Controllers are platform-dependent and mediate between your Model Controllers and your user experience.

    Of course you'll probably also want some platform-dependent code at the model level too; for example to use NSOperation on the Mac and thread pools on Windows to implement job queues. Just create your own lightweight abstractions for that sort of thing.

    0 讨论(0)
  • 2020-12-30 18:02

    Does anyone have any suggestions on how to pitch using native UI toolkits in our next application vs sticking with wxWidgets?

    No one likes a corridor-wiseass.

    I think action speak louder than words...make a small prototype of how you think it could be done, and show it. Maybe you have to do this in your spare time.

    Cocoa is really great so I think that with little code you can show an idea...well, this require that you know Cocoa enough.

    0 讨论(0)
  • 2020-12-30 18:04

    Win32 is definitely waay to old, but you might want to look into something like Microsoft Foundation Classes which is designed to do native development with C++. I assume that a similar thing exist for MAC.

    Personally if I was in your situation I would properly also go for QT or WX.

    0 讨论(0)
提交回复
热议问题