What is the concept of GTK? Is it recommended to use it?

Asked

Viewed 2,952 times

3

GTK is to 'create' desktop applications using PHP, I want to know how it works, is a modified browser, with its own server?

I’m interested in doing something similar, something to turn development into PHP, both for the web and for desktop and mobile. And for that I need to understand the concept of these applications that do this.

What are its advantages and disadvantages? Although many do not think it good to create something like this, I see the possibility of becoming something really quality, because PHP is a quality language, and a job can be done to make it a desktop language too.

  • 10

    "PHP is a quality language, and a job can be done to make it a desktop language as well." - it’s actually not a quality language, and for desktop it has much better stuff. PHP is good for quick scripts, as people normally used for the web. To bring it to the desktop, you will only be walking backwards. It’s like opening and closing PC enclosure using cutting-edge knife. Maybe you’ll get pretty good at it, but using the right key will be more advantageous. For example, I have seen works of art made with MS Paint, but it is done by leisure. It would hardly become a profession.

  • I know that there are much better desktop languages that are focused on that platform. For me there is no bad language, and php is a quality language if it would not be used in the vast majority of wev dites. I want you to understand that it is not making PHP better than a Java or C# of life, but something useful in desktop development as well.

  • 6

    I understood perfectly, but is that normally the defects of PHP were accepted on the web because at the time it was innovation, and better than the Asp of the time, which was practically the only other option. But I thought it was important to mention, because today PHP is trying to imitate things that already existed in languages at least 30 years ago, and without the same quality, and in the wrong concept. Like I said, you might do wonderful things with it. But it’s important to understand that you’ll always be behind. And it’s not just the language that counts, but the platform/Runtime that’s behind it.

  • 2

    Note that I am speaking without any prejudice, I use PHP normally. It was just an opinion based on what I know about technical implementation, not on taste. And this is not a criticism of your question, which may even give interesting answers. It was just a counterpoint to the excerpt that I highlighted.

  • 1

    Yes yes I understand, but I disagree to say that it is not a language of quality, it depends on which hands it is, in those who know how to use it correctly results in a quality work, in the others not so much. I see only as an extra fan that can be opened, not to become something professional, but to turn a branch, in desktop applications without having so much questioned as gtk.

  • 3

    I’m just saying that PHP is extremely poorly done. The PHP functions are completely poorly elaborated, and even have a standard in the nomenclature and in the order of the parameters. I’m not saying that a code written in PHP cannot be well written (within what the language allows) It only depends on the hands of those who use it. It has code very well made in PHP, and this is the merit of the programmer who is using, and not the language. The article is not very good, but before leaving any answer, here is a summary: https://pt.wikipedia.org/wiki/PHP-GTK

  • 4

    Of curiosity, here is an article that gives an overview of PHP: http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

Show 2 more comments

3 answers

11

This should be one more comment, but it would be too long. And deep down it answers the question, which is probably opinionated (I don’t know if it should be open). But at least I answered about the use of GTK in PHP, which is what asks the question, and I tried to be fair and support the answer as it does, but I admit you have a little opinion

GTK

GTK is a set of access controls native to the window manager of some operating systems. It was originally made for Linux and ported to other Oses with greater or lesser degree of success. It is not a browser.

To say about advantages and disadvantages would have to compare with something else. I understand the request is about PHP-GTK and not pure GTK with other kits.

GTK (pure) is not one of the best control kits and window managers. It does not work well on Windows, especially in the version supported by PHP-GTK. But it can be used well, at least on Linux.

PHP-GTK

PHP-GTK comparing to PHP-Qt, wxPHP or other kits I don’t know, I don’t know users of these kits. Certainly they suffer from the same problems of PHP-GTK, including the lack of a community supporting them. One seems abandoned and the other almost.

Comparing with other language technology

If the comparison is with the use of the desktop in other languages, the comparison would be unfair. The only advantage I see in it is that the person who already knows PHP well stays in it. But that alone can be seen as a disadvantage as well, including for that person. Using the wrong tool in this case can be much more tragic than learning another language. Of course, if she doesn’t have the ability to learn another language, then whatever, anything will be bad. The list of disadvantages is huge and I quote some of them throughout the text, the most specific problems I can’t remember, it’s been a long time since I did this.

Web X desktop

The web and desktop programming templates are completely different. The adaptation is not easy. Learning a new language is easier than learning another way to program. And if one tries to program desktop as if it were web it will be tragic. The best part will be that it doesn’t work. Interestingly PHP even has some useful things for desktop that nobody uses for web. Then he will have to use things he has never heard of. PHP-GTK was not developed using the most modern features of PHP, which ironically would help a more desktop application. It’s show of horrors of wrong things with this.

The PHP execution environment was made to run scripts and has no facility that helps run an application desktop. On the contrary, it creates difficulties for this type of application, even in the php-win, whose name fools well.

My experience

I have experience with this to make a puzzle. It was the worst decision I took in computing.

I used the same PHP-GTK version available today. The fact that there is no evolution after so long already shows how is a technology that nobody wants to invest.

PHP does not help

PHP is not a quality language and there are several fonts showing it. It is usable and can do quite interesting things with it. It’s not that she’s tragic, not recommendable, none of that. But you can’t compare it to other languages mainstream.

It is opinion, of course, I do not deny this, but it is based on extensive experience of actual use (and I’m passionate about languages in general, I devote a lot of my free time studying the workings of languages, I’m not a layman on the subject giving any opinion, even though I’m not a "doctor" on the subject) and many fairly detailed reports about it, among them, the linked in a comment by Bacco.

Inconsistencies in the question

As far as I know, PHP is not the language used to develop most of the web. If this is true, you need to present the data. I’ve seen some who show otherwise, but as they are not the most reliable nor will post. Mainly it is not the choice when the decision was made professionally. Even the best-known sites that started with PHP was like this because the founder didn’t know how to use anything else. And today they move to other things.

The problem with who evaluates anything is that whenever the person does not have enough information to do this, she is unable to assess her own condition and enters a vicious circle.

This phenomenon is known as golden hammer. People don’t deal well with information they dislike and she doesn’t usually notice this. PHP is not a panacea.

Popularity

The criterion that something that is widely used has quality leads to the conclusion that crack (is, phallus of stone) has quality, after all has many more users than PHP.

Most PHP users opted for this language because others opted for it (at the time it had nothing better web-based). It is a herd phenomenon and not a conscious decision phenomenon with well-defined scientific criteria. And it is very common that the choice has been made because it is what one has been able to learn (learning PHP is very easy, use not so much, but the first barrier is always what one clings to, does not look at what comes next, which is another reason for the decision to be wrong). Even absurdly there are higher education courses that use this language as a basic programming instrument, which makes me question the quality of the course. Obviously the student of this course will also be the one who will only know how to do what was taught in this bad course and will not create his own life, which should be the main goal of a higher course.

But if you’re going to use this as a definition criterion, then don’t use PHP-GTK, essentially nobody uses it and it’s a mostly abandoned and rather poorly planned project. There is no community support.

All the applications I have seen, even presented by the creators of this module, have always been very poorly made. Yes, if the programmer is good you can do something well in PHP, but for some reason nobody could demonstrate this with PHP-GTK. Always the person who takes it thinks he’s gonna do it better than the others. Maybe this is explained by "the people who chose to do something desktop with PHP are the worst programmers of this language", I don’t know. Even if it isn’t, most crack users are smart people who thought it would be good for them.

Even the most fanatical PHP users reject its use for desktop leaving it relegated to a few dripping cats who think they know more than others more experienced than them.

Mobile

PHP for mobile is almost a joke.

Support for what I say

The accepted answer basically says the same thing I said here. At the beginning the answer talks about some points about the comments and what I wrote. This part is very confusing, mixes things up, makes uncountable comparisons, has no basis, has contradictions and even runs away from common sense, shown until lack of understanding of some spoken subjects.

The part that talks about PHP-GTK is good and puts some points that I had not put. I highlight:

(PHP it is a scripting language, so everything else is done by curious

This is a great truth. Too bad a lot of people think that’s not it. And software with GUI are usually not scripts.

I started the move to start php-gtk3

That’s right, they stopped in PHP-GTK 2, which in passing is not so stable and the community itself admits it.

In my experience PHP-GTK is a hobby. I wouldn’t do anything professional like PHP-GTK.

I don’t question the use by hobby, i responded for professional use. No can, no one uses. The author of that answer who seems to like does not use and does not show someone who uses with success in quality professional applications.

It is very stable and there is a lot of documentation about PHP and GTK

My experience was different. See the PHP-GTK website and decide for you whether it is a technology that has community, attention, etc.

It is quick to make fronts that help in everyday life... is fast development, fast learning

This is characteristic of GTK and generally all Guis.

It’s stable, it’s not crashing out of nowhere

It’s not my experience, on the contrary.

Is really cross-platform

There are controversies, even among the most staunch advocates of the GTK.

Very receptive community

I have no doubt, there’s hardly anyone to cause trouble.

Outdated

Yes, very.

The themes for windows are horrible

It is difficult to use, it is not intuitive for this user, there are limitations and even things that do not work properly. The same occurs in Macos. And to a small degree if Linux uses KDE or another desktop manager.

It is slow as it is a bind of a lib running in a script

Exact.

A lot of people with no property speak very badly

Many with full ownership speak very badly. Including all who have tried and given up on technology. Not many people speak well. The author himself who tried to speak well only managed to say that it is not a suitable technology.

In October 2018 I spoke with Rasmus Lerdorf on Intercon and he said that PHP is a language for web backend, nothing else, there is no intention to support other scenarios.

Antonio Maniero e Rasmus Lerdorf no Intercon 2018

Completion

Clearly its use is not recommended with PHP. With C and other languages (C++, JS, Perl, Python, Lua, maybe Java, among the best known), in Linux you can use well. But everyone can do what they want.

If you want to use GTK, use it, but with another language. PHP is good for web.

  • 1

    Of course it does not come out over consolidated languages, but it has.Therefore, it does not become very different for desktop development, but most users are used to structured php. A statistical website: https://w3techs.com/technologies/history_overview/programming_language/ms/y

  • Any links to such flaws? I understand about gtk, I will delve into the searches.

  • 1

    This statistic is completely absurd. That’s why it has no methodology. The problems are described individually, there is nothing that consolidates in one place.

6


Sorry to intrude after several months on the subject, but to say that PHP is poorly done, shows how much you were poorly answered.

Compare languages like java and C# that were born after a long time, already focusing on what you do is not valid. Or compare PHP with C, nothing compares to C.

I call myself a programmer, so I use mono (C# for windows), Python GTK for linux and php for web, but I have many projects in many other languages like java, so I’m not only defending PHP ok?

When you hear that the language is poorly made, take into account that php 4 to 5 they took a very big tumble, and so all versions started to come out with compatibility. 10% of programmers know the difference between PHP 5.3 and 5.3.3 for example, they use the date() function thinking the language sucks, for example.

The other one compared it to crack, which only use PHP because others use it, even though it is a language that has more than 1 commit every 2 hours. If you think like this, you can only develop for windows web, why to me taking PHP the only thing that sucks is C#, dai programmers linux are out of this, why monodevelop not even compare to visual studio.

So one tip I can give you is to not listen to people who say that one thing is better than another, or you like it more than that, never listen to people like that.

If you take these points into account, every language has its problems, such as sharing javascript types, or using comments as part of programming, in java.

I can assure you that PHP is quite a language, it has improved more and more, and from PHP 6 the language has been modeled to achieve large languages with support from many large companies.

About the question in particular, I try to keep PHP-GTK in the community for a long time, I have many projects written for it, including I started the movement to start the php-gtk3. As you said, PHP is a strong language, with a very large learning curve, but it is a scripted language, so everything else is done by curious, if I may say so.

From my own experience PHP-GTK is a hobby, a curiosity that I kill to know how far I can go, since to develop an extension for example, I work with at least 3 languages, but it follows some of my points of view

1 - Wouldn’t do anything professional like PHP-GTK 2 - It is very stable and there is a lot of documentation about PHP and GTK 3 - It is quick to make fronts that help in everyday life

Perks - As already mentioned, it is fast development, fast learning - It is stable, not crashing out of nowhere - It is really cross-platform - Very receptive community

Disadvantages - Out of date - Themes for windows are horrible - It’s slow, because it’s a bind of a lib running on a script (although it doesn’t make any difference on current machines) - and A lot of people without property do not speak very badly

Again, I’m sorry for the belated reply, but it’s just that I fell into the question after a search I did, and I thought I could add something since nothing added much to your question itself

  • 3

    Where in the question is said that php is poorly done or compares with. C# and Java? Li 2x and found none of this.

  • 2

    I think he refers to the comments... @diegofm. But it’s normal, in Brazil people are still at this level of always wanting to talk bad about PHP. Then it becomes modinha to speak badly to look cool or expert. Well put because GTK for PHP, 12 years ago was very precarious and many who speak barely lived this time, including me and I agree if we talk about that time. But time has passed and the tool has improved. Today it is something very stable and acceptable. But as some still live on outdated references, continue spreading erroneously.

  • @diegofm, it was really spoken that php is a badly done language in the 2 comments there were. That’s why I felt obliged to answer the question, but I couldn’t help but mention why php is not a bad language. If it was you who denied it, please review it. Thank you

  • @Brunopitteligonçalves not negative, if I were negative, I would have to do with the 2 answers, both have personal manifestations influencing the content of the answer. I chose not to take the credit.

  • Finally some answer that really was a response, because here in the community ends up having a more favored group for having high score, leaving what they say as right even all knowing that is not right. Just look at the other response with positive evaluations and this one that is really useful for the question being negative, probably because I disagree with this group, it has often occurred to me that, for not having so much experience end up thinking that they can indoctrinate.

  • Now about the answer, it will help me to resume the searches, because it had stopped, because of these terrible manifestations about Gtk etc, not about PHP, because I know he is hated by many, but in my conception is a unique language, allows you to do much more than others with much less work.. I will try to resume research on the subject.

  • 1

    Nice that you liked @lvcs. If you can help, the group from the site php-gtk.com.br and Bruno.pitteli.com.br, I’m always around to lend a hand!

  • 5

    I speak what is right in my experience. I know that answer is not good. She doesn’t talk to things, mixes things, plays a lot of opinion without basis. She has some useful information, but just says what the AP wanted to hear. It was given references that PHP has problems. This answer gave none that PHP is well done. The answer complains of personal manifestations, but that answer only does that. Each one can find what he wants, each one can accept what he wants, each one can ignore the common sense and insist on something. I will do what I should have done from the beginning.

  • 6

    @Brunopitteligonçalves as you said yourself, "I found myself obliged to answer the question, but I couldn’t help but mention why php is not a bad language." I think it’s nice of you to make that clear (and it’s really something I noticed when reading). If you would like to know some of the technical points for which I have absolute peace of mind in saying that it is poorly done, this article can help: https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/ - even if the article has become outdated, I’m sure well over half of the problems mentioned are still true.

  • 6

    Also, just so you know about me: I’ve been using PHP since the early versions, when I left classic Asp around 2001, and adopted it as the base language for web applications ever since. I even studied the Internals a lot, because I considered extending PHP in C the same way I do with other languages, but I realized that for more complex things, it didn’t pay. I do not have the slightest pretension that this changes your opinion, I just wanted to mention to you that it is not a mere curious opining, but someone who had the concern to know the tool you use.

  • 4

    That being said, every contrary position is welcome, but it is the suggestion to contextualize then, so that the contraposition of ideas is more productive. Just keep in mind that for me, this is not a fan of other language criticizing. I use PHP where PHP works for what I need, and other languages where PHP doesn’t fit well. And I understand that this is the normal of any programmer who cares about using the most suitable tool for each case.

  • 5

    @The curious thing is that there is a paragraph saying that you can’t use PHP-GTK for anything professional. That part the AP ignored. The answer also clearly states that PHP is a language of script. What AP and some users insist on saying it is not. It is difficult to need GUI in scripts. In an ERP, I understand that GUI is important. But a language of script is not suitable for this. Of course, you can do it, but it is the wrong tool. The author of the answer seems to understand this well. I agree with several points in the reply, her biggest problem is opinions without any basis, the rest is good.

  • 5

    @mustache actually I think the answer has several pretty cool points. Nor would I have commented anything if it were not the developments in the comments, inclusive, but as the author of the question was put a situation of "high score and favored groups" and a talk of "indoctrinating", and in the reply there is a statement about being poorly answered when someone says that PHP is poorly done, I thought it best to make a few points clear. It really got a lot of opinionated stuff in the middle, which is getting in the way of the answer a little bit. Perhaps the opinionated part would have been better just as a comment.

  • 4

    The answer has sinned in some things, such as trying to refute what I said and not saying things with thing, saying that every language has problems, and getting something meaningless and that does not pick up anything troublesome even, the answer speaks not to hear who says that one thing is better than another, exactly what the answer is doing strongly at various points, in a careful analysis it is very opinionated (there is no basis for almost anything) and speaks of much that has not been asked, speaks of things that were not spoken in others posts, speaks of PHP 6, does not fit all in comment. But it is fair with PHP-GTK.

  • @Bigown and Bacco, again you see only talking about the language. At no time, who asked, did you ask what you thought of the PHP language. About what you THINK, you are clinging to a language 5 years ago (the article you sent is from 2012). At that time almost no PHP programmer knew what a framework was. Want to compare PHP with C#? Try comparing PHP+Zend to C#, at least, as it only became known after having the . NET behind it. So, I know that everyone has their experiences, and if we’re going to talk about experiences, I also have mine

  • 4

    @Brunopitteligonçalves now you have decided to speculate about things you don’t have the slightest chance of knowing if it’s true, what it isn’t. At least it’s clear that your criteria are too subjective and speculative. Just as he had speculated about technical things, he now speculates about what we do. Essentially nothing has changed in the article. The language has not been completely changed, which would be a complete non-sense. Just imagining that this could have happened already indicates a lack of criterion. It’s no longer worth saying anything after that.Thanks for confirming what I said about PHP-GTK.

Show 11 more comments

2

GTK is a Toolkit for creating graphical interfaces with "bindings" for various languages, not just PHP. It is not a modified browser or a server but a library of graphical components that interact directly with the micro’s graphical interface.

I have never used with PHP (the GUI applications I maintain are made with GTK in C) so I can’t give much opinion about it but, at first, I can tell you that the code generated for GTK does not serve for a web interface since they are radically different concepts.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.