This invention provides novel synthetic bone grafting materials or tissue engineering scaffolds with desired structural and biological properties (e.g., well-controlled macroporosities, spatially defined biological microenvironment, good handling characteristics, self-anchoring capabilities and shape memory properties) and methods of their applications in vivo.