The attacks in Paris occurred because some people have so much hate one cannot really understand it. They also have an ideology that devalues human beings so much that killing someone has no effect on their conscience.
A war on ideology takes a lot of time. Decades if not longer. You cannot win it with weapons although you do need them.
My wife immigrated from a country that is predominantly islamic. She tells me some of the most fanatical are nominal muslims. They kill ,rape etc people for any amount of reasons. however these attacks occur only in these countries.
I cannot say I am any expert but it seems to me if you give anyone a fair go at making money and some ability to secure a financial future for their children then they ain't going to go around killing people.