I Know that Fourier transform states that any non-periodic function could be described as summation of sines and cosines by saying that $$F(w)=\int_{-\infty }^{\infty }f(x)e^{^{-iwt}}dt$$
And this was derived from Fourier series by saying that any non-periodic function is a periodic one provided that the period goes to infinity, and by saying that you can say that any function could be described as a bunch of sines and cosines and that's why we transform our function to the frequency domain
But I did know recently that the Fourier transform is a projection of our function on the orthogonal basis which is $e^{^{-iwt}}$ and by saying that you mean that we show that the frequency inside our function by projecting it on another basis function
So by that we say that we can represent the frequency inside our function by projecting it or by saying that is a Fourier series which has an infinite period
My question is: which one of these ways is the correct one to think about Fourier transform?