Boggarts have always been viewed as an anomaly because of their mysterious ability to manifest themselves as someones worst fears and their equally mysterious true form. However, their mysteries may hide the power that the Dark Lord knows not that Harry possesses. There are few facts that JK Rowling has revealed about boggarts, and so we must start out with those:
1) No one knows what a boggart really looks like.
2) The boggart can only appear as one person’s worst fear at a time, meaning it takes the same shape in everyone’s eyes at a specific point in time, usually the worst fear of the person standing right in front of them (note how Lupin had to jump in front of the boggart both times he helped others repel it).
3) Boggarts can be banished by the Riddikulus charm, and the resulting laughter (as learned in POA), or an extra wave of the wand (Lupin does this in OOTP).
This entire thesis is based on the contradictory quality of Mad-Eye Moody’s all-seeing eye. In OOTP, Molly Weasely and Sirius suspect there is a boggart in a closet, however they ask Moody to check it out first with his special eye.
Therein lies the difficulty: how could Moody tell it was a boggart? There seems to be an irresolvable contradiction in this problem; if he could see its real form, then that would contradict fact number one. So that could not be the case; Moody does NOT see the boggart in its real shape.
A second possibility is that he sees his worst fear lurking in the closet. However, according to fact number two, what one sees the boggart as is not based on actually looking at the boggart, its based on what the boggart reveals itself to be. The boggart can only take one form at a time, and usually thats the worst fear of the person standing right in front of it. How would the boggart be able to discern that Mad-Eye was looking at it from another part of the house, and change so quickly? This means that Moody does NOT see the boggart in the shape of his worst fear.
What does this all mean? If Moody doesn’t see the boggart in its real shape, or in the shape of his own worst fear, then what DOES he see, and how can he tell its a boggart?
Now we can use fact number three to draw a possible conclusion: laughing is not the only way to banish a boggart. In OOTP, Lupin yells the spell Riddikulus and then performs an extra wand wave to get rid of the boggart. Yet, in POA, Lupin teaches his class that laughter banishes the boggart. This demonstration of multiple methods of getting rid of a boggart allows us to consider the possibility of other ways to defeat a boggart.
Moody, as a very experienced ex-Auror, would probably have access to most, if not all, methods of expelling a boggart, or lessening its effects. Perhaps his special eye is coated with a cream that allows him to view the auras of different magical creatures, or scans all living creatures within a certain perimeter — but that’s all speculation. The main point is, Moody may have special ways of dealing with boggarts. The possibility of this being the answer is slim, however, and is not widely supported by canon.
Another much more plausible possibility is that the boggart has no real shape or form, and instead is just a mix of the essences of fear in the world; perhaps whenever someone approaches them, or gets close enough to activate these fears, the boggart materializes the fears, and serves as a conduit for these essences. Thus, when the boggart has no tangible form, it is a collection of misty vapors that embody the fear in all peoples within a certain perimeter.
If the second view is true, then boggarts would be like dementors in that they draw upon the essences of the people around them; while the dementors just suck away all happy essences like a vacuum, boggarts take the essences of fear and rebound them back into reality, stronger than before. This would account for all similarities between boggarts and dementors; boggarts are banished by laughter, the opposite of fear, while dementors are banished by happy thoughts, the antithesis of bad memories. If this conclusion is actually true, then it could open a whole new door to the wizarding world; there would be an infinite amount of possibilities and theories in the realm of magical theory. If spells can be negated with opposite forces, the possibilities are endless — the main importance of which lies in the battle between Voldemort and Harry.
Perhaps JK Rowling just intended to use boggarts as a bridge to the dementors in the dementor-centric POA, but I believe she also included boggarts in order to emphasize the magical theory behind negation spells, and the importance of opposites in the world of magic. I believe that when Harry faces and finally vanquishes Voldemort in book seven, he will wield an essence that is essentially the polar opposite of Voldemort (the power that the Dark Lord knows not), and this theory stands on the firm foundation of an analysis on boggarts.