You want to vacuum first, as removing debris/dirt is ALOT easier when it's dry that when it's wet and tacky.
Dave Fermani has a wonderful suggestion of doing "dry brushing" while vacuumming, which removes about 90-95% of the dirt from fabric/carpets.
Think of it as a vacuum beater-brush. You brush the carpet/fabric with a DRY brush, just like you are washing it, then vacuum. Repeat if the carpet/fabric is REALLY dirty.
You may have to do this three or four times. I use an old STIFF toothbrush along carpet-to-vinyl trim edges to get imbedded stones/debris that gathers there. I spend two to three hours vacuuuming larger vehicles, like soccer-mom vans or SUVs. It's time well spent, as you only have to remove dirty stains with an extractor and not worry about clogging the strainer/filter with alot of dirt., You'll be suprised how much dirt you can remove by vigorous dry-brushing and vacuuming. Also, do not to forget to clean the vacuum's filter BEFORE starting this process. You really want maximum suction from a vacuum, and a clean filter is one way to assure that. Sounds simple, but alot of fine dirt gathers in the filter element/membrane. For shop vac's is quite east to just displace the dirt from the removable filter element by lightly knocking it on the ground. Another common sense suggestion: do this FAR AWAY from the cars you are working one. The wind will carry this fine dirt for some distance. (Been there, done that, shamefully admitted)
Another hint is when doing carpet floor mats removed from the vehicle (not the vinyl Weather-Tech type), I knock them with the carpet side down on a cement floor and then vaccum the floor of the debris/sand/dirt that falls out from this process. I repeat this until there is very little dirt coming from the carpet. Again you'll be suprised how much dirt/sand is removed doing this. Floor mats the were heavy when removed become alot lighter weight-wise because of this. Again, it's alot easier to remove dry dirt than wet dirt. You can brush them in between "beatings" if you want. After scrubbing with an APC , I just hose them off. Also, if you have grease/oil stains, try pre-treating with WD-40's "Spot Shot", available at most Wal-Mart stores in the cleaning supplies section for about $3.50 for a 14 oz can. Works well for an OTC (over-the-counter) product.