I've only done the french drain thing; I have no idea what would be required with tying into a storm sewer; you'd likely want to contact the local government and/or water company to ask.
Anytime you're digging, you'll want to be aware of where underground utilities are. In the DC area, you call 'Miss Utility', and they'll mark out everything. (I think technically, you're not required if you're digging by hand, but it's still a good idea).
You might also want to take a look at what large trees are nearby, as you might have to deal with roots -- you can cut them as you go, but that might end up killing the tree or weakening it so it sheds branches, and large branches falling on your house or car is not a good thing. (especially when you have no power, so get trapped in your (damaged) home).
You'll want to look at what's down-slope of the area you're dealing with, and how much area you have to absorb the water once you move it down there, if you're going the french drain route. If it's an area that already gets pretty marshy after a rain, it's not going to absorb anything, so you'll need to go far enough out 'til you find somewhere that'll take the water. You also don't want to try to force it out near the property line, or you might piss off your neighbors (and if they're lawyers, or just happen to like suing, it could get messy).
...
And after all of that, you might want to look into if the area's abnormally wet -- one of my friends had problems for years, and dug up his yard multiple times, trying to get everything fixed, redid his basement at least twice because of water damage. And it turned out that there was a broken water pipe next to his house that was saturating the lawn, so any significant rain couldn't be absorbed.
If I understand your issue correctly, what you're calling a french drain may actually more properly be called a drywell. A french drain pulls in groundwater and moves it somewhere else, while a drywell is a place to get rid of water underground. I think what you're talking about is something to pipe your downspouts into, and therefore I'd call it a drywell.
That said, one can construct a drywell in a similar manner to a french drain, by digging a trench and filling it with gravel and a perforated drain pipe.
The key difference to understand, however, is that if what you really want is a drywell to get rid of water, it may need to be bigger than you think. The rainwater doesn't immediately disappear into the ground surrounding your drywell, you need to provide some storage space so that you can hold the water while it can slowly leeches into the ground.
You may want to quickly estimate how much water you need to deal with. Estimate the square footage of roof drained by these downspouts, and then multiply by a rainfall amount (some sources say look up a 5-year 24 hr rainfall amount for your area, other sources say simply use 1"), to get an estimate of the volume of water that could be flowing out of these downspouts. It adds up quickly!
If you simply dig a hole and fill it with crushed stone, you may need a big old hole, as crushed stone can have a void space of around 40%, so you'd need a hole 2.5 times bigger than your estimated roof runoff.
Therefore, you may want to consider an underground structure for your drywell, rather than simply filling a hole or trench with gravel.
One such product is made by NDS, called the Flo-well. It's a nice compact solution that can sometimes provide a good match for an individual downspout. You can stack them or daisy-chain them if you need more volume. Dig a hole, place the well, and backfill with gravel then topsoil. Simply plumb your downspouts into the drywell with PVC. The flo-well provides open space to hold lots of water, and has holes in its sides to allow the water out into the surrounding gravel and soil.
![flo-well](https://i.stack.imgur.com/3Eofq.jpg)
![Installing a flo-well](https://i.stack.imgur.com/QvAgc.jpg)
Or you could go with something even bigger if required, like some of the giant structures from Cultec that can hold up to 1200 Gal each, probably overkill for your application. These are like underground archways with open bottoms for the water to leech out of. Again, you'd dig a hole, lay a bed of gravel, place the chamber, and backfill with gravel then topsoil.
![Cultec chambers](https://i.stack.imgur.com/kDvZC.png)
I have no affiliation with either of these suppliers, but have done some homework on this product space as I have a drainage issue of my own that needs solving on a tight, urban lot.
NOTE: If you are extra lucky and your property has some grade to it in just the right spot, it may be possible to simply run a pipe underground from the downspouts away from the house and have it come out the side of a hill to a place that you don't mind being flooded with rainwater. This is way simpler than a drywell. Just make sure to maintain positive drainage all along the pipe run (1/8" per foot or so).
![drain outlet in hillside](https://i.stack.imgur.com/a4iP2.jpg)
image from www.askthebuilder.com
Best Answer
45 degree bends make the pipe easier to snake out if it becomes clogged. This can definitely save you a headache in the future.
Some suggest using a catchbasin with a grate below each downspout rather than connecting the downspouts directly to the underground pipe. This gives one last chance to keep leaves and dirt out of the underground piping.
Slope is definitely important for proper drainage.
As far as distance from the foundation, if you choose to use non-perforated pipe, I suppose you could run them closer to your foundation, but I'd avoid it if possible.