About the type of joints regarding fixture traps:

From the IPC:

Fixture traps.

Each plumbing fixture shall be separately trapped by a liquid-seal trap, except as otherwise permitted by this code. The vertical distance from the fixture outlet to the trap weir shall not exceed 24 inches (610 mm), and the horizontal distance shall not exceed 30 inches (610 mm) measured from the centerline of the fixture outlet to the centerline of the inlet of the trap.
Design of traps.

Fixture traps shall be self-scouring. Fixture traps shall not have interior partitions, except where such traps are integral with the fixture or where such traps are constructed of an approved material that is resistant to corrosion and degradation. Slip joints shall be made with an approved elastomeric gasket and shall be installed only on the trap inlet, trap outlet and within the trap seal.
Trap seals.

Each fixture trap shall have a liquid seal of not less than 2 inches (51 mm) and not more than 4 inches (102
mm), or deeper for special designs relating to accessible fixtures.
There was another one I cant reference quickly (it may have been in my NYS code book) where it said compression type fittings are prohibited after a trap. This rule would make all multi-piece p-trap assemblies illegal, yet the inspectors want them installed.