WebService calls using Javascript (user experience)

Michael Schwarz on Wednesday, June 23, 2004

SORRY: Here is the URL http://demo.pctopp.com/cvcart.htm [1]

In one of my old postings I talked about Javascript consuming WebServices. Some guy talkled to me and said "Hmmm, Javascript and WebServices? That seems to be very slow!". I have created a small test page where you can see some orders. They are added to the page with a simple Javascript command and the order number.

<script> ... list.add(new JOB("621032", "", "", 1)); list.add(new JOB("615079", "", "", 1)); list.add(new JOB("615265", "", "", 1)); list.add(new JOB("620969", "", "", 1)); list.add(new JOB("615121", "", "", 1)); list.add(new JOB("615312", "", "", 1)); list.add(new JOB("628825", "", "", 1)); list.add(new JOB("628820", "", "", 1)); ... </script>

The list of orders will be displayed with order status colors in a HTML table. Now, if you have time, the order details will be loaded by a WebService. You can see this when the customer name will be added in the middle of the table. You will see a table like this:

Insert table here...

In the top you can see (in blue letters) the current date and time for the simulation. So, the order 615265 will be to late indicating this showing the due date with a red background.

Now you can use the arrow keys, or page up/down to change the time where the orders should be scheduled. If you press back down or several times the down arrow key you will see that all the other orders will be red because the starting time (blue date in the top) will be after the due date. If you go up the red due dates will go and you will see that the order background color will change to blue indicating that these orders would be running at this time already, because the Now() time will be at this starting time.

Every click on one of the buttons or using the arrow keys will call a WebService with the order numbers and will get new calculated starting times and status colors. So, I think it is not very slow here on our demo site. And if you are using a LAN (this application will be a intranet application) it is more faster.

For more WebServices you can have a look at our demo at http://demo.pctopp.com [2]. There you can register for a free test account.