* * *

Author Topic: Best practices for Multiplatform GUI portability  (Read 1301 times)

CCRDude

  • Sr. Member
  • ****
  • Posts: 335
Re: Best practices for Multiplatform GUI portability
« Reply #15 on: September 07, 2017, 10:07:06 am »
I'm kind of on all sides at once ;)

1. Many platforms have Human Design Guidelines. Those of macOS and Windows are thousands of pages in total. They define ergonomic interfaces. The (imho, and following those guidelines) huge advantage of sticking to them is making it easier for the user. Windows users are used to programs designed following Microsofts Design Guidelines, macOS users are used to following Apple Human Interface Design Guidelines. Everything that moves away from these standards makes the UI less intuitive.

2. If you ask a designer, they've got their own special set of rules and want a program to stand out because it looks unique. Good designers might make this work without losing the intuitive approach to the program, bad don't. And programmers aren't designers.

3. I think there are reasons to create different frames for different widgets even if following route 1. Or better, for different OS. While the controls are native, the design guidelines for each platform might define different placements, be it (imaginary examples) dialog button order, dialog button position left/right, use of tabbed interfaces, etc.

4. In this example, adjusting the autosize property of the TToolButton and checking transparency of the groups would probably be my first approach.  To be absolutely correct, check the design guidelines of each platforms to check whether all buttons should be autosized independently, or as a group with a fixed common width.

Raul_ES

  • New member
  • *
  • Posts: 39
Re: Best practices for Multiplatform GUI portability
« Reply #16 on: September 12, 2017, 05:49:30 pm »
Thank you all for your comments. I do appreciate your points of view.

regards,
Raúl
Student of Computer Science - UOC

Graeme

  • Hero Member
  • *****
  • Posts: 1394
    • Graeme on the web
Re: Best practices for Multiplatform GUI portability
« Reply #17 on: September 23, 2017, 06:15:30 pm »
fpGui is it "experimental" or it's a mature and reliable project for
enterprise software development?
fpGUI was designed and sponsored (for many years) to work in commercial enterprise environments. And that is where it has excelled in many projects. So yes, it is reliable, 100% cross-platform (looks and behaviour) and very fast. Please take a look at the stable v1.4.x LTS branch, as the "develop" branch in currently in constant flux with new features being integrated, before it is made stable for the next LTS release.

If you have any further questions about fpGUI, please ask those in the fpgui.support newsgroup, as I and others will be able to answer those faster than in this forum. I don't visit this forum very frequently.

  http://fpgui.sourceforge.net


Regards,
  Graeme
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Graeme

  • Hero Member
  • *****
  • Posts: 1394
    • Graeme on the web
Re: Best practices for Multiplatform GUI portability
« Reply #18 on: September 23, 2017, 06:20:31 pm »
See the next two screenshots that I believe ilustrate the problem I refer to. This small example is developed under Windows 10. The second screenshot is the same program running under Linux.
Yes, that is a common problem with LCL, and why I stopped using LCL in commercial cross-platform applications back in 2006. Fast-forward to today, and LCL still behaves the same as back then, and you will continue to fight the toolkit. fpGUI was explicitly designed to look and behave exactly the same, no matter the platform. I even develop whole new widgets just under FreeBSD (my development environment of choice) without needing to test those widgets on other platforms, because I know they will work and look exactly the same as under FreeBSD - and they do!
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Graeme

  • Hero Member
  • *****
  • Posts: 1394
    • Graeme on the web
Re: Best practices for Multiplatform GUI portability
« Reply #19 on: September 23, 2017, 06:23:51 pm »
The only visual difference between Windows and Linux that irritated me was fixed with this simple offset that I have later applied in form creation:

Code: Pascal  [Select]
  1. const
  2.   {$IFDEF WINDOWS}
  3.   FIX_CHECKBOX_OFFSET = 0;
  4.   {$ELSE}
  5.   FIX_CHECKBOX_OFFSET = -4; // workaround for checkbox component different location on linux
  6.   {$ENDIF}

And that is another problem of LCL! It is meant to be a cross-platform toolkit, so why must one fight the system so much to get things cross-platform. Also why must you litter your application code with IFDEF statements just so things "kind of look better". Then there is the LCL issue of some LCL-xxx widgetsets having features other LCL-xyz widgetsets don't have - see the Object Inspector tab that only lists some of those issues. With fpGUI there is no platform specific IFDEF is your application code - NONE!
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Thaddy

  • Hero Member
  • *****
  • Posts: 4442
Re: Best practices for Multiplatform GUI portability
« Reply #20 on: September 23, 2017, 08:38:30 pm »
An average user expects the user experience of the platform. Not some -very nicely done! - approximation that looks the same on anything and my ex-girlfriends butt.
This can be done with Lazarus. Albeit with some quirks.
Usually serious programmers won't ask anymore when they grow up.
Then they can distinguish between everything the same anywhere and platform experience.

To put it simple: if and when you do ask such a question, make sure you know the platforms.
Either lazy or beginner. (Or capable of implementing true X-platform looks always the same anywhere  8-) )
« Last Edit: September 23, 2017, 08:43:24 pm by Thaddy »
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus