Prev | Current Page 815 | Next

Frank Zammetti

"Practical DWR 2 Projects"

This can be seen in Figure 9-8.
Figure 9-8. The About pop-up
Note how everything except the About pop-up itself is dimmed out, and how it has an OK
button to dismiss it. Nothing else on the UI can be touched until this pop-up is dismissed, just
like any lightbox.
CHAPTER 9 n TIMEKEEPER: DWR EVEN MAKES PROJECT MANAGEMENT FUN! 486
updateData() Remember that updateData() method I mentioned earlier, and made an ??berlame
joke about? Well, here it is now:
this.updateData = function() {
dwr.engine.beginBatch();
timekeeper.updateUserList();
timekeeper.getTimesheetItems();
timekeeper.updateProjectList();
dwr.engine.endBatch();
} // End updateData().
OK, so here??™s something new and exciting in DWR land! As you can see, there are three
calls to methods of the timekeeper object being done. As it turns out, each of those makes a
DWR call to the server. Normally, they would all fire individually and asynchronously, meaning
three separate requests to the server, three separate threads of execution on the browser (as
far as the network requests go, JavaScript is still always single-threaded, so only one callback
at a time would ever execute), and so on. But, DWR offers one of the coolest features going:
call batching.


Pages:
803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827