SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2006
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    AJAX Engine? (Simple and queue system)

    Well, I have officially given up trying to write my own AJAX engine, and have decided to give an already created solution a try. However, its incredibly hard to find an AJAX engine that:
    • Doesn't have some incredibly useless PHP tie in. I only need something that possibly compresses or formats the string, called by JS side. (In the form of functions, not needless libraries of php files)
    • Isn't bloated (See above)
    • Has a queue system (Incredibly useful when you could, theoretically, be calling several requests at once and need them to be processed in order.)
    • SMALL strings... XML can increase the size of the 'packet' 3x, 4x, or sometimes even 5x or MORE times.



    So am I dreaming? Does such a system really exist, or do I have to keep pulling my hair out, and try my best to write an AJAX engine that does all of this (I've tried before, and could never get a queue system working right)

  2. #2
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You want an Ajax script that doesn't use server-side code? That's not Ajax, that's just JavaScript.

    Your third point about queuing also contradicts the 'Asynchronous' part of Ajax; it sounds as if you want a synchronous mechanism instead.

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2006
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Buddy Bradley
    You want an Ajax script that doesn't use server-side code? That's not Ajax, that's just JavaScript.

    Your third point about queuing also contradicts the 'Asynchronous' part of Ajax; it sounds as if you want a synchronous mechanism instead.
    Thanks for the quick reply...

    Read what I said again, I don't want the script to include any complex logic for one use scripts (As examples. Most "AJAX Kits" include some type of calculator, a chat, etc. - all are completely useless to me). I want to write the logic myself, and having any sort of complex library is useless to me, as I won't use more then 95% of it.

    And no, its not contradicting, I merely want a system that, rather then losing requests if multiple ones are made at once (A bad programming practice, yes, but its bound to happen eventually), it processes them in order. Sort of a 'catch your screwup'. Pure synchronous behavior is just an overall bad thing for what I need to use it for.

  4. #4
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've never come across an "Ajax kit" that's bundled with a load of PHP scripts, but there you go.

    To simulate queuing, could you use the onReadyStateChange to fire the next request? That way they could be queued (maybe in an array) and each one only gets sent when the last one has finished.

  5. #5
    SitePoint Enthusiast
    Join Date
    Apr 2006
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Buddy Bradley
    I've never come across an "Ajax kit" that's bundled with a load of PHP scripts, but there you go.

    To simulate queuing, could you use the onReadyStateChange to fire the next request? That way they could be queued (maybe in an array) and each one only gets sent when the last one has finished.
    My initial system had worked like this, however it has numerous problems. Mainly, how do you call it? How do you keep it active if you need to keep calling requests? Preventing memory leaks is also a big problem with a method like this.... I'd rather just find a system that has already done all the hard work

  6. #6
    SitePoint Enthusiast
    Join Date
    Apr 2006
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone?

  7. #7
    SitePoint Enthusiast
    Join Date
    Apr 2006
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone at all

  8. #8
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cake php ?? php and ajax functionality??
    http://www.eternixy.be

  9. #9
    SitePoint Zealot
    Join Date
    Jul 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Jquery is the best Ajax library I've used it, and it weighs in at 15kb when compressed properly, and when all the extras are stripped out (and you can specify what you want from their download page).

    It includes no Php scripts at all, I've written under 1kb scripts in Php to interact with it.

    Dave


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
  •