Is PHP client side feasible?

Asked

Viewed 762 times

1

I develop in PHP and, I would love to do everything only in PHP on dynamic programming issues, but, I know that to do everything I need facing "web" impossible would be without a language client side.

My goal with dynamic programming language is only aimed at systems web based, so PHP always becomes the main language of my projects with approximately 80% of the scope.

Is there anything that can make PHP a language client side, some library or something? If not, there is some possibility of this happening or a server-side language always server-side?

Note: This doubt is regarding the innovations I did not expect in the HTML language, for example, I understand that HTML is a static language, but, HTML5 today makes dynamic checks (client side) in inputs. CSS a static language for styles, today CSS3 uses dynamic conditions (client side) for a particular class to be loaded.

If I’ve been wrong please correct me.

  • 1

    Use javascript for client and server side :D. Html5 is pure js.

  • 1

    Vixi js taking over the world, I’m even curled up... xD

  • 1
  • @rray do not master javascript, without getting away from the subject, I know that PHP does not do everything javascript does. Roughly speaking, javascritpt caters to everything PHP does?

  • If you fool, you’ll do even more.

  • You’re not confusing client with server ? Javascript is a helper for html, which makes the requests for PHP when necessary, trying to compare the two in this way is wrong in my view. Tell me a situation where you only use Javascript to execute a query in the database.

  • @Felippetadeu, nodejs is javascript.

  • 1

    @Thyagothysoft You can accept an answer if it solved your problem. You can vote on all the posts on the site as well. Did any help you more? Something needs to be improved?

  • @Felippetadeu has a look at these two links: http://mean.io http://docs.sequelizejs.com/en/latest/ only you cannot cry.

  • 1

    If I’m not mistaken it was discontinued... but it has the php-gtk project, to create desktop applications using php. If you want to take a look.

  • You will only use a single language in programming exercises.

Show 6 more comments

1 answer

8

If you are going to program for the web you cannot escape from JS. You can escape from all programming languages, except JS This is not true anymore, we can already use several other languages in browser. The most you’d give to avoid is just using HTML5. It would limit some actions and I doubt it would treat benefits. Learn what you have to learn to do the best you can for users. Don’t get attached to tools.

Use the right tool for each application. There is no universal tool.

Ah, neither PHP nor other languages can be used in browsers. You could make a converter, but the result would be so bad, you’d have to adapt so much, it’s not worth the effort.

Some people use PHP as a client but not the web. The results aren’t wonderful either.

  • I agree with you, but in parts rs. Perhaps you have not mentioned that the web developments we are dealing with are only "web-based systems," i.e., I believe that it would become unviable for most of the functions being performed on the client side, since it cannotif comparing the processing performance of the client machine and server machine. For developments type, site and related all right, now web systems with all logic and algorithms, I believe that necessarily in this case, PHP needs to prevail, also for source security.

  • 1

    First, if you don’t provide adequate information, don’t expect adequate answers. But I don’t think it makes any difference in this case. And now you are assuming things that may not be true. I see no relation to the machine being client or server and its performance. So little does this have to do with the question. It seems to me that you are just venting what your desire would be. It is not a question of agreeing or not, I answered what is reality. Anything outside of this does not fit on this site.

  • 2

    Yes, the information was not adequate anyway and for this reason I edited the question by adding an addendum. I don’t quite understand what you meant but I think the place to make a mistake is right here, where we can have help, signals, and edits of questions, answers and comments to fit in and get experiences to

  • bigown, considering the question I put an addendum, maybe I could be wrong, so I said "I believe it would become", just believe, if I’m wrong and can give me this help. Javascript functions do not arrive on the server, right? (do not know well js) I know that PHP runs on the server side and ready delivery to the client’s browser, js would not be processing the functions/scripts in the client’s browser and consequently would be using the client’s hardware?

  • There are developers who mix PHP with HTML in a file. Starting from this principle, it is always recommended to create two separate files, one HTML and the other PHP, and Javascript or HTML trigger requests for PHP? It would not be advisable or is a bad default to mix PHP or HTML in a file only?

  • 1

    @Giancarloabelgiulian will taste, I prefer separate as far as possible.

Show 1 more comment

Browser other questions tagged

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