The Old Way We Were Taught
For years we've been trained and taught that working with PHP you surely need to use the server-side rendering to complete the project, and it did stick in many of us that when we are developing PHP based projects we stick to that principle.
The Turning Point
And without considering looking for other ways to do things and they come a day I had some school assignment for developing a backend project using PHP.
I hated PHP way of doing things using the server-side rendering and something crosses my mind, "wait is there a way can change the narrative and came up with something new hmm...🤔🤔".
Exploring New Possibilities
And just like that I said let's explore if it is possible to create APIs in PHP as modern web application and use JavaScript to fetch those API data provided with our PHP backend.
Rediscovering PHP’s Strengths
I went all in to find the ways to implement such thing and guess what I found it is actually 1000/100 possible, and this time I was feeling like I just invented a new rocket.
And I was like all this time there was something great with PHP and we noticed we blindly hated on it and some of us have already buried and didn't even want to look on PHP again.
PHP has a lot of features in it like Bearer tokens. for authentication
This solved a lot of problems that came with working server-side rendering of PHP like:
Having backend errors showing up in frontend which for me I consider unprofessional
Separation of concern which is a core in working with today's efficient systems
The Lesson Learned
I used to not get the term they used to say, "There is no one way/solution to a problem in programming" and at that time I finally released and felt what they meant when they mention that quote.
My Advice to Developers
My advice to all of you who have made it to end of the article is to not consider one way to a solution and to always be curious and try to apply what you've learned to unlock new patterns to make program fun because seriously if you do things in a certain defined way you will get bored of programming eventually.
so go out there challenge yourselves find new ways to do things try combining new ways with old way to boast that dopamine of yours and fun in programming.
Final Thoughts
Well, that's all I got to share any suggestions for improvement? sure, I got you-just write down your thought and feedback in the comment section I do be happy to interact.
Top comments (0)