You already know what grade the Houston Rockets are getting for signing Dwight Howard, so let's talk about how Daryl Morey actually pulled this thing off. This move was the culmination of several years of cap flexibility and asset accumulation, all while not performing terribly like so many teams that try to rebuild.

The rebuilding effort really began in earnest after 2008-09, the Rockets' most successful season. This was their roster and salary situation, via StoryTeller's Contracts Page:

Tracy McGrady: $20.37 million, contract expires in 2010

Yao Ming: $15.07 million, contract expires in 2011

Ron Artest: $7.4 million, contract expires in 2009

Shane Battier: $6.37 million, contract expires in 2011

Brian Cook: $3.5 million, contract expires in 2010

Luis Scola: $3.1 million, contract expires in 2010

Carl Landry: $3 million, team option for 2011

Brent Barry: $1.9 million, contract expires in 2010

Chuck Hayes: $1.8 million, team option for 2011

Kyle Lowry: $1.2 million, rookie contract ended in 2010

Aaron Brooks: $1.045 million, rookie contract ended in 2012

Dikembe Mutombo, Von Wafer, Joey Dorsey, James White: All minimum contracts

If Morey had his way, this team never would have been broken up, but injuries struck. Yao's foot injury suffered in the 2009 playoffs essentially ended his career, while McGrady never really recovered from microfracture surgery. Neither player suited up for Houston for very much time after the 2009 playoffs. Yao missed the 2009-10 season and got hurt early in the 2010-11 year before calling it a career, while McGrady and his massive expiring contract was dealt to the Knicks at the 2010 trade deadline for a treasure trove of assets that included Kevin Martin. We'll get back to Martin in a second.

Despite blowing up their roster, the Rockets never really tanked. Led by great coaching from Rick Adelman and some career performances by previously unheralded players, the Rockets were able to stay around .500 for the next three seasons. As this was happening, Morey was systematically demolishing his roster, building assets and replacing the ones he let go with cheaper, better options. As an example: Trevor Ariza was supposed to be a core piece for the next several years when he was signed to a five-year, $33 million contract in the summer of 2009, but after a rough first season, he was moved in a salary dump for Courtney Lee. A year later, Morey drafted Chandler Parsons at the beginning of the second round, and he proved to be a steal, exactly the kind of player the Rockets hoped they were getting with Ariza.

Dwight: From draft to Rocket



See the full story Scott Schroeder leads us through the Dwight Howard timeline, from becoming the No. 1 pick in 2004 to Houston.

But by 2012, it seemed like the wheeling and dealing was going nowhere. The Rockets were finally preparing to be outright terrible because their top players were caught in awkward contract situations. Kyle Lowry was two years removed from free agency and was grumbling about his role. Goran Dragic, who starred as his replacement, was a free agent. Scola, who had been the rock of the frontcourt for so many years, aged in 2011-12 and nobody wanted to trade for his big contract. Rather than keep all three and lock the Rockets into cap hell, Morey made the bold decision to let all of them go. He traded Lowry to Toronto for a first-round pick that would prove to be crucial, let Dragic walk and used the amnesty clause on Scola, a surprising decision to many around the league. To replace them on the roster and get above the salary floor, Morey gave unique contracts to Jeremy Lin and Omer Asik, two second-round picks with upside that wouldn't cost too much.

Morey's patience finally paid off with the biggest move of his tenure: the October 2012 trade for James Harden. Without Harden, the Rockets don't get Howard, simple as that. The price to get Harden was steep -- Kevin Martin, Jeremy Lamb, the 2013 first-round pick from the Lowry trade, a 2014 first-round pick from Dallas and a 2013 second-rounder from Charlotte -- but necessary. How did the Rockets acquire all those assets?

Kevin Martin came in a massive 2010 trade deadline deal where the Rockets took advantage of the Knicks' desperation to clear cap space in 2010. The main pieces: Houston sent McGrady to the Knicks and Carl Landry to the Kings and got back Martin, Jordan Hill and the option to swap picks with the Knicks in 2011 and 2012. Landry had been selected in the second round of the 2007 NBA Draft, showing Houston's consistent ability to find talent where other teams failed. That ability got them Martin.

came in a massive 2010 trade deadline deal where the Rockets took advantage of the Knicks' desperation to clear cap space in 2010. The main pieces: Houston sent McGrady to the Knicks and Carl Landry to the Kings and got back Martin, Jordan Hill and the option to swap picks with the Knicks in 2011 and 2012. Landry had been selected in the second round of the 2007 NBA Draft, showing Houston's consistent ability to find talent where other teams failed. That ability got them Martin. Jeremy Lamb was selected with a pick the Rockets traded up two slots to get, sending the Bucks Samuel Dalembert. But Houston felt they could take Lamb in part because they had two other first-round picks. One, used on Royce White, was one of the two picks from the Knicks in the 2010 blockbuster. Another, used on Terrence Jones, came from the Timberwolves for Chase Budinger, a decent, but replaceable contributor.

was selected with a pick the Rockets traded up two slots to get, sending the Bucks Samuel Dalembert. But Houston felt they could take Lamb in part because they had two other first-round picks. One, used on Royce White, was one of the two picks from the Knicks in the 2010 blockbuster. Another, used on Terrence Jones, came from the Timberwolves for Chase Budinger, a decent, but replaceable contributor. One first-round pick came from the Raptors in the deal for Lowry. Toronto surrendered a pick that was top-3 protected in 2013, top-2 protected in 2014 and 2015, top-1 protected in 2016 and 2017 and unprotected in 2018. However, the Rockets would only get the pick if it fell in the lottery, meaning they essentially guaranteed themselves a high selection. The Rockets had initially acquired Lowry, a backup in Memphis, in 2009 in a deal involving starting point guard Rafer Alston. Many wondered about that deal at the time, but Lowry gave Houston several good years and eventually helped deliver Harden.

came from the Raptors in the deal for Lowry. Toronto surrendered a pick that was top-3 protected in 2013, top-2 protected in 2014 and 2015, top-1 protected in 2016 and 2017 and unprotected in 2018. However, the Rockets would only get the pick if it fell in the lottery, meaning they essentially guaranteed themselves a high selection. The Rockets had initially acquired Lowry, a backup in Memphis, in 2009 in a deal involving starting point guard Rafer Alston. Many wondered about that deal at the time, but Lowry gave Houston several good years and eventually helped deliver Harden. The other first-round pick was initially from Dallas. The Mavericks traded it to the Lakers in the 2011 deal for Lamar Odom that worked out poorly, and the Lakers moved it on to Houston as compensation for taking on Derek Fisher in a 2012 trade deadline deal for ... you guessed it, Jordan Hill. The pick is top-20 protected from 2012 to 2017.

was initially from Dallas. The Mavericks traded it to the Lakers in the 2011 deal for Lamar Odom that worked out poorly, and the Lakers moved it on to Houston as compensation for taking on Derek Fisher in a 2012 trade deadline deal for ... you guessed it, Jordan Hill. The pick is top-20 protected from 2012 to 2017. The 2013 second-round pick was, ironically, a Thunder pick for a while, as they received it for dumping Byron Mullens on the Bobcats. However, the Thunder lost the pick as a result of a dispute with Boston over Jeff Green's medical history. The Celtics eventually moved the selection to Houston as part of a sign-and-trade arrangement to land Courtney Lee.

That's just the Harden trade, too. Consider how Morey turned the core pieces of the 2009 squad into the building blocks of the future that eventually lured Howard to Houston.

That's how you manufacture assets while rebuilding.

As we move forward in a new CBA where teams must spend 90 percent of the cap and fend off tanking accusations from fans, general managers will yearn for the ability to rebuild while keeping the team competitive. Daryl Morey just provided all of them the blueprint to doing just that.

GRADE: A+

More from SB Nation:

• Howard picks Rockets | Floyd: Don’t blame Howard for circus

• Roth: Why Dwight Howard annoys everyone

• J.R. Smith returns to NY | The Knicks are reunited!

• The NBA's top 90 free agents | All NBA free agency news

• Grading the NBA free agent deals