CrossPlatform Information

I looked at cross-platform design information. I can not find the answer to one question that I have.

What I would like to do is create my interface in Delphi (Windows) and X-Code (Mac), while the main guts of the program are agnostic C ++ code. Can this be achieved? I see a lot of talk about Cross Platform Compilers, Frameworks and GUI tools, but I really want the interfaces to be 100% native.

Please forgive me if this is an absurd question, but I'm relatively new to the world of programming and learning along the way. My company has an extensive catalog of Delphi window applications developed over the past 15 years, and Delphi is where I spent most of last year.

+4
source share
3 answers

If you are comfortable working with Object Pascal, look at the FreePascal and Lazarus compiler, which is a free cross-platform IDE (available for Windows, Linux, Mac OS X).

+4
source

You should take a look at wxWidgets http://www.wxwidgets.org/ for programming at 100%.

From my point of view, I do not see the benefits of using two different and specific gui designers for two (or more) target platforms. It should be easy to distribute the code if the platform-specific parts are clearly separated in your architecture. wxWidgets gives you the ability to use the same gui definition on both platforms without losing your own character.

Personally, I will no longer use C ++ for interface design. But why are you using two IDEs? I suggest using a more abstract language (e.g. Java with Netbeans / Eclipse or even better C # /. NET with VS / Blend) for this interface / event / interaction material containing only some specific parts in native optimized binary code.

.Net / Mono can use various tools for the ui style. I believe that today, being “native” in the context of UX, and it seems that this means that we must follow the recommendations of the system. This can be achieved using views and adpaters (see Google for some design patterns). The look and feeling is just the point of laying the application, and it can be a native style. In the WPF world, descriptors are used only for the host window (and some legacy compatibility considerations using Windows forms), but the user will not feel the difference if you create your application like former win-api-ones.

Qt also has a platform independent approach for the C ++ world, but is not really native. Qt creates its own controls with a natural look (if necessary) and comes with the ability to use / share a single interface definition between different platforms.

+3
source

Your question is not absurd in any case - you are looking for a solution to the problem that we have all encountered for many years - how to achieve compatibility between platforms and code reuse. But maybe there are some points that you need to clarify:

As others have said, C ++ is not the only “agnostic language” - in fact, most of the languages ​​are “OS agnostic” - something that usually is not (and cannot be) OS agnostic — it's a compiler, GUI libraries, etc. Pascal, C ++, Python, C #, Java and many others have SDKs for different OSs, most of which are open source.

If for some reason you are configured for C ++, check out the Embarcedaro C ++ Delphi clone using C ++ instead of Object Pascal.

And IMO you should research Qt: http://doc.qt.nokia.com/latest/index.html - Qt is an excellent "OS agnostic mechanism that includes GUI widgets as well as many other powerful libraries that span almost the entire spectrum of modern computer computing.

Although C ++ is the native language for Qt development, there are many “language bindings” available for programming Qt with other languages. (varying degrees of functionality is supported depending on the implementation of the binding). I understand that binding Object Pascal for Qt using Lazarus - I have not tried it yet, but it sounds very interesting.

Also, one caveat: sharing your GUI with the "guts" of your application, so this OS agnostic can be quite complicated in complex applications - I think that reading from the MVC paradigm is a good place to start.

NTN

+1
source

All Articles