Harmony first, melody later on.

Since I've been using BIAB, my sequence is like this:
First I find a style I'm interested in..listen to it a bit.
Then I layout chords that I think go well with the style..re-generate and listen, change, and get to the "shape" of the song.
After this, I move it to my DAW (I use RealBand).
I start constructing a melody against the chord "landscape" that I've created.
Then work with RT's and other musical elements to flesh it out.
Most times, after all this is done, I create lyrics.
Then just keep refining until satisfied.