Chapter 21. Case Study: Payment Calculator

Throughout this book, you have learned how XML can be used to construct and validate documents and for communications between systems, and you now know how to use several important XML display formats. Sometimes it can be difficult seeing how all of these fit together without a real-world business case. This case study demonstrates how you can build an online home loan calculator using a public web service, a .NET web application, JavaScript, and several of the XML technologies described in this book.

Specifically, this chapter describes how to do the following:

  • Create a web page to enter loan information

  • Call a web service to calculate the payments using SOAP

  • Display the results using Ajax (Asynchronous JavaScript and XML) and SVG

Mortgage Calculations

Mortgages are commonly used throughout the world when purchasing a home or land. The word mortgage comes from French and literally means "death pledge." Before making such a pledge, consumers often want to see the proposed payments for the loan. These payments generally include interest and a principal reduction component, depending on various laws or religious guidelines.

In the most common mortgages, the schedule of payments (based on a repayment agreement, or note) must be determined before the annual percentage rate (APR) can be calculated. The amount of interest and principal paid in each payment is based on the loan terms selected and generally changes over the course of the loan. Depending ...

Get Beginning XML, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.