Search code examples
c#monocross-platformfreepascallazarus

What would be the best technology to use for cross-platform GUI development?


I am wanting to start a new (open source) project, and I wish for it to be cross-platform on Windows and Mac OS X (Linux would be good, too!)

I am open for developing seperate front-ends for each platform, but the core logic should be shared.

I would need the following:

  • Preferably a native GUI widgetset
  • FTP connection (platform-independant wrappers)
  • A TreeListView (again, preferably a platform-independant wrapper)

I have been researching this for quite awhile now, and I find these solutions quite attractive:

  • Mono, using WinForms for Windows, and MonoMac for OS X
  • Lazarus (FreePascal) with LCL

Mono pros:

  • Uses C#, a very nice language to work with
  • Has widgetsets for OS X and Windows

Mono cons:

  • Mono Framework is a dependency for my application

Lazarus with FPC pros:

  • Pascal is a great language too, and I know how to work with the Indy controls for FTP.
  • Has VirtualTreeview, which is the best treelistview control I have ever seen!
  • Cross-compilation is possible
  • Also has widgetsets for Windows and OS X
  • No framework dependencies!

Lazarus with FPC cons:

  • It appears the support is dying, but maybe thats just me.
  • VirtualTreeview appears to only have ports for Windows.
  • Executables can get quite large, but that can be fixed.

I also looked into Delphi XE2 with FireMonkey, but it does not use native controls, and it does not look native, due to the anti-aliasing. :(

Now, my biggest concern is, that I cant seem to find a TreeListView that works for Windows and OS X! I really need a treeview with columns.

The big points go to the technology that has a cross-platform TreeListView that works and is still supported.

Thank you for your time!


Solution

  • I would strongly suggest against Pascal.
    It is a dying language, and as you noticed support will diminish with time.
    The chance of asking a question and getting an answer is much better with more modern languages.

    .NET/Mono is one good option.
    .NET has TreeView in WPF, but it's not implemented in Mono, and as far as I know, it never will be.

    Another option I'd suggest checking out is Java (Or even better - other JVM based languages such as Scala).
    It's very cross-platform(Maybe the most cross-platform language), support is good and language is still evolving (Although it was stuck for a few years), and the syntax+code style is very similar to C#(excluding support for LINQ, etc.), which makes moving from one to another pretty straightforward.
    JVM is a prerequisite, but it's not really big problem, as it's already installed on most machines.