Well (1) is the position representation of (2), i.e., in (1) you have realized the abstract separable rigged Hilbert space of the Dirac bra-ket formalism as the Hilbert space of square integrable functions. Since all separable Hilbert spaces are the same, up to isomorphy, of course, you can do any calculation in the one or the other formalism. For the same reason also the Heisenberg-Born-Jordan version of QT ("matrix mechanics"), using a harmonic-oscillator basis to represent the separable Hilbert space in terms of square summable sequences, is equivalent to Schrödinger's wave mechanics. The Dirac formalism is simply the representation-free formulation and thus the most flexible one. You can often shortcut a calculation in, say, wave mechanics, by first analyze a problem in the Dirac formalism and only finally to write the model in terms of wave mechanics.
Some people don't like the bra-ket notation as, e.g., Weinberg, who seems to be a bit reserved against Dirac in general, given his remarks about him in both his QFT book vol. 1 and in the QM book. He presents the representation-free formalism in another notation. Of course, everything is independent on the notation, and it's just a matter of preference, how you write down your equation.