To an extent...but for the past 400 years a good number of composers have thought about harmony before they've thought about melody. Before baroque composers came around harmony was typically subsequent of two or more melodies put against each other. Since then, composers have thought about harmonies and common progressions (ii-V-I, I, IV, vii, I, etc. etc.) first, and added in melodies afterwards using passing tones, chord tones, etc.