Research, rough copy, refine copy, edit - publish.
I have an idea this is the recommended way of doing things.
How much research goes into the writing is up to you as the author. Ernest Hemingway, Jeffrey Archer and Frederick Forsyth ('Day of the Jackal') go deeper into research than some others. Bernard Cornwell is another writer who does exhaustive research - such as for his 'Sharpe' series. I took a leaf out of their books, so to speak. I've trawled all the books on Danes, Icelanders, Norsemen, Normans, early English and so on around the 11th-12th Centuries for my 'RAVENFEAST' series. I went back in time as well, to Aelfred 'the Great', Ragnar 'Lothbrok' (Leather Breeks) and so on.
When you think you've done enough research for your story, play around with the idea of a story. Read other things, like newspapers. I got the idea for my main character, Ivar' from playing about with names after reading an interview in a weekend tabloid with James Blunt. Then I started on roughs. The story almost writes itself after you've done a fair bit of research into the time you've decided to fit your story into. Play about with scenarios, go into period names, look into modes of transport - it all 'dovetails' in.
Decision time now: Are you first person? Third person? Narrator? Is the story written in the past or present tense? Who are your friends (have you any), what are their names, where do they come from, how long will they last in the story? (improvise, it's like jazz!)
Satisfied with your jottings? Got references you can check on (books/other writings)? Get going then! It's easiest on a laptop. Change things, play with scenarios, where does your story start? I started with a 'pre-story' in my first book in the series that was loosely connected to the main story and so on...
Go geddit, iburmaster! Put the brakes on, throw out the anchor when you think you've got there, go through it again dressed as your 'editor'.