What are the advantages/disadvantages of using a PHP framework over just writing direct PHP code?
A PHP framework is a platform to create PHP web applications. PHP frameworks provide code libraries for commonly used functions, cutting down on the amount of original code you need to write.
Core PHP has a rich set of functionalities available so that the developer does not have to embed the same code again and again. When it comes to PHP framework, they usually have a fixed set of rules and hence the code can be passed from one developer to another without any hassles.
A PHP framework makes development faster. For example, you don't have to write complex queries to retrieve the data from the database. PHP frameworks provide CRUD operations (Create, Read, Update, and Delete). Frameworks enable developers to scale systems easily.
A framework gives you standard solutions to typical problems, e.g. for an online shop that can cover the functionality for a customer login (including session handling), a shopping cart, placing orders...
The big advantage of using a framework is that
The big disadvantage is that
A framework is a library. You have an investment of time to learn how to use a library, but once you know how it works, you should get back your investment many times.
A PHP web framework applies this principle to all the common things you do when you produce a (usually database driven) website with PHP.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With