I'd just like to take a moment to say that Gaza is an area that is somewhat shut off from the world through an Israeli blockade. It's not open. You have 1.5 million people living in pretty crunched room, suffering widespread malnutritian, and despite the wealth of a select few, almost everybody is in poverty and relies on humanitarian aid for survival.
The Palestinian people voted in Hamas democratically, largely at the time because Hamas provided them by far the most humanitarian aid domestically. But Israel then did it's best United States impression: once you give some brown people you've occupied the right to vote, those people will usually vote in folks who hate you -- surprise! So Israel puts up a blockade to exert its disapproval upon the Palestinian people. This incites an understandable feeling of hopelessness and utter fear in Palestinians, which futher entrenches groups like Hamas who have absolutely no shame in exacerbating fear to keep themselves in power, even if it means sacrificing the lives of lowly foot soldiers or civilians.
That's the basic law of humanity -- if you close people up, make them feel hopeless, then they will gravitate towards extreme solutions which generally take the form of assholes like Hamas.
Now, Hamas can be dealt with. They are run by highly intelligent people with Ph.Ds in stuff like economics. They've negotiated ceasefires and often held up their end of the deal, though they sometimes can't control a few of their militant factions. And these were the people Palestinians declared represented them.
If there is to be hope, you must deal with Hamas. Do your best. Take the Obama route, if you must, and offer compromised, fair deals, partially built on ideas your opponents have offered. When your opponent refuses over and over again to take them, they will get slaughtered in elections and replaced by people that will, empowering your position further.