Braking
One always wants to ensure that the trailer brakes are braking slightly before and slightly harder than the tow vehicle brakes. This puts a drag on the rear of the rig, like the feather fletchings on an arrow, and keeps the rig in a straight line. One also wants to ensure that the trailer brakes are NOT braking TOO MUCH more than the tow vehicle brakes, or the trailer brakes may lock up, causing them to skid, especially on slippery surfaces. Skidding tires have less friction on the road than those which aren't, so the drag then shifts to the front of the rig, and the rear of the rig, the trailer, tries to pass the front of the rig on either side. Jack knifing is when the tow vehicle retains traction, and the trailer skids around to one side or the other, with the rig folding up like a jack knife. It bears repeating here that a good sway control hitch will help prevent the skidding trailer from getting sufficient swinging momentum to jack knife.
Brake Controllers
The brake controller is a module that provides current to the trailer's electric brakes with the amount based upon some input. They all typically have an adjustment to tune the controller to the rig's qualities, such as its weight, wheel diameter, and type and number of trailer brakes. They also all have a manual control to allow the driver to apply the trailer brakes independently from the tow vehicle brakes. Most also have some sort of indication of how much current they are supplying to the brakes. The brake controller should be mounted where the driver, and preferably also the passenger, can see and reach it in an emergency. There are several types of brake controllers.
Hydraulic Controllers
The type of electric brake controller most popular years ago was the hydraulically actuated one. To install it, one disconnects a brake line from the master cylinder and installs a T fitting between them. The free end of the T is connected to another steel brake line that is fed into the cab through the firewall and connected to the brake controller. Hydraulic pressure then pushes a piston that swings an arm across a wire-wound rheostat, which determines how much current is fed to the electric brakes. The harder the tow vehicle is braked, the higher the hydraulic pressure, and the further the arm, which is opposed by a spring, travels across the rheostat, the more current is fed to the trailer brakes and the harder they brake. This all happens simultaneously, and the arm can be adjusted to ensure the trailer brakes are always braking slightly harder than the tow vehicle brakes.
While they are as close to ideal a brake controller as you can get, there are several problems with them. The installation is messy. Air is introduced into the brake lines so they must be bled. And since the air is at the top end of the line, it takes a LOT of bleeding (using traditional methods) to get it out. The brake controller must also be bled to get the air out of the new line and the piston. If brake fluid splatters or drips, it can ruin paint, or stain carpet or rubber floor mats. But the worst problem is that it alters the tow vehicles braking system, which can do more than make the manufacturer or installer liable for any accident that may be related to a braking problem. Some master cylinders do not have the capacity to pump the additional brake fluid through the controller on top of pumping it to the wheels. I've heard hydraulic controllers were outlawed, and I've heard they were just no longer carried because of the liability. Whatever the case, it's virtually impossible to find them anymore in the US, but some have reported acquiring them in Canada.
Ramp Controllers
These take input from the tow vehicle brake light wire. The longer the tow vehicle brakes are applied, the more current is fed to the trailer brakes, and the more they ramp up the trailer braking, i.e. the harder they brake. This overly simplistic methodology, also called a time-based controller, fails in two scenarios. In panic braking, the tow vehicle braking is at maximum, but due to the quickness, the trailer brakes are hardly applied at all. And in continuous light braking, they continue to increase braking until they're braking much harder than the tow vehicle. These type controllers should be avoided.
Inertia Controllers
These use a device to measure changes in the rigs momentum. This can be anything from a pendulum device that requires leveling, to a space-age accelerometer, which can measure deceleration moving forward or backing. They FOLLOW what the rig does. When it begins to slow, they detect that and apply the trailer brakes. However, the only way to have them begin braking before the tow vehicle is to have them adjusted so sensitive that they start applying the trailer brakes as soon as the throttle is lifted and the rig begins decelerating from engine braking and rolling resistance. This isn't a good thing because it is an uncommanded action. Trailer brakes should not activate until the driver specifically tells them to by applying the brake pedal. It also isn't good for brake lining wear. Think of all the times you lift the throttle but don't apply the brakes. You don't want the trailer brakes going on when you do that. The only way to avoid this is to set these controllers less sensitive so it takes the harder deceleration of the tow vehicle braking to activate the trailer brakes. But in this case, the trailer is no longer braking before the tow vehicle.
At least one inertia controller, the Teknosha Prodigy, uses the brake light wire to prevent the lifted throttle deceleration to activate the trailer brakes unless the brake pedal is pressed. It also has a "boost" mode that can be set to apply more braking power than the controller normally would when the brake pedal is pressed. Examples of inertia controllers are the Tekonsha Voyager and Prodigy. While these controllers are better than ramp controllers, and are easy to hookup, they're also less than ideal since they're always following rather than leading the tow vehicle. See
http://www.tekonsha.com/frproducts.html for more information.
Cable Controller
A cable attached to the brake pedal arm activates this type of controller. The more the arm travels, the further the cable is pulled, the more current is sent to the trailer brakes, and the harder they brake. All tow vehicle brake pedals have a certain amount of movement before the hydraulic pressure becomes high enough to initiate tow vehicle braking. The controller cable tension is adjusted so that it starts pulling on the controller at some point in the early pedal travel and the trailer brakes begin braking slightly ahead of the tow vehicle, not only initially, but throughout the pedal travel. As with other controllers, the cable controller also has a knob adjustment to control how much current is sent to the trailer brakes. The only cautions necessary during installation are to ensure the cable makes sweeping turns and isn't bent sharply which would bind the cable in its housing, and to ensure the end of the cable sheath is well anchored so it can't slip and change the adjustment. At this time, the Jordan Ultima 2020 is the only such controller, and these days is as close to an ideal brake controller as you can get. It even has an ammeter display to show you how much current is being drawn. See
http://www.go.to/jordanresearch for more information.
Summary
If you insist on being the one to control your rig, including the amount of trailer braking, and want the trailer braking always leading the tow vehicle braking, the Jordan is the clear choice. If you're not much of a DIYer, and/or you trust modern electronics as much or more than you do your own driving skills, the plug and play Prodigy would be the route to take. Both are very popular, and are the two best on the market.