While alerts force users to react, sometimes the widget gets lost behind other windows and then blocks the whole application. What other ways can be used to make sure a user will take notice of an error message?
If they are alerts just to inform user about something not so much important, you can do like stackexchange, showing a light bar easy to close and not distracting.
If you need to get some info from user, then use a modal dialog with an overlay in the background, so nothing would be accessible and the window would not get lost.
If you want to warn user about an action, like "Are you sure you want to delete this message?", then try avoiding such messages. instead use undo and inform user that he can undo the action ( show it like the first model I said ).