+ Reply to Thread
Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By essellar

Thread: Ajax vs. jQuery + PHP Experience

  1. #1
    thomys.eventos13 is offline x10Hosting Member thomys.eventos13 is an unknown quantity at this point
    Join Date
    Feb 2011
    Posts
    4

    Question Ajax vs. jQuery + PHP Experience

    Hi there,

    I've been looking about Ajax and jQuery, and many people says like Ajax is too limited while jQuery releases a new plugin each week… Perhaps Ajax may look professional but jQuery is really extended. Also with PHP a really easy and useful language the fan of possibilites gets even wider…

    So… have you experienced the creation of high quality pages, with astonishing design and extremely cool programming that you can tell me here?

    I'm not new but nor I'm very expert with this, and I'd like to learn how to take these languages to the maximum expression.

    I thank your help in advantage.

    Regards.

  2. #2
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: Ajax vs. jQuery + PHP Experience

    jQuery, mootools, Dojo, etc are Javascript frameworks that all include AJAX capabilities. There is no "AJAX" framework or programming language. It is just a bunch of techniques.
    Nothing is always absolutely so.

  3. #3
    essellar's Avatar
    essellar is offline Community Advocate essellar has a spectacular aura about
    Join Date
    Feb 2010
    Location
    Toronto, Ontario, CA
    Posts
    1,153

    Re: Ajax vs. jQuery + PHP Experience

    descalzo's answer is right, but (given your question) it may be at too high a level for you to make use of it.

    Ajax is the magic that lets your web page send information to and get information from the server without reloading the page. The name stands for "Asynchronous JavaScript And XML", but it's really a misnomer -- the communication is usually asynchronous*, but it doesn't have to be (there are times when a synchronous† call makes more sense) and XML isn't used very much anymore. "Ajax" was a name given in 2005 by Jesse James Garret to a technology that already existed; Microsoft had been using it since IE5 using an ActiveX object and simply called it "Dynamic HTML", Mozilla had introduced a "pure JavaScript" version in its browsers by then, and Google really kicked the party off by using the new technology in Gmail. The name "Dynamic HTML" wasn't going to fly – we were already using that name for anything that used JavaScript to change the web page – so we quickly adopted the term "Ajax" even though the "X" part of it was often a bit of an exaggeration.

    "Ajax" is anything that uses the XMLHttpRequest object to make a request from the server. That lets you load and reload parts of the web page without having to reload the whole page. It is only limited in the following ways:
    1) the browser needs to support the XMLHttpRequest object, either as a native JavaScript object or as an ActiveX control (IE 5 to 6);
    2) JavaScript must be enabled in the browser; and[/li]
    3) the browser has to make requests from the server – the server can't send anything to the browser except in response to a request.

    The server part of the equation doesn't really matter, as long as it can respond to user requests. Usually, you want to send different information to different users at different times, so you'll want a way to generate dynamic content. PHP can do that, but so can ASP/ASPX, JSP, JSF, "pure" Java, Python/Django, Perl, Ruby/RoR, ColdFusion, NodeJS, Apache CouchDB, Lotus Domino,... You get the idea. PHP has the widest hosting support, and it's the only dynamic option you have here on a Free Hosting plan, so it's the one you'll probably want to use.

    The remaining problems with "straight" Ajax (and "straight" JavaScript) are that no two browsers ever do things in quite the same way, and that you have to reinvent the wheel, so to speak, in order to do what other people are doing on their pages. That's where libraries and frameworks come in. Of the ones that descalzo listed, there are really only two that have any serious currency: Dojo and jQuery. (I liked MooTools, but it has sort of fallen by the wayside.) Dojo is massive, and is oriented towards serious business applications. It is great for building web business applications that look and act a lot like desktop business applications, and it is integrated into several business-oriented platforms (particularly those from IBM/Lotus). But Dojo will never take off its tie, grab a beer or spark a spliff and relax and play -- it's all business, all of the time.

    jQuery has become something of a standard over the past couple of years. That's mostly because it's hosted on Google's CDN, so even though it's a fairly big chunk of JavaScript, even in the minified form, it is probably something your users will already have in their browser cache so you won't be forcing a large download. What jQuery does, mostly, is to insulate you from all of the little differences between browsers. You tell jQuery what you want to do, and let jQuery worry about how IE, Chrome, Safari, Firefox, Opera, Konqueror or whatever actually does it. Without something like jQuery, you need to worry about all of those differences, like "what does XMLHttpRequest mean in this browser", "does this browser support getting elements by class name" and so on.

    jQuery also has some common "special effects" built into the main library, so you don't need to re-invent the wheel. The plugins mostly add to the repertoire of effects, though some are designed to make field widgets (like calendar controls and so forth) available. You don't need to use any jQuery plugin you don't need to use, and you can continue to use whatever version of jQuery your code was written for – you aren't jumping on a continuous-upgrade treadmill.

    So it's not a choice between Ajax and jQuery+PHP, really. Any Ajax you use is probably going to mean using PHP on the server to generate the content, and unless what you are doing is very simple and straightforward, you're going to save a lot of time and potential bugs if you use a library like jQuery to handle browser differences and deficiencies.

    ___________
    * asynchronous: You make a request from the server, and tell the browser what to do with the response. In the meantime, the user can continue interacting with the page, and you can make additional background requests.

    synchronous: You make a request from the server, and the browser waits for a response. Nothing else can happen until the response is received. Use synchronous requests only when the response is critical to the rest of the application.
    Last edited by essellar; 11-28-2011 at 02:39 PM. Reason: It seems the BBCode for lists isn't supported here
    misson likes this.
    “Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
    "It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)

+ Reply to Thread

Similar Threads

  1. Anyone got any experience of Zen Cart
    By africancrafts in forum Scripts & 3rd Party Apps
    Replies: 2
    Last Post: 06-12-2010, 11:41 AM
  2. Bad Experience
    By tcjian in forum Free Hosting
    Replies: 2
    Last Post: 04-25-2010, 12:42 PM
  3. Basic AJAX with jQuery
    By Jake in forum Tutorials
    Replies: 0
    Last Post: 04-20-2010, 04:36 AM
  4. my bad experience
    By bluerose in forum Computers & Technology
    Replies: 1
    Last Post: 09-21-2009, 09:39 AM
  5. PTC experience..
    By jaco_don in forum Earning Money
    Replies: 1
    Last Post: 07-17-2008, 04:39 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers