Web-development – When should I start learning a PHP Framework

frameworksweb-development

I'm a beginner programmer

I have been learning PHP for a while, though not consistently. But for the past few months (say 3 months) I have been a bit consistent in my learning, largely because of a project a friend ask me to do for him since he knew I was into web design. Though I struggled to complete the tiny project for him after about 3 weeks, because I got stuck some times and I have to look up tutorials/references relating to the problem I was trying to solve, but I feel fulfilled been able to accomplish a project and along the way grab most of PHP basics.

My interest in Web development has grew higher since completing that project and I have been trying to learn PHP/MySQL as fast as I could, because the same friend want me to do something else for him, which to me is way beyond the basics I know. Though I don't charge him anything, but it gives me a sense of fulfillment.

I want to learn a framework, because I heard it can make you accomplish more as a web developer and makes life much easier.

Can I learn a framework without having OOP knowledge?
I know how to create and use functions, though I don't use it much

I know my question is not straight forward, but I know you will understand were I'm coming from and advice me appropriately. I wish to become a professional Web Developer.

I really need your professional advice.

Best Answer

In PHP, most frameworks use both OOP and MVC pattern. It means that you have to know both. Maybe not know them very well, but at least have a basic idea of what are those things, what are their strong points and weaknesses and how to use them.

As for when you should start learning a framework, for PHP, I would say use PHP framework as soon as possible, for several reasons:

  1. PHP by itself is a language which does everything to encourage you to write bad quality code. Different PHP frameworks try, on the other hand, to, not force, but encourage you to write a better code.

  2. A framework provides an abstraction. It means that:

    • You'll write less code most of the time,
    • You'll see some minor performance issues.

This means that:

  • It is a good idea to use a PHP framework most of the time, unless you're really sure that it doesn't worth it and you will be faster writing a native PHP code with no framework at all,
  • The PHP framework may not be a solution for very large websites requiring high performance. Chances are you will not work on those projects very often, and if you do, you will first have to profile your code to determine that the bottleneck is the framework itself.
Related Topic