Stephen King likes to write the story first, leaving blanks for research. E.g.: Type of sofa, handgun or security recording equipment. And that may be the best way to write most types of novels, allowing us to focus on the story itself, not on the things we don't know.
Then again, what if the things we don't know could limit our chance of success? Twenty years ago, when I first tried write a book based on the Great Escape from Alcatraz, the only thing I knew was that I'd have a hell of a story if at least one of the three cons survived. I'd knew which one I'd want to live for the sake of the story of mind. But about the man himself or how the escape was pulled off, I knew zilch.
That first attempt never got off the ground for two reasons: 1) My effort to tell the tale as a horror novel, in order to make a quick sale, was all wrong. What I had, I perceived, was a thriller. 2) I needed to know more, much more, about all three of the cons and how they broke out of their cells.
And the more I learned, the more I realized how much more I needed to learn. The Clint Eastwood movie, Escape from Alcatraz, was wonderful, but it missed the point completely: this Sistine Chapel of escapes was a major miracle of social engineering. The cons had to play everyone, from their neighboring cons to the guards. And the promises made and broken were the really the stuff of my novel: We'll take you...and you...and you...More than one con left behind, and betrayed, could have nursed a long, violent grudge.
At the same time, as I realized the breadth of the convicts' achievement, my passion for the story grew and grew...until one day, one day like any other day, the tale I'd tried to write for years began to write itself. So for this one book, at least, there was only possible answer for me:
Research before writing.