Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

AJAX Isn't Just for Cleaning Dishes Anymore

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • AJAX Isn't Just for Cleaning Dishes Anymore

    ** This thread discusses the article: AJAX Isn't Just for Cleaning Dishes Anymore **
    This is a discussion about AJAX Isn't Just for Cleaning Dishes Anymore.

    Click here for the article.


  • #2
    AJAX Isn't Just for Cleaning Dishes Anymore

    ** This thread discusses the article: AJAX Isn't Just for Cleaning Dishes Anymore **
    Im not much on javascript but isnt javascript executed differently in different browsers. For instance Im not able to get into the MS gaming site with firefox due to javascript errors. But IE allows it. Im not saying Im against it, just wanting to know if all browsers will support it? I kinda like the propect of using JSP/JSF and RPG.

    Comment


    • #3
      AJAX Isn't Just for Cleaning Dishes Anymore

      ** This thread discusses the article: AJAX Isn't Just for Cleaning Dishes Anymore **
      The routine I published does check for the subtle difference in AJAX objects in the two classes of browsers. Once that is performed, the implementation (methods of the XMLHTTPRequest object) are identical. So the bottom line, there is no issue.

      Comment


      • #4
        AJAX Isn't Just for Cleaning Dishes Anymore

        ** This thread discusses the article: AJAX Isn't Just for Cleaning Dishes Anymore **
        I have never seen a web application that gives an error message alone in a web page and makes you hit the back button to correct the error. Is there a certain tool that writes code like this? Just curious.

        Comment


        • #5
          AJAX Isn't Just for Cleaning Dishes Anymore

          ** This thread discusses the article: AJAX Isn't Just for Cleaning Dishes Anymore **
          The tools is the human being who writes that code. I see a lot of in-house applications that do this, as well as having experienced it on web sites when I've purchased things on-line or attempted to register for various things and not entered my data completely. Of late the frequency of this kind of practice is growing smaller but it is there. JSP solve this problem as do some ASPs, but for those who do not use them, you often see that issue. AJAX gives the rest of the world the ability to this single-page applications that was effectively simulated with JSPs and ASPs in the past.

          Comment


          • #6
            AJAX Isn't Just for Cleaning Dishes Anymore

            ** This thread discusses the article: AJAX Isn't Just for Cleaning Dishes Anymore **
            Bob, Great article! An associate of mine and I have been discussing "development frameworks". If we are going to move toward using AJAX, web services to build our browser-based apps (with RPG/DB2) on the back end, do you think it is "necessary" to standardize on a "development framework" such as JSF, .NET.... or some other? What type of framework does Websphere have built in, if any? Or, is the whole framework thing "overkill"? Thanks.

            Comment


            • #7
              AJAX Isn't Just for Cleaning Dishes Anymore

              ** This thread discusses the article: AJAX Isn't Just for Cleaning Dishes Anymore **
              If anyone is interested in AJAX, here are some other articles that provide useful information and resources on AJAX. First, there were a couple of article published on mcpressonline.com a couple of weeks ago Part 1 and Part 2. (Anyone here read mcpressonline.com?) Second, slashdot yesterday referred to a good series of articles on AJAX at the IBM developerWorks: Part 1, Part 2, and Part 3. Third, when thinking about AJAX, be sure to see what wikipedia has to say about AJAX, especially the section called "Cons & Criticism". Finally, Bob, in a column that's supposed to be about RPG, shouldn't you be writing about RPG? ;-) Cheers! Hans

              Comment


              • #8
                AJAX Isn't Just for Cleaning Dishes Anymore

                ** This thread discusses the article: AJAX Isn't Just for Cleaning Dishes Anymore **
                I finally got around to playing with AJAX. MCPress articles were both helpful and motivational. One goal was to come up with a simple generic interface that I could use productively. One idea was to have a generic callback routine for handling many of a particular class of response. Some of the examples on the Internet return XML, others return various forms of delimited text. I finally concluded on returning a stream of JavaScript statements and simply using an eval(request.responseText) statement to execute them. The example code below demonstrates using AJAX to asynchronously load a list box when a button is clicked. I tried for quite a few hours to create a simple object oriented interface for AJAX. My thought was to use a syntax like: request = new xmlHTTP(); // instantiate a request object request.send(url); // send a request & register a generic callback function My original interface worked fine for simple requests but broke down when attempting to handle multiple concurrent requests (simultaneously and asynchronously). AJAX seems to be a little tricky under that scenario. I finally concluded on a single function to instantiate a request object, register a generic callback, and request a url: reqSend(url); I placed my reqSend(url) function in a loop to generate 1000 simultaneous requests to test concurrency. It worked. The CPU on my model 170 was driven to +++, but each request was handled reliably. One interesting note is that the performance in Firefox was better than Internet Explorer. IE produces a "Virtual Memory Low" message, and causes other applications on my workstation to run slowly after thousands of requests are made. Oh well, I won't plan on using AJAX in that way. I was pretty impressed with the response time to complete a simple AJAX request, which I estimate at around 50 milliseconds. I may write some code to measure that precisely. So far, I've packaged my reqSend() function in a JavaScript file named xmlhttp.js so it can be easily referenced from any Web page. Nathan M. Andelin
                Code

                Comment


                • #9
                  AJAX Isn't Just for Cleaning Dishes Anymore

                  ** This thread discusses the article: AJAX Isn't Just for Cleaning Dishes Anymore **
                  I've been reading a few articles about AJAX and it does seem very useful. The problem is that I haven't seem any examples of how to populate the responseText using RPG. Any help would be appreciated. Thanks, Rob

                  Comment


                  • #10
                    AJAX Isn't Just for Cleaning Dishes Anymore

                    ** This thread discusses the article: AJAX Isn't Just for Cleaning Dishes Anymore **
                    Rob, Presently investigating the possibilities myself. I'm no expert on Javascript, but here's a very simple example below: it's all ripped off other things, but it works! My program 'ajax1' simple outputs the form with the input field and on entry of a value in this field, the js kicks in, calls 'ajax2', which returns a value of customer name. The form is then updated with this value. What I hadn't understood was how the second program returned the value. You simply have the ajax2.html file, with nothing much in it but the variable. You do the normal 'wrtsection' calls in your pgm, including the '*fini'. The next stage involves returning several values or maybe several lines (eg for populating a drop down). Thatís for another day, but presumably is just parsing routines in js?
                    Code

                    Comment

                    Working...
                    X