There are a number of options for ninjas. Ghost step + sudden strike + two weapon fighting can be a very reliable, high damage hitter against living foes. On the other hand, for staying power, Combat Expertise and Improved Feint give you not only a possible AC boost, but the ability to attack every round with a single sudden strike against most foes (some will have a combination of high BAB and Sense Motive, most will not).
Ninjas basically excel at sneaking and nasty smackdowns. They are not as solid as rogues at generally skirmishing, and most of their magical powers get shown up by item and party buffs at high levels, but are still flavorful and useful. Against golems, undead, and the like, ninjas are good at turning invisible and running away, because they can't do much. Shuriken proficiency is a nice perk.
Scouts are good at scouting and melee support, and not just in the wilderness. Assuming you make the usual skill selections, you have a tumbling, sneaking, spotting and listening, lock picking character who just skirmishes intead of flanking.
Spellthieves are also sneaky.
Ranger combined with various Prestige Classes are also sneaky... Dark Hunter, Deepwood Sniper, Dungeon Delver, and so forth. Thief-Acrobat mixes nicely with either Scout or Rogue, or even ninja.