PHP as compared to jQuery

When completing this week’s assignment, I have to say I was constantly waiting for the tough PHP lessons to role around and, to my pleasant surprise, all four Codecademy sessions were pretty straightforward and easy to complete. Similar to something I mentioned in some of my JavaScript/jQuery lessons, the concepts and logic behind PHP coding made sense to me. If you have the term “array” and then list several objects, items, numbers, etc. that list makes up the array – logical. Similarly, an “if” “else” statement is pretty direct. Depending on the first variable, the computer should execute the code behind “if,” otherwise do “else”. What I liked even more about PHP as compared to JavaScript/jQuery is that the actual execution of the code is also relatively simple (thus far). I think the loop content was especially easy to execute as compared to jQuery coding. It has clear variables linked to clear actions (e.g. the first in line is the starting point, second in line is the end point, and third in line is how much you should add or subtract each time to move from start to end).

I think the one piece of PHP I hope to gain a better understanding of is how, exactly, it differs from jQuery and in what instances we should use one as opposed to the other. I understand that PHP is meant for the server, whereas jQuery works with the web browser, but I am still unsure when we should use each in our coding. Is one preferable for a larger piece of code? Is it a matter of the coder’s preference to use once versus another? What are the pros and cons to each if they, ultimately, achieve the same task just in different languages? I think this will become clearer as the class goes on, but at the moment that is my biggest outstanding question as relates to PHP.

I am also pretty excited to start work on our final assignment! Originally I wasn’t sure what type of website I would want to build, which made the task feel daunting and uninspiring as building a website just for the sake of it seems like a lot of work. Once I thought of a recipe blog, however, I realized that is something I would enjoy updating, maintaining, and potentially sharing with others one day, which makes the project much more fun.

1 thought on “PHP as compared to jQuery

  1. Greg Linch

    “I think the one piece of PHP I hope to gain a better understanding of is how, exactly, it differs from jQuery and in what instances we should use one as opposed to the other. I understand that PHP is meant for the server, whereas jQuery works with the web browser, but I am still unsure when we should use each in our coding. Is one preferable for a larger piece of code? Is it a matter of the coder’s preference to use once versus another? What are the pros and cons to each if they, ultimately, achieve the same task just in different languages?”

    We’ll definitely discuss this more in class. I’d recommend doing some reading to see how many of these questions you can answer before class.

    Reply

Leave a Reply to Greg Linch Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.