A bookcase carries more weight than almost any other piece of furniture in a house, and it is tall and narrow. Both facts drive the construction.
The safety point first
Any tall bookcase must be fixed to the wall.
Toppling furniture causes serious injuries and deaths, overwhelmingly to young children who climb on open shelves.
The risk is highest when a bookcase is partly loaded, when drawers or lower shelves are used as steps, and on carpet, which lets the unit rock forward.
Use the restraint straps or brackets supplied, or fit an L-bracket from the top of the carcase into a stud or into masonry.
Fix it even if it seems stable, and fix it immediately rather than later.
Carcase construction
The sides carry the load down to the floor, and the back keeps it square.
Use 18mm material as a minimum. Plywood is stiffer and more stable than MDF or chipboard for a piece carrying weight.
Joints, in rough order of strength: housings, biscuits or dominoes, dowels, pocket screws, and plain butt joints with screws.
A housing joint, where the shelf sits in a groove cut across the side panel, is the traditional choice and carries load properly rather than relying on the fixings.
Glue every joint as well as fixing it.
The back panel
Frequently treated as a cosmetic afterthought and it is structural.
The back is what stops the carcase racking, which is the parallelogram distortion that makes cheap furniture lean.
Use 6mm or thicker ply or hardboard, not the 3mm sheet supplied with flat-pack units.
Fix it into a rebate around the back edge, glued and pinned all round and along every fixed shelf.
Check the carcase is square by measuring the diagonals before fixing the back, since the back locks in whatever shape it finds.
Shelf supports
Fixed shelves in housings are the strongest and also brace the carcase.
Adjustable shelves on pins are flexible and weaker, since the load sits on four small points.
Use metal pins rather than plastic, and drill the holes accurately with a jig so shelves sit level.
Bookcase strip, a metal channel with movable tongues, spreads the load better than pins.
Include at least one fixed shelf around the middle of a tall unit, which stiffens the sides and stops them bowing outwards.
Shelf spans
Books are heavy and materials creep under sustained load.
For 18mm ply, keep the span to around 700 to 800mm. For 18mm MDF, 600 to 700mm. For melamine chipboard, less again.
Fit a front lip to longer shelves, which dramatically increases stiffness and hides any sag.
Add a vertical divider in a wide bookcase rather than trying to span the whole width.
The plinth
Stand the carcase on a plinth rather than directly on the floor.
This keeps the sides off a damp or uneven floor, allows scribing to an uneven surface, and lets skirting be accommodated.
Set it back from the front for a shadow line.
Fitting into a room
Skirting is the usual obstacle. Either cut the skirting away where the unit goes, or notch the carcase sides around it, or set the unit forward on a deeper plinth.
Scribe the sides to the wall if the unit is fitted.
Check the unit will go into the room upright before building it, particularly with a low ceiling, since a tall carcase cannot always be stood up in place.
Finishing
Prime MDF with a suitable primer and sand between coats.
Finish the shelves before assembly where possible.
Wear a proper respirator when cutting and sanding MDF.
Flat-pack alternatives
Ready-made bookcases are cheap and mostly built from thin melamine chipboard with a 3mm back.
They sag and rack under a real book load.
Replacing the back panel with 6mm ply, glued and pinned all round, transforms a flat-pack unit for very little money.
Adding a front lip to each shelf deals with the sagging.
Assembly
Build on a flat floor, not on carpet, and check the diagonals before the glue sets.
Clamp joints rather than relying on screws to pull them together.
Dry assemble everything before gluing, since there is no time to solve problems once the glue is on.
Number the parts as you cut them, and mark which face is the show face.