In many applications, and this one is no exception, the information
is read-only??”you are simply presenting the resources to the end user. However, the
raw resources are rarely presented. Some value has to be added to show how you visually
present them and also how you enhance them for presentation using business logic.
Many applications blur the distinction between business logic and presentation logic,
but it is important to distinguish these. When using ASP.NET AJAX, the ability to distinguish
them becomes a lot easier.
CHAPTER 10 ?– BUILDING A SAMPLE APPLICATION USING ASP.NET AJAX 227
This is because before AJAX, a developer would have to make a full-page refresh
whenever the user interacted with the page. Then, with the advent of DHTML, they could
make a decision??”for a simple interaction and for a bit of business logic, it might be easier
not to do it on the server but instead to do it using a script on the page. For example, if
the current price for the stock is on the page, the current earnings are known to the page,
and the user wants to display the profit/earnings (P/E) ratio (which divides the former by
the latter), why not just calculate it using an on-page JavaScript and then render it in a