Stealth is fun.
Shadowdancer may be one of the most popular Prestige Classes in 3.5e, and that is solely due to the Hide in Plain Sight feat. Many players enjoy the thought of sneaking invisibly to the enemy and rolling insane backstab/sneak attack damage.
Unfortunately, stealth in D&D is not always that fun.
Now, the backstab part is awesome, and that's why most stealth players enjoy it. The problem is that the D&D mechanics as they are played out in most campaigns do not make much of stealth beyond a canned skill challenge. By looking at some good stealth games for the computer, such as Dishonored or Assassin's Creed, we can take some tips and add them to our campaigns.
Objectives
This is the biggest change that a DM has to foster in his campaign. As mentioned before, the objective of stealth is almost always just to get in some extra sneak attack damage. Stealth gets boring when, in the end, it's only about combat. There is nothing wrong with sneak attacks, of course. Some of the most memorable moments in my campaigns have been sneak attacks (double crit + 4x backstab damage FTW?), but stealth needs variety.
The purpose of stealth is to remain undetected. Let stealth be a tool for defeating encounters. If the players successfully sneak around an entire group of hobgoblins, give them full XP as if they had beaten the fight. And don't just stop there. If you want great stealth encounters, turn it into a real challenge like Dishonored does. Make enemies move around somewhat unpredictably. Have your players use distractions, or find opportunities to pick off the enemy one at a time. Give them bonus XP or a better reputation for being able to complete encounters without bloodshed, similar to Dishonored. Also like Dishonored, make a few combat encounters really dangerous if you rush right into them, and be sure to make that fairly clear through in-game information.
Environment
The world is bigger than a grid. Description helps. Open up the terrain for movement, like Assassin's Creed. Let them sneak past the royal guard by balancing across the rafters of the great hall or by sneaking over the rooftops to bypass the thugs waiting for them in the street. Think in 3D even though the grid is 2D.
Light is a huge factor for stealth in a lot of games, such as Amnesia: The Dark Descent. It ought to be very important in D&D as well, what with all the torches, lanterns, and magical lights often found in its environments. Have players make strategic use of light. One campaign, my players doused a torch while the guard was on the other side of the building so that when he came back, he couldn't see them sneaking inside. Unfortunately, the sudden lack of light alarmed him, which leads to another point:
The Chase Sequence
The way you describe the ninja character as cycling through backstab -> run -> hide -> backstab definitely confirms this as a bad pattern of stealth. One of the biggest flaws of the first Assassin's Creed game was how you could stab someone, run like heck, hide on a bench right around the corner, then go back and stab someone else. Rinse. Repeat. Worst of all, until they introduced notoriety in later games, it seemed like everyone forgot what you did.
Dishonored is a much better example of how to do detection and chase effectively. On the very first detection, the enemy is immediately alert and aware of the fact that you do not belong here. Hostility begins right away, and the chase is brutal. In a chase, NPCs do not let you get away unless you do something really daring. In the TV Show Burn Notice, the main character remarks during a narrative in a chase sequence that the only way to escape a chase is to do something that the people chasing you won't do -- like jumping off a roof.
And even if you get away, the NPCs should not just "forget" about you. They should be on high alert until you die or they are convinced that you have been driven off. Enemies on high alert for a stealth PC should not be easy to catch off-guard. In addition, they should not be splitting up alone if they are even reasonably intelligent.
Have NPCs adopt tactics like the PCs tend to act when encountering stealthy foes.
All Alone
"But I'm the only stealth character on the team!"
This is roughly the ninja player's position, I take it. I've been there. Fortunately, you don't have to be reliant on stab-and-run to be useful. A number of the former tips are intended for stealth-based encounters, but here's what a stealth PC has gotta do to have fun with stealth while your allies are kickin' down doors in the name of Tempus:
1: Wait for the encounter to get started. Be out of sight on the periphery.
2: Sneak up to a squishy target.
3: Stab.
4: ???
5: Profit.
An ultra-stealthy character is ideal for taking out priority targets. Then, using other skills, such as acrobatic-type skills, make a daring escape. Not just running away by pure movement points, but dodging between pillars, leaping onto ledges, or tumbling past enemies to rejoin your allies.
Stealth should get you into the fray. Speed and tricks should get you out.
First, this adds variety to your actions as a stealthy character.
Second, it should be hard to lose detection when enemies are tracking your movements so closely.
Beyond combat, a stealthy character can still be a great asset. Perhaps you can open a gate while the party is fighting. Maybe you can sneak into a camp and rescue a prisoner while the party is attacking from the opposite side. Generally, you should avoid going too lone wolf unless your party wants you to do so, because that's dangerous and slows down the game for others. Performing a stealth mission while the party fights a battle has been the best possible scenario in campaigns I have played. It keeps everyone busy, provides a distraction, and lets your group benefit from stealth simultaneously.
TL;DR version: Stealth should be more than dice rolls. It needs to interact with the environment and the intelligence of the NPCs involved. It should be rewarding, fast-paced, and require cleverness more than just sneakiness. When done right, it should give the party big advantages as a whole.
There is no surprise here.
The guards are on alert. The PCs know there is someone on the other side (And presumably hostile). As Bradd points out, you want to make sure your guards to roll their stealth. Remember that skill bonuses are only listed for monsters if they're proficient. So use their Dex as their stealth check. Compare it to your PCs passive Wisdom (Perception) or they can roll it actively if they suspect someone is behind the door.
Basically, what happens is that the door is opened, and everyone rolls initiative. Initiative is the measure of how quickly you react when combat becomes inevitable. No one gets to jump that order.
I do not allow readying actions outside of combat (it's not explicitly prohibited, but its really not in the spirit of rolled initiative). Again, both sides are prepared, you go with initiative order.
One important note though. Don't start combat before the door is opened. Your PCs might realize they've been noticed and try to start a conversation through the door. This is a great opportunity for fun role playing and should not be missed.
Best Answer
Firstly, use Passive Perception.
Have your assassin hidden at the outset, and use the players' Passive Perception scores to determine if anyone was aware of him or not. This reduces rolling, or meta-actions by the players after asking them to roll. I'd recommend having your assassin roll for his Stealth, instead of setting an arbitrary DC, to prevent you from planning around your PCs' strengths inadvertently.
If you want to be very sure your assassin has a good chance to be hidden and not detected, and a good chance to hide for his getaway, consider giving him Expertise in Stealth, or a similar good bonus, which is in line with what a Rogue with Assassin archetype would get.
Additionally, suggested by Meta4ic in the comments:
Secondly, use the Surprise rules, as mentioned in THiebert's answer.
On PHB p. 189 the surprise rules are outlined:
This gives your assassin a full round of action to spring on the players, and get a head start on his getaway. This also denies the players actions or reactions until their turn ends. You can either use a direct Perception roll upon ambush, or, as I've already outlined, Passive Perception, reducing the number of rolls.
If you're following what I've said, the players should only have had to roll initiative so far. Note that Passive (or Active) Perception combined with the Initiative roll is still letting your PC's abilities work for them (or against them). Keep in mind, some PCs may not be surprised, so account for that in your narrative, and accept this may get your assassin caught - have something ready if this happens.
(Optional) Give your assassin a Bonus Action Hide ability.
This is in line with the Rogue's Cunning Action and the actual Assassin archetype. This also allows him to hide the turn he fires, while the PCs are still surprised, and then use his movement that turn to get a head start. On subsequent turns, consider letting him use a Bonus Action Dash, again consistent with Cunning Action, and giving him a good chance of getting away.
Note: if you let him hide in this way (or in general really, for quicker play and less rolls), make his attempt against the players' Passive Perception, and make them take a Search action on their turn if he beats their Passive and they want to try finding him.
Finally, if they do give chase or initiate combat, follow the relevant rules, and do not fudge anything.
Chase rules are on DMG p. 253, and the combat rules should be well known.
If you can't afford to let your assassin get caught because it messes with your story, you may need to rethink your story somewhat. The players should be rewarded if they are able to catch the would be assassin. Information, a plot hook, or at the very least, with preventing the assassin from trailing them for another attempt, reporting back to whoever ordered the hit, or potentially with a new ally if they're persuasive enough and the assassin is open to that.
However, if you're following the suggestions I've given, with a high Stealth score, bonus action Hide and Dash actions, and you properly surprise the PCs, you should have a very good chance of the hit and run with minimal dice rolls you were looking for. At this point, the players should only have made one dice roll (initiative), and maybe an active Search check if he managed to hide successfully.
Bonus Action Dash should also let him cover a lot of ground, meaning the PCs will have to work hard to catch your assassin. If they do, they deserve it and any reward that comes as a result. Also since these abilities are consistent with PCs, if he does escape, they shouldn't feel cheated, or that you gave him arbitrary abilities to DM Fiat his getaway. Additionally, you gave them full agency to react as they see fit. Failing skill checks, or not having the specific tools to catch him in that moment is not stripping them of their agency.
Final Additional Note: Under no circumstances should you try to work around, or negate a feat choice such as Alert or Observant.
PCs give up an ASI, and a wide choice of other potential Feats that may be better value in combat, just so they can be good in this specific circumstance. Working around that cheats them of their character choice.