Client side functions VS server side methods


Hi all, my first post and I’m VERY green at all of this, so apologies if it seems a silly questions.

What do you all think of making your functions on the client for testing, then going back and making methods on the server before deployment (for security)?

I’ve been reading this book and whilst I understand the concept, it does feel like double work. I was crushed to think I had to go back through all my work, rewrite it all to work on the server for securities sake.
How do you work? Do you start out with methods on the server immediately or do you do as the book does, make functions that run on the client, get it working then go back and re-work it all later to run from the server?

Your advice is much appreciated. Thank you,