The sample application included with this book is an application I have written for various demos of the ASP.NET MVC framework. You can read its short description and download the latest version from www.codeplex.com/CarTrackr.
CarTrackr is an online software application designed to help you understand and track your fuel usage and kilometers driven.
You will have a record on when you filled up on fuel, how many kilometers you got in a given tank, how much you have spent, and how many liters of fuel you are using per 100 kilometers.
CarTrackr will enable you to improve your fuel economy and save money, as well as conserve fuel. Fuel economy and conservation is becoming an important way to control your finances in the current time of high prices.
Please note that this appendix will not cover the CarTrackr sample application in its entirety, but will zoom in on certain aspects that make developing ASP.NET MVC applications easier and faster.
Before diving into the implementation details, the functionality of CarTrackr is explained by using the most important screens within the application.
The CarTrackr home page looks quite simple. It gives a description of the application's purpose and features, and allows a user to sign in or register an account.
When a user has logged in, the home page will display a link that redirects the user to his or her list of tracked cars.
In order to use the CarTrackr features, a user must be logged in. Logging in can be done by using the login screen and providing either a username or password combination, or an OpenID login URL.
The main screen, from which any action in the CarTrackr application can be performed, is the list of cars. It displays a list of all tracked cars linked to the user's account, and allows the user to show more details for a car, show refuellings, and so on. There's one special link on this page: Show statistics...
When a user clicks the Show statistics... link, a partial page update is performed by using an asynchronous web request (AJAX).
Whenever a user requests a car's details, the details page is displayed. This page displays the properties for the car, for example, its Make and Model, along with some statistical data, for example, the Average costs per kilometer that the car consumes, the Total kilometers, and so on.
On the car details screen, the user can scroll down to see some graphs, which immediately show the car's statistics in a more visual manner. For example, the Fuel usage over time is plotted on a Silverlight graph: