A spherical camera is pretty easy to define.
We have an anchor point C the camera always looks at and a relative position P where the camera is, which can be expressed in spherical coordinates, centered around the point C.
In this type of camera the the up direction is always the up vector of the world.
The implementation isn't terribly complex. given the parameters, we will calucate the position of the camera by doing:
rotation around the x axis by phi, rotation around the y axis by theta, multiply by the radius then translation.
And then we calculate the orientation of the camera with lookAt, centering the view at the anchor point.
The trackball camera is different however, it allows for orientations of the view in which the camera up isn't necessarily 0,1,0.
Also, in a spherical camera, the deltas around the x axis are mapped to one angle and the deltas around the y axis to the other. I am not 100% sure on how to represent nor map mouse movement to camera orientation in the case of a trackball.