ESPN.com’s NBA Trade Machine

My latest project that I worked on at ESPN was the NBA Trade Machine. This was a fun application to build. Our NBA Engineer Sachin spent a lot of time reading through the NBA collective bargaining agreement, and learning about all the rules about trading players in the NBA. He set up all the formulas and database tables that I used. I built the front end UI for this application. I tried to incorporate some Ajax techniques into this application to make the interface as usable as possible. You can pick up to four teams. After you select a team the application uses Ajax to get the players for that team to display. If a player has a trade restriction that prevents them from currently being traded, the checkbox is set to disabled. Depending on how many teams you have selected I used DHTML to display the team that the player is being sent to after you check a player. If more than two teams are in a trade, a select box is display with a choice of destination teams.

I also used Ajax to display individual player’s trade restrictions. With Ajax it is important to give the user a visual clue that something is happening on the page since the page doesn’t reload. I made a message of “Loading Teams” or “Loading Trade Restrictions” while the Ajax request is completing. One of the most challengin aspects of this application was dealing with the back button since that is an issue with Ajax applications. I ended up puting in as link that passes the trade parameters back to the page and then use JavaScript to fill to make the Ajax calles and fill in the form to the state it was in when the trade was submitted.

Overall the feedback for the application has been pretty positive, and I am still planning to make incremental improvements to the application. As part of this project I also built the administration tools to maintain the player contract and team payroll data. I used a lot of Ajax techniques for those tools as well.

0 Responses to “ESPN.com’s NBA Trade Machine”


  1. No Comments

Leave a Reply




About Brent

I have been a Web Developer since the early '90s working on some of the highest traffic sites on the internet such as MSN.com and ESPN.com. Since 2007 I have been using Ruby on Rails while working for Sports Technologies, a small internet company in Connecticut, developing features for FanNation.com and Fantasy Sports applications for Sports Illustrated.

I am interested in all things related to Social Media, User Experience, and creating great Web Applications.

I am a Cycling enthusiast who raced competitively for many years, and still try to get out and ride as much as I can. I created the site BikeRide.com and have developed some other cycling related sites in the past.

I am a husband, and the father of two girls. I grew up in western Washington, but now live in Connecticut.