It first 787 flew in 2009, and it entered service in 2011.
The one that crashed was built in 2013.
I love the 787. Its a great aircraft, especially for passengers. The cabin pressurization system is awesome. The 787's internal cabin pressure is the equivalent of 6,000 feet (1,800 m) altitude, significantly improves passenger comfort. It also maintains higher humidity levels. The system reduces passenger fatigue, symptoms associated with jet lag (obviously can't do anything about the time difference), and less gastrointestinal problems associated with flight.