sponsored links

Collapse

Announcement

Collapse
No announcement yet.

AJAX Is anyone using it?

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

  • AJAX Is anyone using it?

    Hi all,

    Apologies if this is in the wrong forum.

    I found an old thread, in this forum, where mjhaston posted the following links to an example of an AJAX enquiry: -

    http://ecko400.ecko.com:8015/cgidev2p/ajax66e
    using this JSON reply
    http://ecko400.ecko.com:8015/cgidev2p/ajax66c

    I am investigating using AJAX as our UI and I have a few questions. This is my first post, so please be gentle.

    Is anyone using AJAX as their UI and, if so, how do you find the response times and what do the users think?

    Did you use/discount any framework/s?

    Any help would be greatly appreciated.

    Thanks, in advance,
    Neil

  • #2
    Re: AJAX Is anyone using it?

    check out this thread. http://www.code400.com/forum/showthr...light=tutorial
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: AJAX Is anyone using it?

      Yes, that was a great start by Michael. There are numerous frameworks to use. Some are specifically i-centric, others are generic javascript frameworks. I personally have used Sencha(ExtJS) and JQuery. JQuery is my first love, but I have cheated a time or two...

      I personally like the MVC approach where you build the user interface with HTML/CSS/Javascript and pull all the data using AJAX calls. But, there are plenty of ways to mash it up and make it your own. CGIDEV2 is a good choice and there are frameworks for that... Renaissance Framework is one. I know that there are more too. (sorry for those I didn't mention- quick post, no research )
      Your future President
      Bryce

      ---------------------------------------------
      http://www.bravobryce.com

      Comment


      • #4
        Re: AJAX Is anyone using it?

        Hi Tom,

        Thank you for the link. I managed to find that yesterday and it seems excellent.

        Thanks,
        Neil

        Comment


        • #5
          Re: AJAX Is anyone using it?

          Originally posted by Newbie_Neil
          Is anyone using AJAX as their UI and, if so, how do you find the response times and what do the users think?
          The response time from the server is blazingly fast. However, the client side components themselves can get bogged down if you load them with too much data. This is why stressing components you are evaluating is important, and stressing them on a typical PC is important. They may work great on a PC that has a ton of memory. The components may perform like crud on a PC with an older browser and less memory.

          Did you use/discount any framework/s?
          The only frameworks I would discount on the front-end would be those that were limited in their ability to handle multiple data formats. For example, I would want any component I used to be able to handle JSON & XML data, since I have CGI programs on my server already dishing those formats out. By doing so, I can develop my RPG server apps to handle the AJAX requests using JSON & XML, and if I ever wanted to change frameworks, I could do so without affecting my RPG apps. I dont want to have to re-invent the wheel and re-code my server CGI apps if I decide to change frameworks.



          The great thing about AJAX is that you can learn it in about 5 minutes. It is essentially a program call, only that it is a program call from a browser page to a program on a remote server. AJAX is simply the ability of a web page to make a remote program call after the web page has been displayed, and then allow the web page to update iself with a response from the remote server, without having to redisplay the entire web page.

          Since AJAX gives a web page the ability to update part of its page with a response from a remote server, without having to re display the entire page, we gain the following benefits:

          1. The web page does not need to be re-displayed when it is being updated. Therefore, we could update a web page with new info without interfering with a user who is working on another part of the page. For example, a user could be updating part of the page tha contains a form that has customer contact info. While the user is doing that, the web page could make an AJAX call on its own, and update another part of the web page to let the user know that there is a new order that needs to be processed, without interfering with what the user is doing on the page.

          2. The server itself only needs to retrieve data records, or update data records, once the web page is displayed. This means it does not have to go thru the processing required to re-generate the entire page to send an update to the page. Without AJAX, we couldnt develop a CGI application that allowed a user to select an inventory item, and then see the quantity on hand for the selected item, without regenerating and redisplaying the entire web page. With AJAX, our initial web page can remain on the screen, and we can simply update the page to reflect the selected item and quantities.

          For instance, those two disk drive performance data charts ( on the link from Tom's post ) generated nearly 250,000 AJAX requests to my server yesterday alone. Yet, the job processing the AJAX requests was usually sitting at .1% CPU. Thats because the program that processes the AJAX request is very simple. It reads a file, and it sends the contents of the file's data record back to the browser. It does not have to regenerate the entire web page.

          3. Because the entire page does not need to be refreshed to perform updates to the page, we GREATLY reduce the amount of internet bandwidth required to update the page.

          For instance, those two disk drive performance data charts from my site reuire somewhere in the neighborhood of 100KB of bandwith to initially load. (Including all of the HTML and java script source, the logos and pictures, etc.) But subsequent AJAX calls only require 256 bytes of bandwidth to update the chart. That's 1 /400th the bandwidth to process and update an AJAX call as it could take to re-display the entire web page.


          4. We simplify our server programming by only needing code to process the AJAX requests. We no longer need to code a program to generate the page itself. (We can, we simply dont HAVE to.)

          By utilizing AJAX, you can basically divide your GUI development into co-development:

          Client Side
          1. Page layout (The HTML part)
          2. Page appearance( The cascading style sheet part )

          Server Side
          3. Data and Business Rule Processing (Processing the AJAX calls)
          Last edited by MichaelCatalani; March 3rd, 2011, 02:37 PM.
          Michael Catalani
          IS Director, eCommerce & Web Development
          Acceptance Insurance Corporation
          www.AcceptanceInsurance.com
          www.ProvatoSys.com

          Comment


          • #6
            Re: AJAX Is anyone using it?

            Hi Michael,

            Thank you so much for your detailed reply and taking the time to help, it is much appreciated.

            Your reply is exactly the sort of information that I am looking for.

            I am going into a meeting now so, unfortunately, I won't be able to "digest" your post properly until the weekend.

            Thanks again,
            Neil

            Comment


            • #7
              Re: AJAX Is anyone using it?

              Hi Bryce,

              Thank you for your reply.

              Originally posted by bryce4president View Post
              There are numerous frameworks to use. Some are specifically i-centric, others are generic javascript frameworks. I personally have used Sencha(ExtJS) and JQuery. JQuery is my first love, but I have cheated a time or two...

              I personally like the MVC approach where you build the user interface with HTML/CSS/Javascript and pull all the data using AJAX calls. But, there are plenty of ways to mash it up and make it your own. CGIDEV2 is a good choice and there are frameworks for that... Renaissance Framework is one. I know that there are more too.
              I am trying to look more closely at ExtJS and SmartClient.

              Using ExtJS did you do much work with grids and, if so, did you find any limitations or performance issues?

              Thanks,
              Neil

              Comment


              • #8
                Re: AJAX Is anyone using it?

                Some of the performance issues I had seen with ExtJS last year look like they'v been cleaned up. For instance, last year if I were to load more than 200 items into a grid, things like re-positioning the grid or folding it up could take up to 4 seconds. I just stressed a few of their components this week with a couple of hundred data items loaded, and didnt see any performance issues. I would still recommend stressing any component that you are evaluating under real-time loads just to see how they will perform.

                By the way, Sencha has added a product called Ext Designer which is real cool. It allows you to develop the java script for their components using a gui interface. There's a video of it in action at http://www.sencha.com/products/designer/ Be prepared to rock out to the music while you watch.

                CGIDEV2 and Rennasaince Framework are worth looking into because they are open source. I havent downloaded Renaissance yet, but I'm about to. It utilizes CGIDEV2 itself, and appears to make heavy use of jQuery.

                Bryce's MVC approach sounds similar to the approach I like to use:

                HTML - Controls the layout of the web page
                CSS- Controls the appearance (color schemes, etc)
                JavaScript - Controls the logic flow of the web page
                AJAX - Communicates to and from the System i from the web page
                CGI - RPG (or other language) programs running on the i to prcess AJAX requests from web browsers

                By dividing the development up like this, it's possible to make changes to the web page layout without requiring any changes to the RPG CGI programs. You can also add component functionality, and possibly add additional components like a chart to a web page, without requiring any changes to the RPG program that services the page. For instance, the data that feeds the grid can be pointed at the chart component to feed that as well, wthout modifying the RPG CGI program that supplies the data. Suppose you have a grid that lists salesmen and their last 12 months of sales. The user would like a chart added next to the grid that plots the last 12 months of sales for the salesman which is selected frmo the grid. This can be accomplished by using the data already provided to the grid. Just change the grid so that, when a new salesman is clicked / selected on the grid, it causes the chart to reload the 12 months of data for the selected salesman.
                Michael Catalani
                IS Director, eCommerce & Web Development
                Acceptance Insurance Corporation
                www.AcceptanceInsurance.com
                www.ProvatoSys.com

                Comment


                • #9
                  Re: AJAX Is anyone using it?

                  I can't speak for the other frameworks but I do know a thing or two about renaissance as it's been my main job for the last 4-5 years. When I started at coraltree the framework was a new creation that had been created for a web frontend to a satellite TV providers AS400 system. This was a pretty small application as it was only intended to let them enter orders. It was succesful though and off the back of that we then went on to write a full CRM front end that is in use in several large call centres. I forget the exact numbers but I know that it is not unsual for the one AS400 to be processing around 50 requests a second. I believe we quite often have upto 1000 open sessions going at one time.

                  The framework is improving all the time. The latest version has been re-written to make better use of jQuery. We were adding new JS frameworks as new features became available but we found that jQuery could replace most of them. Not only that but it has lots of extra UI features and is nice to work with. Renaissance now uses JQuery quite heavily, including the themes in jQuery UI and the jqGrid plugin. As a developer you don't have to worry about this if you don't want to though as all of these features are available as regular RPG exported procedures. If you are interested though you can always tinker with the framework and create new components. The only proviso is that any framework enhancements are shared with the community.

                  The documentation is much better these days too. There is usually an example program to demonstrate each feature and a wiki is also available now with a developers guide. Renaissance also comes with all of the essentials for an enterprise environment like I18N and logging. A lot of the frameworks out there are a bit lacking in these areas, whereas, renaissance is definately proven in a large business environment.

                  If you want to have a look then check out the website. There is a demo system you can login to and play around with.
                  http://www.renaissanceframework.com/

                  I'm not trying to sell it as obviously it's free. If you have any questions or feedback though we would love to hear it. Good or bad it is always helpful. It may be that it is not the framework for you but it's probably worth a look.
                  Ben

                  Comment


                  • #10
                    Re: AJAX Is anyone using it?

                    Hi Michael,

                    Thank you, yet again, for such a detailed response.

                    We have been "playing" with CGIDEV2 for a couple of months and, I believe, we will be using it for the server side of our development.

                    I must admit that I have been very impressed, as a non-Java "speaker", with SmartClient. The area of particular interest for me is the variety of grids that are handled, although I haven't stress-tested any of them.

                    ExtJS also looks good, but I feel that it doesn't have the same breadth of grids as SmartClient. I don't know very much about Jquery but, unfortunately, I have the impression that it is not an enterprise product.

                    In terms of stress testing what is the maximum number of table entries that you are passing to your UI? I ask this as we have a couple of programs that have to handle, in excess of, 100,000 rows. Whilst this is exceptional, even our product list might have 5-6,000 entries. Are you fetching, say, 200 records and then fetching more as the user scrolls down?

                    When do you think you will look at Renaissance?

                    Thanks,
                    Neil

                    Comment


                    • #11
                      Re: AJAX Is anyone using it?

                      Hi Ben,

                      Thank you for joining in the conversation. As it happens, I had a very quick look at the Renaissance demo last night, until my wife made me stop!

                      The more that I am learning, the more I am tending towards an "i" Framework but, unfortunately, none of you use SmartClient.

                      We are looking to have our software available internally and also over the 'net. For local users we envisaged using the normal sign-on but, for remote users we had thought of using their email address for B2B applications. How easy is it to have user A and user B working with LIBRARYA and user C with LIBRARYJ?

                      Thanks,
                      Neil

                      Comment


                      • #12
                        Re: AJAX Is anyone using it?

                        Not sure about SmartClient but I might be able to answer the other questions.

                        Access:
                        You talk about local net and web access. We do have renaissance setup this way at a customer site. They have local access for the call centre all installed on the production machine. They also have areas of the application used remotely over the Internet. We achieve this with a second AS400 which is in the DMZ. This communicates with the production machine via DDM data queues. The apache server can also be setup with SSL.

                        Users:
                        Renaissance users use their AS400 username and password to signon. They do need to be enrolled in renaissance but the password is the standard AS400 one. When we create a user in renaissance you can optionally go ahead and auto-create the AS400 user too. Alternatively you can do this yourself. If you don't want them having AS400 access then you can easily set their profile to log them back out.

                        Environments:
                        Renaissance supports multiple environments. Each environment can have it's own library list. This can be used for different data libraries or indeed different program libraries. More commonly the programs are limited by setting up the users roles to only allow certain functions from the menu.

                        Is that what you meant?
                        Ben

                        Comment


                        • #13
                          Re: AJAX Is anyone using it?

                          Hi Ben,

                          I hope you don't mind, but I've got a further question.

                          Almost all of our tables have *shock/horror* arrays as we deal with styles, colours and sizes.

                          Size table AA = XS - S - M - L - XL
                          AB = 10 - 12 - 14 - 16 - 18 - 20 - 22 - 24 - 26 - 28 - 30

                          Style sizes used.
                          AA XS - S - M - L - XL
                          JANE AA N Y Y Y Y
                          DAN AA Y Y Y Y Y

                          Style quantities
                          XS - S - M - L - XL
                          JANE RED 0 1 2 2 1
                          JANE BLUE 0 1 2 2 1
                          DAN RED 1 1 2 2 1
                          DAN BLUE 1 1 2 2 1

                          Style JANE doesn't use the first slot in the array, at this moment in time, but the company might decide to start selling it in size XS in the future so we have to keep it available.

                          We would display JANE on screen, after looking at the style sizes used table: -

                          S - M - L - XL
                          JANE RED 1 2 2 1
                          JANE BLUE 1 2 2 1

                          Would this display be easily achieved?

                          Would you "grey" out a column that was not used or would you just not display it?

                          All of our arrays have 24 slots.

                          I hope that I have explained myself clearly and that you are able to follow this, as I have not been able to format it as I would wish.

                          Thanks,
                          Neil

                          Comment


                          • #14
                            Re: AJAX Is anyone using it?

                            Originally posted by Newbie_Neil View Post
                            I must admit that I have been very impressed, as a non-Java "speaker", with SmartClient. The area of particular interest for me is the variety of grids that are handled, although I haven't stress-tested any of them.
                            SMartClient looks good as well. I'll probably go ahead and download their product and do some samples on my "RPG With A GUI Interface" tutorial section located at: http://provatosys.com/gui/RPGGUI.html Since I'm actively working on this now, I may go ahead and incorporate SmartClient into it, especially since they have a free download open source section.

                            Make sure you check out their Visual Builder program: http://www.smartclient.com/technology/visualbuilder.jsp
                            This program operates similar to the ExtJS Designer. It's basically a GUI screen builder. Whichever of these products you ultimately go with, you will want their gui builder to go with it. It will save a buttload of time on your part, and make co-developing sessions with users more productive and fun. It will also severely cut down on a programmer's time needed to get up and going on the components, as the gui builder makes everything momre self-intuitive. Trust me, you dont want to have to go thru either of these guys cryptic api manuals on the components to try to figure anything out. The ExtJS Designer and SmartClient Visual Builder cuts down on the need to refer to the documentation tremendously.

                            I'd need to see an example of why 5K-6K of entries need to be loaded into a grid. I'm not saying there isnt a reason, but typically you dont want to load anything to a persons GUI that they arent going to use. And I think that it would be a very rare case that a user would ever sit down in front of their grid and need to work on more than just a couple of hundred entries at a time. The whole reason to tie AJAX into our GUI interface is to limit the bandwidth required to send the data to the client, and reduce the server processing needed. 5,000 items in a grid could take north of 1MB of bandwidth per load, and some decent amount of processing power on the server side, especially when this is compounded by dozens to thousands of users who could utilize this grid. It wouldnt kill the server, but it would cause the server to use more cyles than it should, which is what we are trying to avoid.

                            If you needed to utilize a large number of records into a grid, then I would design the grid like page-at-a-time subfile (where the grid is reloaded with a new set of records if scrolled beyond the end), or even an expanding subfile (where existing records are kept and new records are added to the grid.) It really depends on what the grid application requirements are, but I would certainly design it on the front end to be as "un-bloated" as possible.
                            Last edited by MichaelCatalani; March 3rd, 2011, 02:58 PM.
                            Michael Catalani
                            IS Director, eCommerce & Web Development
                            Acceptance Insurance Corporation
                            www.AcceptanceInsurance.com
                            www.ProvatoSys.com

                            Comment


                            • #15
                              Re: AJAX Is anyone using it?

                              Hi Michael,

                              Originally posted by MichaelCatalani View Post
                              SMartClient looks good as well. I'll probably go ahead and download their product and do some samples on my "RPG With A GUI Interface" tutorial section located at: http://provatosys.com/gui/RPGGUI.html Since I'm actively working on this now, I may go ahead and incorporate SmartClient into it, especially since they have a free download open source section.
                              If you do, then don't make the mistake that I made by downloading the free version and then reading the documentation! It tells you to download the developer trial version and if at the end of the day you decide not to buy it, there is a simple change to save any work you have done to use in the free version. The developer version has more facilities than the free version.


                              Originally posted by MichaelCatalani View Post
                              Make sure you check out their Visual Builder program: http://www.smartclient.com/technology/visualbuilder.jsp
                              This program operates similar to the EstJS Designer. It's basically a GUI screen builder. Whichever of these products you ultimately go with, you will want their gui builder to go with it. It will save a buttload of time on your part, and make co-developing sessions with users more productive and fun. It will also severely cut down on a programmer's time needed to get up and going on the components, as the gui builder makes everything momre self-intuitive. Trust me, you dont want to have to go thru either of these guys cryptic api manuals on the components to try to figure anything out. The ExtJS Designer and SmartClient Visual Builder cuts down on the need to refer to the documentation tremendously.
                              Wow, I missed this little beauty.


                              Originally posted by MichaelCatalani View Post
                              I'd need to see an example of why 5K-6K of entries need to be loaded into a grid. I'm not saying there isnt a reason, but typically you dont want to load anything to a persons GUI that they arent going to use. And I think that it would be a very rare case that a user would ever sit down in front of their grid and need to work on more than just a couple of hundred entries at a time. The whole reason to tie AJAX into our GUI interface is to limit the bandwidth required to send the data to the client, and reduce the server processing needed. 5,000 items in a grid could take north of 1MB of bandwidth per load, and some decent amount of processing power on the server side, especially when this is compounded by dozens to thousands of users who could utilize this grid. It wouldnt kill the server, but it would cause the server to use more cyles than it should, which is what we are trying to avoid.

                              If you needed to utilize a large number of records into a grid, then I would design the grid like page-at-a-time subfile (where the grid is reloaded with a new set of records if scrolled beyond the end), or even an expanding subfile (where existing records are kept and new records are added to the grid.) It really depends on what the grid application requirements are, but I would certainly design it on the front end to be as "un-bloated" as possible.
                              OK, so you are suggesting downloading the minimum number of records and then refreshing the grid when more records are required. That sounds good to me. On screens such as accounts receivable, we have read all records and then displayed from 1 to 15 of 150 etc. Also, we allow the user to page up and page down so that they could go to 136 to 150 of 150.

                              Thanks,
                              Neil

                              Comment

                              sponsored links

                              Collapse

                              Working...
                              X