I know Duelist is considered subpar as a whole, but you can get excellent AC with one. As a thought experiment once when I was on watch several years ago, I built a level 20 character (with lvl 20 WBL) for AC, and I got a Duelist into the 60s for AC (with an additional +8 vs against Attacks of Opportunity), when fighting defensively. I believe it was Swashbuckler 6/Rogue4/Duelist 10. Of course it had Daring Outlaw and Defensive Duelist feats, and was pretty gear-dependent (because I focused on AC-improving items), but it got pretty crazy. With books and stat items to improve DEX and INT both to 30, fighting defensively adds his Duelist level to AC (and also adds an extra +1d6 to his damage), Ring of Protection +5, Off-Hand was a +5 Defensive Dagger (all going to AC, you only lose Duelist benefits if you attack with a weapon in your off-hand, you can still hold one). And since the character was so deeply invested in being able to move to maintain his AC (4 levels of Rogue got him Uncanny Dodge), I also gave him a Ring of Freedom of Movement. He also had a Monk's Belt (and I believ his WIS mod was a +2), and an Ioun Stone for AC. That's something like a 64 or so to AC, not counting the Dodge thing that Swashbucklers get. And a Duelist 10 with Defensive Duelist does 4d6 damage fighting with a rapier (not counting when he gets in his 5d6 Sneak Attacks).
That is a level 20 build, though. getting such a character to that point might be a lot less satisfying.