gabrielrcouto / php-gui

Extensionless PHP Graphic User Interface library
2.24k stars 175 forks source link

Is php-gui currently being supported/developed ? #184

Open davekimble2 opened 4 years ago

davekimble2 commented 4 years ago

Is php-gui currently being supported/developed ?

still-dreaming-1 commented 4 years ago

This is not intended to be an answer to your question, and I am not associated with this project, but I still feel there is a possibility this information might help you or other people interested in a way to develop a program with a GUI where the GUI library is well supported and actively developed. This is more just my experience, my perspective, and some things I have learned.

For me personally, I recently decided that php-gui is no longer supported, in the sense that it is not well supported enough for my use case. Once I got a few controls on a window, and began actively developing a program using php-gui, it quickly became clear it is quite buggy, at least on my computer. There are a few issues I have either created or commented on that have not been dealt with by any maintainers, and this has gone on long enough I consider php-gui to be unsupported, at least for my purposes.

Another way in which php-gui seems unsupported to me is there has not been a new version released since January of 2019, even though there have been some very important, at least for me, bug fixes in the master branch since then. This seems to indicate the project owner/maintainer is not currently very invested in this project. For me, only the master branch is partially usable.

I had been trying to use php-gui as my GUI library while working on a personal project. I then took two weeks off of work to focus on this project. During that time it became clear php-gui was not a good solution for me, and to my complete surprise, I ended up switching to C# using Visual Studio 2019 as my development environment. This turned out to be a much better option for me. I had previously considered using C# for this project, and rejected the idea, but many things have changed recently for C#, .NET, and Visual Studio, that pushed it over the edge for me. .NET is no longer just a "Windows" thing. .NET Core actually runs on Windows, Linux, Mac, and possibly other places. This is not just some runtime developed by a third party, .NET Core is the most well supported version of .NET from Microsoft. It gets all the latest features even before the .NET Framework does. Even though I am running Windows on my current desktop, this still helps me feel better about using it, as it means .NET might finally have a real future, and if I switch to Linux or Mac later, I won't need to switch languages or libraries. Visual Studio is no longer a "Windows thing" either. It now also runs on Mac. I would be surprised if they don't also start supporting Linux within a few years. The free version of Visual Studio, called Visual Studio Community, is no longer the "stupid version" of Visual Studio. It is actually rather full featured, and is truly free even for limited commercial use, just not what they consider "enterprise" use. Soon Microsoft will come out with .NET 5, and there will only be one framework they develop going forward after that, which will greatly remove the confusion and make it clear to everyone it is multi-platform.

Your primary options for developing a GUI in .NET Core are WPF and Windows Forms. If you want something to help you develop very rapidly with lots of functional controls out of the box, Windows Forms is still easier. Even if you are running on Windows, I would still recommend developing a .NET Core application instead of the .NET Framework one, as it allows you to use C# 8, which offers better compile time protection against NullReferenceException exceptions occuring at runtime, once you configure the project properly. WPF is more so the future than Windows Forms, which is an outdated model now, but is still quite useful for rapid application development.

By switching to C#, .NET, and Visual Studio, I am getting the opposite of what I get with php-gui. It is supported/developed by Microsoft, a company that is financially invested in maintaining and developing it. It is not some half baked thing that a random hobbyist made and then lost interest in, and it is not going to resemble that in the near foreseeable future. The best C# IDE, Visual Studio, is free for personal and commecial use. Whereas the best PHP IDE, PhpStorm, is not free for personal or commercial use. Because C# is a strongly typed language, the refactoring tools offered by Visual Studio are much more reliable and helpful.

But if you are willing to consider C#, you might be inclined to compare it with languages other than PHP, like perhaps to Java or Kotlin. For me, the library that comes with .NET is much more explorable and user friendly than the JVM one. If you use a JVM language, the standard package manager the community has settled upon is Gradle. Gradle is very complex and frustrating to do just about anything with, especially for beginners, and in some cases, even for advanced experienced users. The .NET community has settled upon NuGet. In Visual Studio, you can literally browser through and install NuGet packages visually right from the IDE, and then they just work on your project. You might be used to an equally nice experience in PHP if you use composer, but perhaps without visually selecting and installing packages. If you switch to the JVM, you lose that, if you switch to .NET, you don't.

C# is not as easy of a language to pick up for a beginner as PHP is, unless you already have training or experience in a similar language. However, it is in my opinion as easy to learn as Java, and is better designed than Java. You could compare C# to Kotlin in that respect, and while Kotlin is an excellently designed language, better designed than Java, it is not as easy to grok as C# is. So with C# you get a language that is well designed, easy to pickup and learn, has great free tooling, is multi-platform, and has great, officially supported, out of the box GUI libraries that are part of the core library the runtime supports.

davekimble2 commented 4 years ago

Thanks for that comment.

My latest template is template.3.php.txt

Personal Comments

I came to php-gui as a beginner, with experience of wxPHP and wxPython. There was no overview written for people like me, only highly abstract PHP examples, which I couldn't understand.

The Class Application creates a top level window. The word "application" is not intuitively a "top level window", so I would prefer it if "Application" was renamed "Frame()".

The Class Frame should have a method "setBackgroundColor($color) without having to create a pointless container, just so you can color it.

There is a Class "Table" in the examples, but missing from the library and the documentation.

There should be a Class "StatusBar" automatically created at the bottom of the frame, with full width, and height sufficient for one line of text.

All Classes are instantiated with an array of values, always including keys 'left', 'top', 'width', 'height', which should be replaced by simple datanames (e.g. $frame_left, $textbox_width). Additional datanames would be necessary for individual controls.

The use of anonymous functions should be banned from PHP, as they are non-intuitive and unnecessary. If you doubt this, look at the PHP manual, and the reams of detail needed to explain them properly.

The Class "TextArea" doesn't have a mechanism for dealing with the sitation where there is more text than will fit in the control. Scrollbars are required.

The Class "InputFile" correctly puts the selected filename in the box, but the method getValue() doesn't get it, it gets an empty array.

The Class documentation correctly mentions all the methods, and the Methods correctly mention all the parameters, but the parameters are NOT documented properly, that is, what they are FOR. An explanation of what the classes are FOR, is also lacking. It only needs to be one short paragraph.

There are no examples of PHP coding, at the point where they are needed most, in the documentation.

It would be great if all of this stuff could be implemented, but it appears the project is dead.

I have also been looking at the PHP extension UI, but it is still in alpha and there is a distinct lack of recent activity.

Other views welcome.

vonHabsi commented 3 years ago

I think some knowledge of Lazarus is needed to use this package properly.

As Lazarus is always changing some updates will need to be made to this package.

I suggest anyone using this problem develops some Lazarus skills.

sudo123 commented 3 years ago

use c#, another choice. I want to try php-gui,but now I need give up .

gogl92 commented 9 months ago

have anyone tried https://nativephp.com/ ?

terremoth commented 6 months ago

have anyone tried https://nativephp.com/ ?

Unfortunately they use Electron, which is a bloated mess.

aolko commented 6 months ago

have anyone tried https://nativephp.com/ ?

Unfortunately they use Electron, which is a bloated mess.

they plan to move to tauri

terremoth commented 6 months ago

have anyone tried https://nativephp.com/ ?

Unfortunately they use Electron, which is a bloated mess.

they plan to move to tauri

For the god's sake this is good news