Early in my career, I worked exclusively as a custom cabinetmaker; I didn't concern myself with appliances other than to make sure that the openings for them were the right size. It wasn't until I became a remodeler and found myself responsible for the entire project that I learned how to plan properly for appliances. Not only do the units themselves have to fit, but the mechanicals have to be located so that connections can be made without reworking rough-ins or butchering cabinets.
Specifications
The importance of appliance specifications cannot be overemphasized. Our company policy requires that all appliance decisions be made before the cabinetry is designed and the actual work is begun. Even small differences between models can cause problems if you don't pay attention.
Simply knowing the size of the openings and what utilities to bring in isn't enough, either: You must read and become familiar with all of the installation requirements. If you don't follow the instructions, the manufacturer will not honor the warranty.
Also, don't assume the instructions are complete or accurate. Several years back, the motherboard on an oven I'd installed burned out because the instructions failed to mention venting the cabinet. At first, the manufacturer blamed me and said I'd have to pay for the replacement. But I'd saved the instructions and was able to show that they didn't mention venting. In the end, the company admitted its mistake, replaced the oven, and paid for me to modify the cabinet according to the new specifications.
Now when something in the instructions seems off-kilter, I call the manufacturer's technical-support number and check.
Ranges
There are two main types of slide-in ranges: freestanding and built-in. Both sit on the floor. Freestanding units project slightly above (1/8 to 1/4 inch) the countertop and have a raised back that butts to a wall; since countertop edges are partially visible, they need to be finished. Built-in ranges, by contrast, have trim pieces that seal the gaps between the countertop and appliance. They come with or without raised backs, making them suitable for island applications.
Size of opening. Face frames usually hang 1/8 inch or more beyond the sides of the cabinet boxes, so if the specifications call for a 30-inch opening I install face-frame cabinets 30 inches apart edge-of-frame to edge-of-frame. With a 1/8-inch overhang, the sides of the boxes will be 30 1/4 inches apart; the extra space makes installing the appliance easier and keeps it off the sides of the boxes.


Frameless cabinets have no overhang, so when I install them I hold each side about 1/16 inch back from the opening; this gives me a 30 1/8-inch space between boxes. I make sure the person fabricating the counters knows to run them 1/16 inch beyond the sides of the boxes so that the counter opening is 30 inches wide.

Some ranges are required to be a specific distance from adjacent drawer fronts and doors so that heat doesn't char or melt the cabinet fronts. Accommodating these clearances is easy if you know about them in advance, but if you don't, you may have to shift the cabinet layout in the field and install filler pieces.
Gas and electric hookups. Ranges can be all-electric, all-gas, or dual-fuel (gas burners with an electric oven). Electric and dual-fuel models usually require a dedicated 220-volt circuit (40 or 50 amps) in the wall near the floor. Don't assume you can reuse the existing three-wire circuit; many jurisdictions don't allow you to ground through the neutral, so you will have to run a new four-wire circuit.
All-gas units require 110-volt electrical service for the electronics and ignition. The gas shutoff valve is typically located next to the wall just above the floor. The exact position varies according to the manufacturer's requirements and the location of joists.
Most houses have a 1-inch gas-supply line, and that's usually enough. But multiple appliances and long runs may strain gas flow, so when remodeling a house with many gas appliances I always ask the mechanical contractor to inspect the system and verify that there will be adequate flow.
Cooktops
There are two types of cooktops: drop-ins and range tops. With a drop-in, the counter is continuous and there's no break in the face of the cabinets. A range top slides into an opening that interrupts the edge of the counter and the cabinetry face. Since range tops vary in height, custom cabinets may be required.

The gas shutoff and electrical connections are usually in the cabinet below the unit. The one exception is when a gas cooktop is installed over an undercounter oven, in which case the gas shutoff must be in an adjacent cabinet; if there's room, the electrical connection can be behind the oven. Don't assume that any cooktop can be installed over any oven: Some appliances are not compatible, generally because the necessary clearances can't be maintained.
The instructions for a drop-in cooktop specify the size of the opening in the counter and the clearance (or air space) needed for cooling. Most drop-ins overlay the edges of the opening and screw or clamp to the underside of the counter.
One issue often overlooked in cabinet layout is how the space below the cooktop will be used. To maximize storage, I always try to position the mechanicals along the far back wall of the cabinet. The current trend is to put a lot of drawers in base cabinets, which works fine under cooktops and range-top units as long as allowances are made for utilities and the required clearance from combustibles. Ideally there should be a 4-inch space for utilities behind the drawers in cabinets that contain cooktops.



Putting the gas shutoff behind drawers is also acceptable. The requirement is that the shutoff be accessible; since drawers are removable, the area behind them qualifies. Service people can follow the supply line to find the valve.