I’m planning to create an Real time voting system but I so confused on what materials I use…
Real time applications rely heavily on Javascript
or cache
. So I would recommend learning Javascript
first.
I try to start learning NodeJS on a past week but I decided to back again in PHP cause some professional developers say that “you need to focus on one scripting or programming language then when you mastered that language switch to other languages” also by learning NodeJS I try to put my all learnings on a simple blog site… I’m just wondering if there’s a way to create an Real time application using PHP. and some libraries. anyways thanks for answering my question
What exactly do you mean by “real time”?
Any kind of on-page interaction will rely on client-side coding like javascript.
PHP requires a page refresh to apply any change or reaction from the user.
So for example in the case of a voting system with php, you may have an html form with a selection of radio buttons to choose your vote.
But to submit it you will need a submit button which loads a page that processes and records the vote and may display results if you want.
What I want is do not refresh the page whenever a user tries to submit a form.
Then you need client-side scripting.
You would need Javascript
for that. Real time usually requires a push-pull kind of a thing. This means to wait for a request from the user and sends data when the user is done typing.
That’s an ideal situation that doesn’t take into account a need to actually get the job done. In that world, developers often find that they can get it done by learning enough of each appropriate language. I haven’t “mastered” either JS or PHP, but could probably cobble together enough to get the job done.
Just to be clear, this will require both server-side and client-side scripting, so php may still play a part, but you won’t do it with php alone.
I would say that it would be Javascript
heavy because real time requires a huge load on a language that doesn’t refresh and does wait time. The only one possible to do this is Javascript
, but PHP
could be your data processor which would accommodate for sending messages back and forth.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.