Building a 2x2 frame first certainly works, but it unnecessarily complicates building a plywood cabinet.
More typical cabinet construction uses butt joints with the pieces joined with one or more of the following strategies:
- pocket screws
- nails or screws through the face of one piece and into the end grain of the other piece
- cleats on the inside corners, fastened with glue and screws/nails
In all cases, you should usually also glue the joints for improved strengthstrength; if using a nailgun the nails only serve to hold the carcass (cabinet box) together while the glue dries. You can hide your fasteners by strategically positioning them. In the case of nails or screws through the face of an outer end, you can simply design your cabinet with room for an extra 1/4" panel glued on the outside, or you can plug or veneer over the screws/nails.
It's good to include at least a partial back to help reinforce the box against racking. Face frames on the front also add reinforcement.
As TX Turner mentioned, you can also house your joints in dadoes or rabbets. This helps register the pieces during assembly and adds glue surface for strength.