WebService calls using Javascript (user experience)
SORRY: Here is the URL http://demo.pctopp.com/cvcart.htm
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:
621032
GRIGNY FRAIS
11.05.89
11.05.89
12:45
615079
GERIKO
11.05.89
11.05.89
08:30
615265
DU PELOUX
11.05.89
10.05.89
16:55
620969
CAMP ROMAIN
15.05.89
11.05.89
05:25
615121
S P M P
12.05.89
10.05.89
08:20
615312
S P G
16.05.89
10.05.89
09:50
628825
PRODUITS NYONSAIS
13.05.89
12.05.89
628820
NATURE PROVENCE
12.05.89
12.05.89
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. There you can register for a free test account.
4 Comments
Comments have been disabled for this content.
Michael Schwarz said
Do you have a website demo for us? Would be nice to check the speeds in an online demo. I have a gmail (google.com) account, where the do the same thing with webservices, I think not ASP.NET... ;)
Sam said
Sorry, no demo, but I timed it using timers in the javascript and it was 200ms or less. It still needs more testing though. I need to install it on our Sydney server and see what performance is like back here in Boston.
I'd more than happy to help someone setup a demo, but I have no public asp.net space that I can use.
Sam said
can you email me sam at samsmith.co.nz, and I'll tell you what I need you to do.
Sam said
I have a stripped down demo ready for you to upload. let me know when you're ready.