Results 1 to 8 of 8

Thread: Where do I go with ajax?

  1. #1
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default Where do I go with ajax?

    I just finished the ajax tutorial on w3schools website, and I got ajax to play with a php script-- I'm very happy . But now what do I do to learn more? What good tutorials are out there? I am interested in AJAX and PHP, not really AJAX and ASP or any of that.
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    AJAX is rarely necessary. Most data can be more efficiently and conveniently described by JSON.

    The server-side language you're using doesn't matter (unless it's Ruby on Rails or you're using some library/framework that attempts to abstract away the client/server divide, in which case you need to find a new library/framework).

    Beware W3Schools' tutorials, they're... er... less than exemplary.

    There's not really much more to learn. It's all pretty simple stuff.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    Quote Originally Posted by Twey View Post
    AJAX is rarely necessary.
    Right, but it does come in handy. Some features, like chat rooms, can be done using it. Maybe not well, but done none the less.

    Beware W3Schools' tutorials, they're... er... less than exemplary.
    True, but it helped.

    I think I am getting the hang of AJAX now anyway. Thanks.
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Some features, like chat rooms, can be done using it. Maybe not well, but done none the less.
    It's much easier (and more efficient) to use JSON than XML for this purpose and many others. Situations where I'd actually choose to use XML are few and far between.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    Quote Originally Posted by Twey View Post
    It's much easier (and more efficient) to use JSON than XML for this purpose and many others. Situations where I'd actually choose to use XML are few and far between.
    Wait, what are we talking about now? I need AJAX to communicate with the server, which does not always require XML. JSON looks more complicated at any rate, and I don't know if it can do that.
    Last edited by Jas; 02-21-2008 at 09:17 PM.
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I need AJAX to communicate with the server, which does not always require XML.
    AJAX = Asynchronous Javascript And XML. While asynchronicity is usually a good thing (since a synchronous request will block the UI), XML is usually overkill. JSON is more efficient as a data format (it can encode more data for less characters), and also simpler to manipulate (since an eval() on the string data will return a normal ECMAScript object that can be worked with like any other object, with no special functions required as for XML).
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Jan 2007
    Posts
    51
    Thanks
    2
    Thanked 3 Times in 3 Posts

    Default

    To clairify the conversation:

    AJAX - allows you to make requests to the server without reloading the page.

    JSON - a way to serialize data to be sent to the server or from the server on the AJAX request.

    XML - Same thing, but not serialzed. Structured data instead.

    Ajax Libraries - Allow you to get work done with out going mad over browser differences. Take a look at Prototype, jQuery or Dojo. They really really help!

    To move forward I'd recommend that you do an amazon search for Ajax books.
    I bought:
    Prototype and Scriptaculous - Pragmatic Programmers
    Prototype and Scriptaculous - Manning
    Ajax in Practice - Manning
    Ajax in Action - Manning
    Pragmatic Ajax - Pragmatic Bookshelf

    They are all very good and wide in breadth, the 3rd and 4th will go over alot of libraries and examples, as well as cover a lot of js stuff you need to know.

    Now as for Ajax applications, I build intranets and extranets and use pretty much all Ajax (prototype/dojo) recently. Though I'll do hybrid of ajax widgets in a page sometimes, and other times full blown ajax applications. I make the choice based on where the user will be pulling the application from. We've got a lot of people out in remote locations so Ajax works great for those on slow connections. However, I am a bit spoiled by the fact that I have a captive audience and their environment is controlled.

    Hope that helped a bit.

    The main thing is.. keep at it... it will slowly make scense.
    Do little 'example tests', keep them simple and just learn the concept, don't clutter up your tests with a alot of features.
    Also, read about it everyday.... that's key..

    BN

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    AJAX - allows you to make requests to the server without reloading the page.
    In a very specific manner (asynchronously via XML).
    JSON - a way to serialize data to be sent to the server or from the server on the AJAX request.

    XML - Same thing, but not serialzed. Structured data instead.
    Both are structured.
    Ajax Libraries - Allow you to get work done with out going mad over browser differences. Take a look at Prototype, jQuery or Dojo. They really really help!
    They do, but I would never recommend Prototype to anyone. Dōjō is good (I think), but very large, and very much overkill if you're only intending to do XHR with it. Try something simple and specialised, like Woosta's JIF.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •