1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Is using php+js categorized as Ajax?

Discussion in 'Programming' started by Jangga, Jul 30, 2017.

  1. Jangga

    Jangga Junior Member

    Joined:
    Aug 8, 2016
    Messages:
    149
    Likes Received:
    5
    Gender:
    Male
    Occupation:
    Freelancer: A reWriter
    Location:
    Africa
    please, i want to build a dynamic website. i intend to use php and js ....but, people online always refering to ajax. Cant i build with only php+js+css ? I believe js is enough for client side stuff
     
  2. Diplomat

    Diplomat Jr. VIP Jr. VIP

    Joined:
    Oct 25, 2011
    Messages:
    1,004
    Likes Received:
    499
    Home Page:
    AJAX means asynchronous javascript and XML. That means you are using javascript to update your page without reloading it.
    Yes, you can use javascript and CSS for front-end stuff and PHP for backend. That's how it has been done for a very long time.
     
    • Thanks Thanks x 1
  3. Jangga

    Jangga Junior Member

    Joined:
    Aug 8, 2016
    Messages:
    149
    Likes Received:
    5
    Gender:
    Male
    Occupation:
    Freelancer: A reWriter
    Location:
    Africa
    Are u saying I should simply use php+js without Ajax? Can I update page without reloading using javascript & css?
     
  4. Sergey Yermak

    Sergey Yermak Newbie

    Joined:
    Mar 12, 2016
    Messages:
    31
    Likes Received:
    3
    Gender:
    Male
    Occupation:
    Node.js
    When you updating a page without reloading it is usually called "ajax".
    It is just functionality that JS provides to send request to your php scripts. It is easy to implement, you should definitely look into this.
     
  5. npm

    npm Registered Member

    Joined:
    Jun 1, 2017
    Messages:
    54
    Likes Received:
    23
    Gender:
    Male
    A simple youtube search will provide you enough information to understand and start using AJAX (Search for "what is AJAX"). Using plain JS to perform requests is rather complicated for beginners, that's why I recommend you to use jQuery since you're probably familiar with it. jQuery has great documentation and easy to understand examples (api.jquery.com/jquery.ajax/). Another great library is Axios (github.com/mzabriskie/axios) very well documented and easy to use.
     
  6. mlori

    mlori Newbie

    Joined:
    Jul 31, 2017
    Messages:
    12
    Likes Received:
    2
    Gender:
    Male
    I would say use jQuery, it's a javascript library that makes your life easier with ajax queries (sending/receiving info to the server);
    There are plenty of tutorials about jQuery out there
     
  7. rafark

    rafark Regular Member

    Joined:
    Jan 15, 2013
    Messages:
    439
    Likes Received:
    221
    Gender:
    Male
    Occupation:
    Moderador
    Location:
    Noble and Heroic MC
    AJAX is the JavaScript client for making HTTP requests. Nothing more and nothing less.

    If you want to have a better understanding I recommend you read about the HTTP protocol and the request-response paradigm.
     
  8. slighty

    slighty Registered Member

    Joined:
    Jul 31, 2017
    Messages:
    83
    Likes Received:
    20
    Using jQuery standalone for requests is a waste of resources and a decrease of performance.
    I suggest you using axios to perform AJAX requests. If you're using NPM just type npm install axios and import to your project. You can find various tutorials on youtube on how to use it.