With the recent down turn in the economy, companies are starting to layoff workers to save a few bucks. Which drives home the point for me that it does not matter who you work for or what you do, being let go is always a possibility. As software developers, we should never stop improving and learning. While that may not prevent you from getting axed, even if that happens, you will leave as a better developer and take away with you all the experiences that you've learned, and should land on your feet just fine.
So never stop learning, improving and making yourself better. And you would never have to be afraid in times like these.
Becoming a better developer: