The trouble is that people are excellent at telling Israel what they shouldn’t have done, but dreadful at telling them what they should have done (that would have been in any way effective).
Not spending years propping up an Islamic militant group in Gaza as a means to weaken the PLO so that Israeli could take over the West Bank piecemeal would've been a great place to start. Netanyahu has been playing with fire for the best part of two decades, has been warned that he was playing with fire by his own security services, and continued to play with fire because it benefited him politically. And was so damned proud about it that he gloated about it for years and years. It was his crowning achievement, and it had predictable consequences. He raised a viper and it bit him. Hamas and the right wing of Israeli politics deserve each other. Those caught in the crossfire do not.
As for what Netanyahu should have done, no one would have blinked if they had launched surgical attacks to take out Hamas' leadership, most of whom weren't even in Gaza. There would have been massive international support for pushing Hamas out in favour of a return of the PLO, something that likely would have been supported by most Gazans...Hamas was deeply unpopular, and as this followed closely on years of protests in Gaza against Hamas, there was plenty of opportunity to weaken its position. Instead, Netanyahu chose indiscriminate violence because his only chance of remaining in power is to court the ultra-right, and the ultra-right wants nothing short of the ethnic cleaning of Gaza and the West Bank. None of Israel's actions have benefited their security situation, have benefited their international standing, they have simply benefited that most cynical of political survivors, and his successors will reap the consequences of his having survived so long.
But sadly, he has also shaped Israeli domestic politics sufficiently that even when he is finally ousted, the forces he set in motion to keep himself in power aren't going to go away any time soon.
