I don't think I'm the only one to see Dan Brown's The Da Vinci Code as a watered down version of Eco's Foucault's Pendulum. In fact, I internetted it, and found at least one blog article on the comparison, but it seemed likely to contain spoilers, and since I'm making my way slowly through the book, I thought I'd wait a bit.
But I'm coming to realize that there's more to this difference than density. Sure, Brown is writing for a lazy audience, and his book reflects that: there's very little difficult content; his prose move smoothly, and after each puzzle is completed; the narrator comments on how ingenious the shadowy masterminds must be, leaving the reader with a sense of accomplishment, even though the puzzle probably wasn't solved before it's revelation in the text--indeed, if I remember correctly most of the puzzles lacked a crucial bit of information, the revelation of which was concurrent with the solving. In contrast, Eco indulges in lengthy passages of dense historical monologue; drops untranslated phrases in Latin, French, German and Spanish (he's kind enough, at least, to transliterate Hebrew and Greek); and has a clunky, academic writing style (though the translator may be partly at fault).
These differences are surely important to my preference for the earlier text; Eco speaks in a way that presupposes my competence, and I get to pretend I'm smart because I'm reading a comparatively difficult piece of modern (I'm not sure this is the right word, but I'll defend it a bit below) fiction. This is cosmetic. I like Eco better because he makes me feel better about myself. Reading Dan Brown is like reading The Hardy Boys, except without the irony.
But like I said, I'm coming into a less vain reason to laud Eco's work above Brown's. To explain, I would ask the question, "Why do I think these books were written?" I will leave aside cynical ideas about fame and wealth, arguing that any story would have done the trick for those. Why write a fiction book about the occult history of European religion? (And in order to incorporate the breadth of Eco's work, I won't just say Catholicism.)
I think the answer is different for Eco than it is for Brown, but I think the same historical narrative is in play. One of Eco's characters (Lia) says that the reason people put bombs on trains is because they're looking for God. Keep in mind this was written in 1988, before our particular, contemporary brand of chauvinism had equated terrorism with (Islamic) religious extremism--In Eco's book, a terrorist is as likely to be a communist or anarchist as s/he is to be a religious fanatic. In fact, one of the points is that there isn't a difference. Belbo (perhaps the story's protagonist/anti-hero) remarks at one point that very little distinguishes him as a scholar and editor from practitioners of heretical rites that he is observing. Everyone is looking for order in the chaos. The bomb is put on the train because, fundamentally, we all believe in synarchy, whether in the form of the illuminati or simply God.
To shorten, and to elide much of what's going on in my head (maybe I'll write something longer when I'm finished reading), the reason Eco wrote his book is to talk about, through metaphor, the philosophical/historical crises that surfaced in European thought from 1968 on. It's not a mistake that that's when the story's narrator--Casaubon (a character from Middlemarch who dies before completing his life's work: "The Key to All Mythologies")--meets Belbo, and gets involved with the publishing firm around which the story centers. (1968 was an important year in European--particularly Parisian, but apparently also Milanese--academia, with students protesting, even getting in fights with police, about nearly everything. It also is the year that Deleuze, Derrida, Foucault and several others all published some of their most important work.) Out of the '68 riots came declarations of the death of the author, the death of history, the death of philosophy, etc. The narrative fabric of European thought was torn asunder in a way that they thought to be irreversible--or perhaps they only had a political stake in hoping it would be irreversible. As some tell the story--and it is always noted that it's ironic to tell the story of how stories can't be told truthfully--successive and increasingly violent and destructive armed conflict (that is, WWI and WWII, amongst other things) thoroughly undermined the ostensible benevolence of reason. The Enlightenment claimed that through rational progress a better, happier world could be built. The repeated bleeding of Europe--supposedly the most civilized and advanced part of the world--suggested that the Enlightenment was wrong; the increasingly public colonial violence of Korea and Vietnam (especially the latter) made it clear to the new generation of academics that something was terribly wrong with narrative history. We've all been told that we must learn history in order to keep from repeating its mistakes. What the members of the '68 protests claimed is that this is a lie, or that it's being co-opted by power and authority not to prevent mistakes, but to refine them.
Put more concisely, history is really a series (even that word is too suggestive) of events with no order or direction. Marx and Hegel had theorized that there was a dialectical path history took, with a definite goal, which Hegel analogized to the personal quest for self-knowledge. The atrocity of the second world war, and the continued systemic international violence of capitalist democracy, undermined rationalism, and called for something else. Most of the still-read authors from '68 (and after, of course, since the good ones kept publishing) have simply (or convolutedly) argued that there is no system, no narrative, but that we, as Spivak says, "can't help but narrate." Which is why we put bombs on the train, why we believe in gods, why we switch cause and effect--missing what for Lia is obvious: that mysticism is just our way of not looking at our bodies.
Belbo--again from Eco's book--spends his life ashamed of not being the hero of his story. This isn't painted in some eccentric modernist/existentialist way, but still effectively underpins all his actions. Belbo was 10ish when the Fascists were fighting the Partisans (1943-45), and wasn't old enough to fight. His whole life he's felt like a coward, always not taking the (absurd) opportunity to lay down his life. He's not a white knight, and that devours him. In order to turn life into the narrative everyone says it's supposed to be, he and Casaubon create the Plan. I won't say any more about that, since it'd be spoilery.
The point is we can read Foucault's Pendulum as a narrator narrating the story of how it's impossible to not narrate, even knowing that narrating is absurd and dangerous.
The Da Vinci Code is a different matter. But it succeeds because it's not a deliberate allegory. Brown isn't trying to depict the urge to depict. Indeed, Brown is exactly one of the things Eco is depicting: the uncontrollable lust for narrative. Eco was writing about why stories like Brown's will always be popular, about why there will always be theories about the Illuminati, et al.