Honestly - the "solution" to this type of violence isn't bulletproof windows, door, backpacks, arming teachers, putting police in schools.
The "solution" is having highly accessible, free and compassionate, individual based mental health services available to ANYONE and ANYTIME (regardless of money, race, religion, if they're even a citizen of the country or not).
If people make mental health a priority, then by that single step you prevent almost all of these situations.
It's expensive, but it saves lives and creates a much stronger, healthier country as a whole ... and that should be "worth it" to anyone living there.