Just like the rest of life, technology has permanently changed the world of publishing. Writers have choices now that were never options in the past. You can go straight to a self-published e-book, you could employ a self-publishing company that does the grunt work for you, or you could take the traditional route and submit to agents and/or editors.
Probably the most important factor in making your publishing decision is what type of material you write. A how-to book targeted to teaching high-volume vegetable farmers about specific types of fertilizer has a limited market and may not be picked up by a traditional publisher, but could do well as a direct online sale. If you're writing a detective story that you hope to turn into a multi-book project like Janet Evanovich's Stephanie Plum series, you might want to try the traditional route first.
I found a great chart on the types of publishing options and the pluses and minuses of each option by Jane Friedman. This is one of the best explanations I've come across, and should be helpful in making your publishing choices.
Meanwhile, I am doing something I never thought I'd do: writing a book that I plan to self-publish as an e-book. The times they are a-changin'!